asp.net调试服务器远程 [英] asp.net Debug server remotely

查看:246
本文介绍了asp.net调试服务器远程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不断收到这个当我尝试打了一个网站,我刚刚部署到Web主机服务器的链接:

I keep getting this when I try hit the link of a website I just deployed to the web host's server:

运行时错误
说明:服务器上出现应用程序错误。此应用程序prevent当前自定义错误设置的应用程序错误,远程查看(出于安全原因)的细节。它可以,但是,可以通过在本地服务器计算机上运行的浏览器查看。

这表明我设置在我的web.config文件下面这样我就可以看到错误的详细信息:

It Suggests I set the following in my web.config file so I can see details of the error:

的当前错误页您看到可以用自定义错误页通过修改应用程序的配置标记的defaultRedirect属性,使之指向自定义错误页的URL来代替。

所以我增加了以下到我的webconfig文件,并创建相对于Web.config文件中mycustompage.htm:

So I have added the following to my webconfig file and created a mycustompage.htm relative to the web.config file:

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

我的mycustompage.htm 是空的,有什么我应该在那里补充的吗?当我尝试打的链接,现在我得到的是一个空白页服务器试图重定向到mycustompage.htm后。

My mycustompage.htm is empty, is there anything I should add in there? When I try hit the link now all I get is a blank page after the server tries to redirect to mycustompage.htm.

推荐答案

根据您要完成的:

1)你想查看实际的错误信息。

1) You want to view the actual error information.

在这种情况下,删除的defaultRedirect属性,改变模式关闭。自定义错误拦截死亡(YSOD)ASP.NET错误页的标准黄屏。通过设置自定义错误关闭,YSOD错误消息将是可见的本地和远程客户端(所有远程用户就会看到错误的详细信息)。

In this case, remove the defaultRedirect attribute and change mode to Off. Custom errors intercept the standard Yellow Screen of Death (YSOD) ASP.NET error page. By setting Custom errors to Off, the YSOD error message will be visible to both local and remote clients (all remote users will see the error details).

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

2)你想建立一个自定义错误页来处理你的应用程序如何响应错误条件。

2) You want to build a custom error page to handle how your application responds to error conditions.

在这种情况下,您可以编辑mycustompage.htm显示友好的发生错误的信息,而不是看到默认的自定义错误未启用的消息。

In this case, you might edit the mycustompage.htm to display a friendly "An error has occurred" message rather than seeing the default Custom Errors are not enabled message.

链接这里以供参考。

这篇关于asp.net调试服务器远程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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