关于将asp.net程序发布到服务器上的问题
大家好:小弟将一个asp.net网站做好之后欲将其发到服务器中,在本地机器上运行良好,可是发布到服务器中后有一个页面无法显示,错误信息为:
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>
小弟现在是初学者,还请各位高手请教啊
------解决方案--------------------第段好像是说安全问题,你的服务器可能没有权限访问数据库或其它资源
第二段意义不大,是建议你在配置文件中加个出错跳转页面
------解决方案--------------------如果是刚刚运行,应该是设置问题:楼主看看IIS-》网站-》(你的网站)-》属性-》主目录-》应用程序名称,添加一个就行,
还有就是数据库的访问权限,如果你的数据库是ac的话,那么给这个ac所在目录添加aspnet用户并赋予权限。
基本这两点做好了就没有问题了