【发布时间】:2015-06-13 10:04:44
【问题描述】:
我正在使用 VS2012,本地机器上的网站工作正常,当我在远程 PC / 服务器上部署网站时,当您在服务器计算机的 localhost 上运行时它也工作正常,然后当您远程访问它时出现问题具有静态/直播IP。它给出了以下配置错误。
部署在以下路径中
inetpub > wwwroot > PSE
我还在 inetpub > wwwroot > POS 中部署了一个网站,效果很好
这是网站结构
这是根目录下唯一的一个web.config文件
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="MySql.Data, Version=6.9.6.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>
</assemblies>
</compilation>
<httpRuntime targetFramework="4.0"/>
<authentication mode="Forms">
<forms defaultUrl="~/dao/pos.aspx" loginUrl="~/default.aspx" timeout="20" slidingExpiration="true"></forms>
</authentication>
</system.web>
</configuration>
请指导我,我错在哪里以及为什么我会遇到错误。
这里是 IIS 配置
【问题讨论】:
-
获取导致问题的实际错误对您很有用。我看到您将
customErrors设置为关闭,但您没有收到错误信息。按照下面文章中的解决方案,实际上可以让您看到错误并(可能)为您指明正确的方向:stackoverflow.com/questions/101693/customerrors-mode-off -
我们需要更多信息,这是一个一般性错误。您是否有权访问此服务器以在本地浏览?或者只是触发自定义错误几秒钟stackoverflow.com/questions/101693/customerrors-mode-off
-
它不会影响你的错误,但是从编译标签中删除
debug="true",它可能会影响你的生产网站的性能 -
我已按照上述链接中给出的说明进行操作,即
,现在我得到以下有关错误的附加信息。 在 machine.config 之外使用注册为 allowDefinition='MachineOnly' 的部分是错误的。 (C:\inetpub\wwwroot\pce\web.config 第 18 行) -
你可以访问你服务器的 machine.config 吗?