日期:2014-05-17  浏览次数:20477 次

做好的一个网站,挂到网上去不能看了,
做好了一个网站挂 到网上去了之后发现不能看了,在本地看是好的啊,我让虚拟主机管理员把错误发给我,如下:


C# code
 
Server Error in '/' Application.
  --------------------------------------------
 
  Runtime Error
  Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
 
  Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
 
 
  <!-- Web.Config Configuration File -->
 
  <configuration>
  <system.web>
  <customErrors mode="Off"/>
  </system.web>
  </configuration>
 
 
  Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
 
 
  <!-- Web.Config Configuration File -->
 
  <configuration>
  <system.web>
  <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
  </system.web>
  </configuration>




急死我了啊,这是为什么 ?管理 员说他们也己经把服务器配好了支持.net 2.0

------解决方案--------------------
web.config中怎么有两个customErrors 节点,去掉一个再看看。

放到网上去要改数据库连接字符串的
------解决方案--------------------
程序错误
框架配置问题
权限设置问题

------解决方案--------------------
不是NetFrameWork原因
把报错信息放出来。就知道了。估计权限问题
------解决方案--------------------
如果本地测试没问题的话可能是权限问题,可以模拟IIS认证帐号试试:
在<system.web>节中加入下面一行:

<identity impersonate="true"/>

试试吧,祝你好运
------解决方案--------------------
这里的Off改成On试试
<configuration> 
<system.web> 
<customErrors mode="Off"/> 
</system.web> 
</configuration> 
这里的false改成true试试
<compilation debug="false" /> 

英文的框架,太烦燥
------解决方案--------------------
改成这样试试
<customErrors defaultRedirect="ErrorPage.aspx" mode="Off">//ErrorPage.aspx是我自定义的错误页面,如果你没有,可以去掉“defaultRedirect="ErrorPage.aspx”,主要是红色的
<error statusCode="403" redirect="403.aspx"/>
<error statusCode="404" redirect="404.aspx"/>
</customErrors>
我每次发布的网站那个mode="Off"都设置成Off才可以,可能是空间服务商对权限有控制