应用程序中的服务器错误 [英] server error in application

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

问题描述

大家好,

我刚刚将我的ASP.NET应用程序上传到了新的虚拟主机上.但是现在每当我加载任何.aspx页时,都会出现此错误:

"/"应用程序中的服务器错误.
运行时错误


说明:服务器上发生了应用程序错误.该应用程序的当前自定义错误设置可防止出于安全原因而远程查看该应用程序错误的详细信息.但是,可以由运行在本地服务器计算机上的浏览器查看它.

详细信息:要使此特定错误消息的详细信息在远程计算机上可见,请创建< customErrors>位于当前Web应用程序根目录中的"web.config"配置文件中的标记.此< customErrors>标签应将其模式"属性设置为关".

Hi everyone,

I''ve just uploaded my ASP.NET application on a new web host. But now whenever I load any .aspx page, I get this error:

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>


注意:可以通过修改应用程序的< customErrors>的"defaultRedirect"属性,将当前看到的错误页面替换为自定义错误页面.配置标记以指向自定义错误页面URL.

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


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主机以及我的本地主机上运行良好.我的web.config包括:


It was running perfectly on the previous web host as well as my localhost. My web.config includes:

<configuration>
<system.web>
...
<customErrors mode="RemoteOnly" defaultRedirect="~/Error.aspx" />
<compilation debug="true" defaultLanguage="c#">
...
</compilation>
...
</system.web>
</configuration>


我已经看过这篇文章.我已经尝试过:

将customErrors标记更改为:<customErrors mode="On" />

将customErrors标记更改为:<customErrors mode="Off" />

将编译标记更改为:<compilation debug="false" defaultLanguage="c#">

要求我的网络托管公司确保我的ASP.NET版本为2.0.xxx.

要求我的Web主机确保包含我的.aspx文件的文件夹是单独的虚拟
IIS下的目录.

它们都不能解决问题.我无权访问Web服务器的管理员设置(甚至没有Plesk面板).

我要进行的每项更改都必须通过电子邮件发送给网络托管公司.

我还可以做些什么?感谢您的帮助.


I have read this post already. I have already tried:

Changing customErrors tag to: <customErrors mode="On" />

Changing customErrors tag to: <customErrors mode="Off" />

Changing compilation tag to: <compilation debug="false" defaultLanguage="c#">

Asking my web hosting company to ensure that my ASP.NET version is 2.0.xxx.

Asking my web host to ensure that the folder containing my .aspx files is a separate Virtual
Directory under IIS.

All of them do not solve the problem. I don''t have any access to the web server''s admin settings (not even a Plesk panel).

I have to email the web hosting company for every change I want to make.

What else can I do? Thanks for the help.

推荐答案

执行错误提示.

在web.config中将customError模式设置为OFF
Do what error suggest.

Set your customError Mode to OFF in web.config
<customErrors mode="Off"/>


然后检查哪一行给您错误.

可能是假人错误.


and then check which line give you error.

it may be Impersonte error.


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

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