我在webconfig文件上出错了 [英] i got error on webconfig file

查看:80
本文介绍了我在webconfig文件上出错了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



当我点击我的数据库连接页面时,我收到了这样的错误。

其他页面在本地主机上正常工作正常工作。

'/'应用程序中的服务器错误。 
运行时错误
描述:服务器上发生应用程序错误。此应用程序的当前自定义错误设置可防止远程查看应用程序错误的详细信息(出于安全原因)。但是,它可以由运行在本地服务器计算机上的浏览器查看。

详细信息:要在远程计算机上查看此特定错误消息的详细信息,请创建< customErrors > 标记位于当前Web应用程序根目录中的web.config配置文件中。此< customErrors > 标记应该然后将其mode属性设置为Off。


<! - Web.Config配置文件 - >

< 配置 >
< system.web >
< customErrors mode = / >
< / system。网站 >
< / configuration >


注意:您看到的当前错误页面可以替换通过修改应用程序的< customErrors > 配置标记,指向自定义错误页面网址。


<! - Web.Config配置文件 - >

< 配置 >
< system.web >
< customErrors mode = RemoteOnly defaultRedirect = mycustompage.htm < span class =code-keyword> / >
< / system.web >
< / configuration >









谢谢&问候

Umesh Daiya

解决方案

替换此

 <  配置 >  
< system.web >
< customErrors 模式 = RemoteOnly defaultRedirect = mycustompage.htm / >
< / system.web >
< / configuration >







to < br $> b $ b

 <  配置 >  
< system.web >
< customErrors mode = 关闭 / >
< / system.web >
< / configuration >







它应该工作


你好b $ b

Plz参考这些链接



http://aspforums.net/Threads/177016/An-application-error-occurred-on-the-server-The-current-custom-error -settings / [ ^ ]



http://forums.asp。净/ T / 1149763.aspx?当前+定制+误差+设置+为这+应用+防止+的+细节+ +的+申请ication +错误+来自+正在+正在观看+远程+ [ ^ ]


< blockquote>错误消息足以告诉导致此问题的主要原因。这是您要求的拒绝报告。您想要查看您的网站的详细信息,该信息被服务器拒绝。您可以转到主机提供商控制面板并查找用于查看应用程序错误的设置。或者只是设置这个,



< configuration> 
< system.web>
< ;! - 设置要在远程连接上查看的customErrors。 - >
< customerrors mode =RemoteOnly/>
< /system.web>
< / configuration>





这可以让你看到远程连接上的错误。您还可以在官方IIS论坛上提出此类问题。


Hi,
I got error like this when i click on my database connection page.
other page working fine while on local host its working properly.

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>





Thanks & Regards
Umesh Daiya

解决方案

Replace this

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>




to

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>




it should work


Hi
Plz refer these links

http://aspforums.net/Threads/177016/An-application-error-occurred-on-the-server-The-current-custom-error-settings/[^]

http://forums.asp.net/t/1149763.aspx?Current+custom+error+settings+for+this+application+prevent+the+details+of+the+application+error+from+being+viewed+remotely+[^]


The error message is enough for telling the main reason that caused this trouble for you. This is a denial report for you request. You wanted to view the details for your website, which is denied by the server. You can go to your hosting providers Control Panel and look for settings for viewing the application errors. Or just set this,

<configuration>
    <system.web>
        <!-- Set the customErrors to be viewed on the remote connections. -->
        <customerrors mode="RemoteOnly" />
    </system.web>
</configuration>



This would let you see the errors on the remote connections. You can furthermore ask such questions on Offical IIS Forums.


这篇关于我在webconfig文件上出错了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆