Saturday, September 8, 2012

File Not Found error in SharePoint 2010

In this post we will discuss how to resolve File not found error in SharePoint 2010.

Also you can check out:

- Programmatically get SharePoint Themes

- Bind dropdownlist from SharePoint list in InfoPath 2010

- Correlation ID in SharePoint 2010

I got the File Not Found error in SharePoint 2010.

Web Parts Maintenance Page: If you have permission, you can use this page to temporarily close Web Parts or remove personal settings. For more information, contact your site administrator.

Troubleshoot issues with Microsoft SharePoint Foundation.

Correlation ID: ed7664ef-5896-4df5-865b-9feed32468ab

Actually I deployed a visual web part that I made using Visual Studio 2010. When I deploy the web part and try to add in the page I got the above error.

There can be any reason for this like:

- As we know SharePoint 2010 supports .Net framework version 3.5, If we have selected the .Net framework version to 4.0 then we might got the issue.
- Another reason might be the Target framework. There are 3 target framework version like: x64, x86 and Any CPU. As SharePoint 2010 supports x64 only, so If you have selected target framework to x86 then the error might appear. The safiest approach is to choose target framework to Any CPU.

- Last reason, the way I solved the issue is quite different which is not related to any .Net framework. My visual web part contains some code like:

using (SPSite siteCollection = new SPSite("http://bsahoo3:2500/sites/TestSiteCollection/"))

Here I have given one site URL but I am deploying and trying to add the web part in a different URL. Once I changed the URL I did not got that issue.

No comments:

Post a Comment