Feeds:
Posts
Comments

Archive for the ‘Troublshooting’ Category

Howdy,

The Problem.

For teamsites and collaborations, sometimes it can be useful to upload big file size documents – which is allowed only partially by SharePoint and IIS. They both have different default settings for the maximum upload file size of a single document or file. They are:

  • SharePoint Server 2010: 50 MB
  • IIS7: ~30 MB

So, when trying to upload a big document, this results in the following error:

image

85 MB is simply too much for the above mentioned settings. Now, the solution section will show you how to fix this.

The Solution.

The good news is: This can be custom tailored to your needs, by simply following 3 steps. Here comes the first step:

1. Increase the SharePoint Upload Limit via Central Administration

First, you must increase the SharePoint 2010 upload limit.

  • Central Administration
  • “Manage Web Applications”
  • Select desired web application row (don’t click on the title, just select)
  • “General Settings” in the ribbon
  • Under Maximum Upload Size, change the setting to the desired value (e.g. 200 MB in our example)
  • “OK”

 

image

Now, the web app is equipped for receiving large files, but IIS7 will still prohibit it, resulting in the same error message as above. So, let’s move on to step 2.

 

2. Increase the IIS7 request length

Use the following command on the machine you are running the IIS 7:

%windir%\system32\inetsrv\appcmd set config -section:requestFiltering -requestLimits.maxAllowedContentLength:valueInBytes

In our case, we’ll simply put 200x1024x1024=209715200 bytes.

You will receive a confirmation message after applying the command. Please bear in mind that you will need to run the cmd.exe in administrator mode.

image

 

3. Increase the IIS7 connection timeout length (optional)

One more thing to keep in mind is the connection timeout settings: When you upload large files, depending on your connection speed it can happen that the connection times out. If you want, you can increase the connection timeout to a larger value. The standard is 120 seconds. This step is optional, but can become required if you have users with low speed internet connections.

image

  • Open IIS
  • Select the Web Application
  • Click on Advanced Settings
  • Expand Connection Limits
  • Set the new value for Connection Time-out (seconds)

 

This is it – all done!

You users will now be able to upload larger files:

image

As usual, test any commands, configuration and settings on a test environment before applying them in production. Applying request lengths bears also some security implications to keep in mind. Use any advices and configurations at your own risk and evaluate risks before applying them.

 

Have a nice day and best regards!

Martin

Advertisements

Read Full Post »

Howdy again,

I encountered a problem during the installation of the prerequisites of SharePoint 2010 Enterprise. The installation of KB976462 failed, and so would eventually the whole prerequisites installer. The error message pointed me to the log file.

Here is an excerpt from the installation log:

2012-01-11 16:07:21 – Beginning download of Hotfix for Microsoft Windows (KB976462)
2012-01-11 16:07:21 –
http://go.microsoft.com/fwlink/?LinkID=166369
2012-01-11 16:07:23 – Size of download of "Hotfix for Microsoft Windows (KB976462)" in bytes is "4331740"
2012-01-11 16:07:23 – Download of "Hotfix for Microsoft Windows (KB976462)" completed successfully
2012-01-11 16:07:23 – Installing Hotfix for Microsoft Windows (KB976462)
2012-01-11 16:07:23 – "C:\Windows\system32\wusa.exe" "C:\Users\xxx~1\AppData\Local\Temp\KB926A2.tmp.msu" /quiet /norestart
2012-01-11 16:07:26 – Install process returned (-2145124329)
2012-01-11 16:07:26 – [In HRESULT format] (-2145124329)
2012-01-11 16:07:26 – Last return code (-2145124329)
2012-01-11 16:07:26 – Error: The tool was unable to install Hotfix for Microsoft Windows (KB976462).
2012-01-11 16:07:26 – Last return code (-2145124329)
2012-01-11 16:07:26 – Options for further diagnostics: 1. Look up the return code value 2. Download the prerequisite manually and verify size downloaded by the prerequisite installer. 3. Install the prerequisite manually from the given location without any command line options.
2012-01-11 16:07:26 – Cannot retry

So, the solution is quite simple: You must download, extract and install the hotfix manually. The following 3 steps show how it works:

1. Download the KB976462 manually from here:

http://archive.msdn.microsoft.com/KB976462/Release/ProjectReleases.aspx?ReleaseId=4317

image

Choose the “x64” version of the msu file. Save it to a local directory: I used here C:\Installation\KB976462.

2. Open a command prompt and expand the msu file (make sure you open cmd with administrator rights)

expand -f:* "C:\Installation\KB976462\Windows6.1-KB976462-v2-x64.msu" %TEMP%

3. install using:

pkgmgr /n:%TEMP%\Windows6.1-KB976462-v2-x64.xml

 

All done! Re-run the prerequisites installer – it should finish with success, as expected.

 

Hope this was of some help!

Thanks and best regards,

Martin

Read Full Post »

Dear all,

 

one of the definitely nicest features of the Service Pack 1 for SharePoint Server 2010 is the ability to restore single sites, which wasn’t possible before.

 

Procedure for restoring a site pre-SP1:

  • Restore entire farm from backup.

 

Drawbacks: Time consuming, costly. Most of the times not performed at all.

 

Procedure for restoring a site post-SP1:

  • Ensure user is a site collection administrator
  • Go to Site Actions –> Site Actions
  • Click Site Collection Administration
  • Click Recylce Bin
  • Check the site you want to restore and click Restore.

 

Quick and simple, isn’t it?

 

In Microsoft SharePoint Server 2010 w/ SP1, a deleted site is not permanently deleted, but moved to the 2nd stage Recycle Bin. The default setting for automatic deletion is 30 days – however, this is modifyable. You can see how to do these changes here:

 

http://technet.microsoft.com/en-us/library/cc263125.aspx

 

Restoring whole Site Collections:

 

You can use the following PowerShell cmdlets to restore, delete or view deleted site collections:

 

Get-SPDeletedSite
Remove-SPDeletedSite
Restore-SPDeletedSite

 

Stay tuned till the next time and best regards,

Martin

Read Full Post »

Dear all,

The developer dashboard is a very handy tool in Microsoft SharePoint Server 2010, when it comes to analyzing how your site is loading and finding potential bottlenecks. It displays information about databases, webservices, the current page itself and so on. You can see an example of the developer dashboard here. Once enabled, it can be found scrolling at the bottom of the page you want to analyze.

The Developer Dashboard

There are three states the developer dashboard can be in:

  • On: Displayed
  • Off: Not displayed
  • On Demand: Can be toggled by the user.

And you have three possibilities of turning it on or off:

  • STSADM.exe
  • PowerShell
  • SharePoint COM

In this post, we’ll just focus on the STSADM.exe method, since it is the fastest one. STSADM.exe is located in the HIVE folder of SharePoint 2010 (usually “C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\”, and there in the “BIN” folder).

The STSADM.exe Method:

On:  stsadm -o setproperty -pn developer-dashboard -pv on

Off:  stsadm -o setproperty -pn developer-dashboard -pv off

On Demand:  stsadm -o setproperty -pn developer-dashboard -pv ondemand

Turning it on “On Demand” creates a new button in the menu, which is shown in the following picture:

On Demand Developer Dashboard Toggle Button

On Demand Developer Dashboard Toggle Button

That’s it! The command takes a few seconds to run and then quits with a “Operation successful” message.

Best regards and stay tuned till the next time,

Martin

Read Full Post »

Dear all,

While reviewing the Microsoft Operations Framework (MOF) and Checklists for the daily use of monitoring health of SharePoint environments, I found the following interesting information about memory leak detection.

 

These for sure are among the worst things that can happen to a SharePoint administrator, since they can cause occasional downtimes and cryptic error messages.

 

As with almost any troubleshooting approach for SharePoint, you should go to the ULS logs and search for specific error messages. These are the two most common sources of memory leaks:

 

1. “An SPRequest object was not disposed before the end of this thread. To avoid wasting system resources, dispose of this object or its parent (such as a SPSite or SPWeb) as soon as you are done using it. This object will now be disposed”

Careful: Watch out for large numbers of this error message. It can be the case that such messages are “false positives”. Luckily, the ULS logs provide also object counts, so you can easily see whether this is occurring often or only a single event.

 

2. No specific error message, but:

Symptom: Intermittent application pool recycles.

Result: Downtime.

Problem: Hard to reproduce and debug for the administrator.

Explanation: Not properly disposed objects cause the garbage collector not to be able to recover used memory. As a result, the growth of memory by the application pool can increase greatly, causing a security protection mechanism to trigger an application pool recycle.

 

Solution for both problems: Dispose objects properly. Microsoft provides a guide on how to do this properly here:

 

Best Practices: Using Disposable Windows SharePoint Services Objects

 

Also, there is a very handy tool to detect memory leaks, which detects possible memory leaks in custom SharePoint solutions which do not comply with Microsoft’s best practices. You can find descriptions and the download of this tool here:

 

SharePoint Dispose Checker Tool

 

Happy and (safe) coding & stay tuned till the next time!

 

Best regards,

Martin

Read Full Post »