【发布时间】:2014-08-29 05:03:21
【问题描述】:
我正在尝试将我在 Visual Studio 2010 中开发的 SharePoint Web 部件部署到 SharePoint 2010 服务器上。问题是当我去 IIS 中的 .svc 文件并浏览它时,我收到错误:
HTTP 错误 500.19 - 内部服务器错误 请求的页面无法访问,因为该页面的相关配置数据无效。
页面上有一个链接告诉我,我的 web.config 中有一个格式错误的 XML 元素。但我没有看到:
asd
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<identity impersonate="true" userName="******\*******" password=*******>
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true"/>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
我不确定是什么原因造成的。我在 IIS 中为一个类似的项目设置了一个应用程序池,该项目具有完全相同的 web.config(有一些小的名称更改)并且可以正常工作。两者都在默认网站下(并且需要)。我应该怎么办?我应该去哪里看?
【问题讨论】:
-
在XML记事本中能否成功打开web.config文件?如果有错误,它应该会提示您。重命名为 .xml 并尝试在 firefox 中打开也会显示遇到的任何错误。
-
使用 XML 记事本而不更改为 .xml 会留下除第一行以外的所有内容。我似乎无法更改文件扩展名..
标签: asp.net iis sharepoint