Thursday, June 24, 2010

HTTP 404 Not Found when opening a file that has "+" in its name in Internet Explorer from SharePoint Document Library

A user came to me complaining that she is getting HTTP 404 Not Found in Internet Explorer when clicking a pdf document in a SharePoint Document Library to view it, as shown below:












Note: SharePoint won't allow you to upload any documents that have the following special characters as shown in the screen shot below:





After further investigation and testing, I came to the following conclusion. Although you can upload a document to a SharePoint Document Library that has "+" sign in its name (ex. filename+). However, when you try to view or open the document in a web browser we get the HTTP 404 error. I believe this is "By Design" and the workaround would be to rename the file by removing the "+" sign and users would be able to view the document in a web browser.

Monday, June 14, 2010

Deleting site collection from User Interface (UI) in SharePoint 2010

I was doing some tests concerning backup/restore a site collection and came across this issue. But before showing the issue, I did the following steps:

1. Took a backup of the site collection using stsadm command:

stsadm -o backup -URL -filename


2. Deleted the site collection from Central Administration site.

When I tried to restore the site collection using stsadm command (MS is trying to deprecate stsadm) stsadm -o backup -URL -filename   I got the following message:






Trired the same thing using Powershell command:

Restore-SPSite -Identity  -Path 


Note that when you try to delete the site collection either from Central Admin or the site's site action menu you get the following message:


So, it looks like by deleting the site via the UI it uses the gradualdelete parameter. So, if we you stsadm command without the gradual delete option
stsadm -o deletesite -URL
Or Powershell command:
Remove-SPSite -Identity 


The site collection will be deleted instantly without waiting for the timer job (Technet has a good article describing the gradual deleting timer job) to gradually deleting the site.

In my scenario it took a lot of time for the timer job to delete the site (deleting the site from the UI) in my case it took hours for OOTB site restoration (i left the site overnight and I was able to restore the site the next morning)


In short, if you are trying to delete the site from the UI and restore it again to the same farm and same content database, it will take a lot of time since UI by default will use the gradualdelete parameter or you could create/add a new content database and restore the site to the newly created/added database (Note: make sure to take the database offline before restoring the site to the newly created/added database).