首页 新闻 赞助 找找看

请确认正确键入了此 URL。如果此 URL 需要提供现有内容,则系统管理员可能需要添加到指定应用程序的新请求 URL 映射。

0
悬赏园豆:10 [已关闭问题] 关闭于 2011-03-04 11:16

小弟在研究SharePoint 时,碰到一个问题,

  用Windows Form Application 开发一个小程序。

   界面上一个 textbox :txtSiteUrl      一个按钮 button :btnTest

   程序中引用Microsoft.SharePoint.dll;   btnTest 事件

private void btnTest_Click(object sender, EventArgs e)
{
try
{
this.lblResult.Text = string.Empty;

if (string.IsNullOrEmpty(this.txtSiteUrl.Text))
{
ShowMessage.InfoMsg(
"Input Site Of Url Please ");
return;
}
SPSite rootCollection
= new SPSite(this.txtSiteUrl.Text.Trim());
string info = string.Format(@"Root Collection found at Url [{0}] is part of web application
[{1}] : Display name [{2}] : rootWeb name [{3}]
",
rootCollection.Url, rootCollection.WebApplication.Name,
rootCollection.WebApplication.DisplayName,
rootCollection.RootWeb
!=null ? rootCollection.RootWeb.Name :"");
this.lblResult.Text = info;
}
catch (Exception ex)
{
ShowMessage.ErrorMsg(ex);
}
}

在 txtSiteUrl.Text=http://192.168.0.113;  点击btnTest 报错如下 :

---------------------------
Error
---------------------------
找不到位于 http://192.168.0.113 的 Web 应用程序。请确认正确键入了此 URL。如果此 URL 需要提供现有内容,则系统管理员可能需要添加到指定应用程序的新请求 URL 映射。
---------------------------
确定   取消  
---------------------------

哪位大侠帮忙看看。。。 输入 http://192.168.0.113/sites/test 也是报同样的错

谢谢!

honrygao的主页 honrygao | 初学一级 | 园豆:200
提问于:2011-03-04 10:38
< >
分享
所有回答(1)
0

你这个问题找到答案了吗?

OnlyPerson | 园豆:202 (菜鸟二级) | 2013-07-18 09:53
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册