2014-08-28 73 views
0

我试图将我在Visual Studio 2010中开发的SharePoint Web部件部署到SharePoint 2010服务器上。问题是,当我转到IIS中的.svc文件并浏览它时,我收到错误:IIS中的HTTP错误500.19 - 如何解决这个问题?

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(有一些小的名称更改),并且工作正常。两者都在默认网站(并且需要)下。我该怎么办?我应该在哪里看?

+0

您可以在XML记事本中成功打开web.config文件吗?它应该会提示你是否有错误。重命名为.xml并尝试在Firefox中打开时也应该显示遇到的任何错误。 – ssnobody 2014-08-28 19:19:25

+0

使用XML记事本而不更改为.xml会将第一行的所有内容都留空。我似乎无法更改文件扩展名.. – Chris 2014-08-28 20:14:47

回答

0

我刚刚意识到它:我必须右键单击Web应用程序项目,转到Web选项卡,然后单击选项以“使用本地IIS Web服务器”。