首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

服务器中的aspx无法以访问,该如何处理

2012-03-08 
服务器中的aspx无法以访问又遇到问题了!在电信开了个服务器,开始可以访问。但是到了后面(大约三四个小时以

服务器中的aspx无法以访问
又遇到问题了!
在电信开了个服务器,开始可以访问。但是到了后面(大约三四个小时以后)突然不可以了。不知道是怎么回事啊!错误页是这样的: 
 高手,麻烦给看一下吧。
网址是:www.anoonpig.cn

以下是WEB。CONFIG文件


<?xml version="1.0"?>
<!-- 
  注意: 除了手动编辑此文件以外,您还可以使用 
  Web 管理工具来配置应用程序的设置。可以使用 Visual Studio 中的
  “网站”->“Asp.Net 配置”选项。
  设置和注释的完整列表在 
  machine.config.comments 中,该文件通常位于 
  \Windows\Microsoft.Net\Framework\v2.x\Config 中
-->
<configuration>
<appSettings>
<add key="strCon" value="provider=microsoft.jet.oledb.4.0;data source="/>
<add key="dbPath" value="~/App_Data/Info.mdb"/>
</appSettings>
<system.web>
  <pages validateRequest="false" />
  <!-- 
  设置 compilation debug="true" 将调试符号插入
  已编译的页面中。但由于这会 
  影响性能,因此只在开发过程中将此值 
  设置为 true。
  -->
<compilation debug="true">
<assemblies>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation>
<!--
  通过 <authentication> 节可以配置 ASP.NET 使用的 
  安全身份验证模式,
  以标识传入的用户。 
  -->
<authentication mode="Windows"/>
<!--
  如果在执行请求的过程中出现未处理的错误,
  则通过 <customErrors> 节可以配置相应的处理步骤。具体说来,
  开发人员通过该节可以配置
  要显示的 html 错误页
  以代替错误堆栈跟踪。

  <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
  <error statusCode="403" redirect="NoAccess.htm" />
  <error statusCode="404" redirect="FileNotFound.htm" />
  </customErrors>
  -->
</system.web>
</configuration>
以下是错误:
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>
 






------解决方案--------------------


帮顶,up
[解决办法]
错误原因被禁止远程查看了,所以不能知道具体原因了。你把web.config文件里面的节点改一下,改成如下的:

XML code
<customErrors mode="Off">  </customErrors>
[解决办法]
asp.net夜话之十一:web.config详解
在开发中经常会遇到这样的情况,在部署程序时为了保密起见并不将源代码随项目一同发布,而我们开发时的环境与部署环境可能不一致(比如数据库不一样),如果在代码中保存这些配置这些信息部署时需要到用户那里更改代码再重新编译,这种部署方式非常麻烦。在.net中提供了一种便捷的保存项目配置信息的办法,那就是利用配置文件,配置文件的文件后缀一般是.config,在asp.net中配置文件名一般默认是web.config。每个web.config文件都是基于XML的文本文件,并且可以保存到Web应用程序中的任何目录中。在发布Web应用程序时web.config文件并不编译进dll文件中。如果将来客户端发生了变化,仅仅需要用记事本打开web.config文件编辑相关设置就可以重新正常使用,非常方便。本篇要讲述的知识如下:配置文件的查找优先级配置文件节点说明配置文件的操作

[解决办法]
探讨
错误原因被禁止远程查看了,所以不能知道具体原因了。你把web.config文件里面的节点改一下,改成如下的:

XML code<customErrors mode="Off">
</customErrors>


这样就能看到具体的异常描述了,然后可以找到原因修改代码了。

[解决办法]
我看已经好了啊,

热点排行