Search This Blog

Thursday, October 17, 2013

Maximum request length exceeded error while uploading files of size more than 50MB

Recently one of our SharePoint users came up with an issue that they were not able to upload files to SharePoint. It was giving him an access denied message. I checked for the permission for the user and the user had contribute permissions. The access denied message appeared only when the file size was more than 50 MB. The user was able to upload files of size lesser than 50 MB.

I checked in Central Administration ->Application Management-> Manage web application- >Select web application -> General Settings ->Maximum Upload Size .It was 200 MB

I checked the event viewer on the SharePoint server and saw the below error.

Request Url : 'https://servername/sites/sitename/_layouts/UploadEx.aspx?List={0CB029E1-5FA0-427D-A871-652E1748D8FD}&RootFolder=&IsDlg=1'
Maximum request length exceeded.
Exception Type: System.Web.HttpException
Exception Source: System.Web @ GetEntireRawContent

Resolution

I checked the web.config file of the associated web application and I noticed this.

<system.web>
<securityPolicy>
<trustLevel name="WSS_Medium" policyFile="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\config\wss_mediumtrust.config"/>
<trustLevel name="WSS_Minimal" policyFile="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\config\wss_minimaltrust.config"/>
</securityPolicy>
<httpHandlers/>
<customErrors mode="On"/>
<httpRuntime maxRequestLength="51200"/>


If you see this the maxRequestLengthparameter for httpRuntime was set to 50 MB. Please note that the value listed here is in kB. I changed this to a higher value (204800 to match the 200 MB in Central Administration).

<httpRuntime maxRequestLength="204800"/>

Tuesday, October 15, 2013

Error while restoring a site collection in the same content database

I wanted 2 sites to be the exact same. So I was performing a backup of a site collection http://sharepoint.fahad.com/sites/siteAand was trying to restore it as http://sharepoint.fahad.com/sites/siteB.


Backup-SPSite -Identity "http://sharepoint.fahad.com/sites/siteA" -Path "C:\ Backups\siteA.bak� -force -verbose

Restore-SPSite -Identity "http://sharepoint.fahad.com/sites/siteB" �Path "C:\ Backups\siteA.bak" -force -verbose

The restore operation failed and gave me the below error:

Restore-SPSite: The operation that you are attempting to perform cannot be completed successfully.  No content databases in the web application were available to store your site collection.  The existing content databases may have reached the maximum number of site collections, or be set to read-only, or be offline, or may already contain a copy of this site collection.  Create another content database for the Web application and then try the operation again.

Reason

Both these site collections were in the same web application and it had only one content database. Microsoft uses the source site collection GUIDs during the installation. Though you delete the site collection from the web application, it leaves the GUIDs behind, and if you try to restore same site collection (same GUID) into same web application and content database, it would throw an error.

To resolve the issue, new content database needs to be created in the web application to restore the site collection.

Resolution

1.Create a new content database WSS_Content_siteB from Central Administration for your web application where your site collection is going to reside. Reference


2.Restore-SPSite -Identity "http://sharepoint.fahad.com/sites/siteB" -Path "C:\ Backups\siteA.bak" -force -verbose -ContentDatabase WSS_Content_siteB

Monday, October 14, 2013

SharePoint 2010 Convert farm license type greyed out

I was trying to upgrade the license of SharePoint 2010 from Standard to Enterprise from Central Administration 
-> Upgrade and Migration -> Convert farm license type. The column to enter the Product key to upgrade was greyed.

How to fix this


Browse to Central Administration -> Upgrade and Migration -> Enable Enterprise Features ->Choose Enterprise. 

If the upgrade to Enterprise did not work from Central Administration, follow this post

Error upgrading Sharepoint 2010 Standard License to Enterprise License


I was working with SharePoint 2010 Standalone version and trying to upgrade the license of SharePoint 2010 from Standard to Enterprise from Central Administration GUI. .I followed the steps hereto do the upgrade from Central Administration.

This was giving me the below error

An error occurred while enabling Enterprise features. Refer to the event logs on your server machines for more details. For more information on how to fix this error, refer to help.
Click OK to return to the SharePoint Central Administration Operations page.

Resolution
1. Open command prompt. Browse to �C:\Program Files\Common Files\microsoft shared\Web Server Extensions\14\bin�. Run the below command [It takes a while to finish running this command]

PSCONFIG.EXE -cmd services -install -cmd installfeatures
2. Open SharePoint 2010 Management Shell. Run as administrator. Run the below command

Set-SPFarmConfig -InstalledProductsRefresh

3. Now browse to Central Administration -> Upgrade and Migration -> Enable Enterprise Features -> Choose Enterprise.

4. Next enable Enterprise features on all existing web applications and site collection.

You will get the below message:
SharePoint Server Enterprise Features are now being enabled on each site in your SharePoint installation. The operation will take some time to complete. The page will be periodically updated with current status. Processing will continue even if you close the page.

On completion:
Sharepoint Server Enterprise Features are now available on all sites in your SharePoint installation

5. Now browse to Central Administration -> Upgrade and Migration -> Convert farm license type.

It will show that the license has changed to Enterprise. Reference

Dependency feature 'PPSSiteCollectionMaster' for feature 'PPSSiteMaster' is not activated at this scope.

Issue

I was trying to create a new sub site under my site collection while working with Sharepoint 2010 and I got the below error message.

Dependency feature 'PPSSiteCollectionMaster' (id: a1cb5b7f-e5e9-421b-915f-bf519b0760ef) for feature
'PPSSiteMaster' (id: 0b07a7f4-8bb8-4ec0-a31b-115732b9584d) is not activated at this scope.
[Cannot provision site: http://servername/sites/site1]




Resolution

1. Go Site Actions -> Site Settings ->Site Collection Administration ->Site collection features -> PerformancePoint Services Site Collection Features -> Activate


2. Go Site Actions -> Site Settings ->Site Actions ->Manage site features -> PerformancePoint Services Site Features -> Activate


Display Name
ID
Scope
PPSSiteCollectionMaster PerformancePoint Services Site Collection Features
a1cb5b7f-e5e9-421b-915f-bf519b0760ef
Site
PPSSiteMaster PerformancePoint Services Site Features
0b07a7f4-8bb8-4ec0-a31b-115732b9584d
Web

Friday, October 11, 2013

SharePoint 2010 Error: Failed to call GetTypes on assembly Microsoft.Office.InfoPath.Server

I had installed Microsoft Office 2013 on top of SharePoint 2010 standalone version. I was trying to create a new web application and the operation failed all the time giving 404 errors and the ULS logs had errors as below : 

� Failed to call GetTypes on assembly Microsoft.Office.InfoPath.Server, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c. Could not load file or assembly �Microsoft.Office.InfoPath, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c� or one of its dependencies. The system cannot find the file specified. �

This left me nuts for couple of hours. We were working as a group and my idea was to reinstall Sharepoint and check if the problem existed before Office 2013 installation also. Because this made no sense to me. But a colleague of mine did some googling and suggested the below fix referring to here


Resolution

Uninstall Microsoft InfoPath from the Office 2013 Suite. It looks more like a compatibility issue of Sharepoint 2010 with Microsoft Office InfoPath 2013.
We did this and that helped. I was able to create new web applications :-)

Thursday, October 3, 2013

Redirecting an IIS (7.0) Website

1. Go to IIS Manager (inetmgr). Select the server name-> Expand the servername -> Expand Sites -> Select the IIS website

2. Click on the Features View (on the right hand side)

3. Below IIS ->double click on HTTP Redirect

4. Check Redirect requests to this destination. Enter the URL to where you want to redirect the users

5. Check Redirect all requests to exact destination (instead of relative to destination)


6. On the Actions tab ->click Apply and save the changes.



Propellerads