问题描述
在客户端访问网站时,页面经常出现如下错误,但是在本机的代码生成的系统上却没有,怎么解决?谢谢错误如下:runtimeerrordescription:anapplicationerroroccurredontheserver.thecurrentcustomerrorsettingsforthisapplicationpreventthedetailsoftheapplicationerrorfrombeingviewedremotely(forsecurityreasons).itcould,however,beviewedbybrowsersrunningonthelocalservermachine.details:toenablethedetailsofthisspecificerrormessagetobeviewableonremotemachines,pleasecreatea<customerrors>tagwithina"web.config"configurationfilelocatedintherootdirectoryofthecurrentwebapplication.this<customerrors>tagshouldthenhaveits"mode"attributesetto"off".<!--web.configconfigurationfile--><configuration><system.web><customerrorsmode="off"/></system.web></configuration>notes:thecurrenterrorpageyouareseeingcanbereplacedbyacustomerrorpagebymodifyingthe"defaultredirect"attributeoftheapplications<customerrors>configurationtagtopointtoacustomerrorpageurl.<!--web.configconfigurationfile--><configuration><system.web><customerrorsmode="remoteonly"defaultredirect="mycustompage.htm"/></system.web></configuration>
解决方案
解决方案二:
你本机上是2.0的吧```你在发布的IIS上设置下该虚拟目录的属性的ASP.NET选项中的ASP.NET设置为2.0就行了``IIS-->虚拟目录-->右键-->属性-->ASP.NET选项卡-->ASP.NET-->2.0
解决方案三:
你本机调试的时候使用IIS了吗,虚拟目录设置了吗
解决方案四:
<configuration><system.web><customerrorsmode="off"/></system.web></configuration>
解决方案五:
引用3楼jzywh的回复:
<configuration><system.web><customerrorsmode="off"/></system.web></configuration>
把customerrrors关掉,再查看错误页信息
解决方案六:
把customerrors的mode设成Off,看一下异常信息是什么就知道了