您的位置:首页 > 其它

从控制台测试SharePoint遇到的两个问题

2012-07-09 16:05 288 查看
1、明明已经引用了SharePoint的相关dll,但扔报找不到SPSite等类。其原因是控制台程序在VS2010下默认使用的.Net Framework是4.0,而SharePoint是使用的3.5的框架,所以需要将控制台使用的框架也改成3.5。

2、SPSite site = new SPSite("http://win-2n2ujh16hsg/");报“The Web application at could not found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.”错误,在确认地址没错的前提下,检查控制台的Build输出的是否为X64,如果不是的话就会报这个错误,原因是SharePoint2010必需是在64位下运行。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐