Web应用程序项目 [英] web application projects

查看:73
本文介绍了Web应用程序项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我有网络应用程序项目它在本地机器上工作正常,但是当我将它上传到服务器然后我就是低于错误



运行时错误

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



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

Hi to all,

I have web application project it''s workgin fine in local machine, but when i upload it to the server then i mee the below error

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>



注意:您看到的当前错误页面可以通过修改应用程序的defaultRedirect属性来替换为自定义错误页面;&的customErrors GT;配置标记指向自定义错误页面URL。


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>





我知道这意味着将自定义错误模式更改为关闭,我也在web.config中执行相同的代码但也返回相同的错误,有时我将模式更改为ON / Remoteonly但也返回相同的错误,我可以从服务器或由于我的代码知道这个错误吗?,如何解决? memebrs帮助我



I know this means to change the custom error mode as off, i also do the same code in my web.config but also return the same error, some time i change the mode into ON / Remoteonly but also return the same error, may i know this error from server or due to my code?, how to solve it ? memebrs help me

推荐答案

你确定你的WEB应用程序中有任何记录器功能吗?

首先我可以建议你记录任何错误方法到达

Did you ensures any logger capability in your WEB App??
First thing i can advise to you log any error that arrives in method
protected void Application_Error(object sender, EventArgs e)  





要覆盖此方法,请打开global.asax和do方法声明。



作为日志系统的核心,你可以利用log4net或NLog第三方程序集。

这个可能对你有帮助。



我想到的另一种想法,

你在网络解决方案中使用第三方库吗? ?

如果是,那么,在这种情况下你可能忘了将它部署到远程服务器上?



To override this method open global.asax and do method declaration.

As core of log system you can leverage either log4net or NLog third-party assemblies.
This might be helpful for U.

Another thought that came to my mind,
Do you use a third-party libraries in you web solution ?
if yes , so, in such case maybe you forgot to deploy it to remote server??


这篇关于Web应用程序项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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