开发者

Filenotfound exception while opening an SPSite object - x64

I've created a simple asp.net application to open a site and display the title of the corresponding web. But i'm getting FileNotFoundE开发者_StackOverflow社区xception while trying to open the site. The same code works perfectly when i run it in a console app.

My spec

Windows Server 2008 R2 x64, SharePoint 2007 x64, Visual Studio 2005

My target for the asp.net app is set to 'Any CPU'.

As far as permissions is considered i've checked that the current identity using under which VS2005 hosts the asp.net app is having full rights. In fact i've used the same identity for app pools in IIS.

As an asp.net web application

Filenotfound exception while opening an SPSite object - x64

As a console application

Filenotfound exception while opening an SPSite object - x64

Any ideas?

Code

using (SPSite site = new SPSite("http://dev01/"))
{
    using (SPWeb web = site.OpenWeb())
    {
         Response.Write(web.Title);
    }
}


Right click on the solution -->proterties-->Debug-->Start browser with url->here provide the url (("http://dev01/").


When developing a solution for SharePoint 2007 with VS 2010 i'm getting this problem. When i create the same solution with VS 2005 i dont have any issues. I guess some of the dlls are mismatching between x86 and x64. Guess i would need to tweak a bit to make VS 2010 working with SharePoint 2007.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜