在web.config中将customErrors的mode设置为Off试试
<customErrors mode="Off"/>
web.config中原先没有这个配置,直接加上就可以了吗?
@wode301: 直接加上就可以
服务器有问题,可能是IIS配置问题,也可能是代码问题。。
在win7下能运行正常,在xp下就报这个错误,应该不是系统的问题吧?
@wode301: 上截图。。把错误信息详细贴出来~~~
@路过秋天:
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中没有
<customErrors mode="Off"/> 的配置
win7是IIS7 在 win7下能正常运行,XP下不能,应该和经典模式 、 集成模式有关系
那改成经典还是集成呢?