Azure上的经典ASP网站“由于发生内部服务器错误,无法显示该页面。”

时间:2022-01-01 01:55:26

We have migrated an application written in classic asp to Azure websites (shared) and some pages simply give the error "The page cannot be displayed because an internal server error has occurred." with out any details. These pages work fine under IIS 7 or using IIS express. How ever on Azure website they do not.

我们已将使用经典asp编写的应用程序迁移到Azure网站(共享),有些页面只是提供错误“由于发生内部服务器错误,无法显示页面”。没有任何细节。这些页面在IIS 7或使用IIS express下工作正常。但是在Azure网站上他们没有。

As suggested in some other posts I have configured the following for the website on Azure:

正如在其他一些帖子中所建议的那样,我为Azure上的网站配置了以下内容:

1) Web Server Logging - ON
2) Detailed Error Messages - ON
3) Web.config - customErrors mode to off.

1)Web服务器日志记录 - ON 2)详细的错误消息 - ON 3)Web.config - customErrors模式关闭。

<customErrors mode="Off"/>
 <compilation debug="true" targetFramework="4.0">

Still the log messages do not provide any more details what is wrong and simply gives the following information:

日志消息仍然没有提供任何更多细节错误,只是提供以下信息:

Detailed Error Information:

详细错误信息:

Module IsapiModule
Notification ExecuteRequestHandler
Handler ASPClassic
Error Code 0x00000000

模块IsapiModule通知ExecuteRequestHandler处理程序ASPClassic错误代码0x00000000

Any help is appreciated how to debug the classic asp pages issues on Azure websites. Thank you.

任何帮助是如何调试Azure网站上的经典asp页面问题。谢谢。

5 个解决方案

#1


2  

  1. You problem might be on the browser side: make sure that the IE setting to "show friendly messages" is turned off
    Azure上的经典ASP网站“由于发生内部服务器错误,无法显示该页面。”

    问题可能出在浏览器端:确保IE设置为“显示友好消息”已关闭

  2. Also, on the server side, you must have some setting to allow error messages to be sent to client (sorry, I only have access to the IIS flavor of that setting... not sure what's in Azure):
    Azure上的经典ASP网站“由于发生内部服务器错误,无法显示该页面。”

    此外,在服务器端,您必须有一些设置允许将错误消息发送到客户端(抱歉,我只能访问该设置的IIS风格...不确定Azure中的内容):

#2


11  

Thank you G. Stoynev! It worked after adding the custom error asp page! I used the code from the following link to create custom error asp page

http://support.microsoft.com/kb/224070

Also the following link as well helped http://www.tacticaltechnique.com/web-development/classic-asp-getlasterror-in-iis7/

Now the system.webServer section in my web.config looks as follows:

谢谢G. Stoynev!它添加自定义错误asp页面后工作!我使用以下链接中的代码创建自定义错误asp页面http://support.microsoft.com/kb/224070以下链接也帮助http://www.tacticaltechnique.com/web-development/classic- asp-getlasterror-in-iis7 /现在我的web.config中的system.webServer部分如下所示:

<system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules runAllManagedModulesForAllRequests="true"/>
    <httpErrors> 
     <remove statusCode="500" subStatusCode="100" />
     <error statusCode="500" subStatusCode="100" prefixLanguageFilePath="" path="/errors.asp" responseMode="ExecuteURL" /> 
   </httpErrors> 
  </system.webServer>

#3


7  

One (odd) thing to try, which worked for me:

一个(奇怪的)尝试,这对我有用:

Try FTP'ing onto your Azure website, and rename your web.config to something completely different.

尝试FTP到您的Azure网站,并将您的web.config重命名为完全不同的东西。

I renamed mine to web.config2 - the Azure "The page cannot be displayed because an internal server error has occurred." error message disappeared, and my ASP.Net application burst into life again.

我将我的名称重命名为web.config2 - Azure“由于发生了内部服务器错误,因此无法显示该页面。”错误消息消失了,我的ASP.Net应用程序再次爆发。

From there, I recreated the web.config from scratch, copying chunks of it from my original version, piece by piece (to see what was causing the problem)

从那里,我从头开始重新创建web.config,从原始版本一块一块地复制它的块(看看导致问题的原因)

Yeah, I know... it's a dumb suggestion, but Azure was giving me no hints about what was causing the error, even with logging turned on, and this saved my sanity !!

是的,我知道......这是一个愚蠢的建议,但Azure没有给我任何关于导致错误的原因的暗示,即使开启了日志记录,这也节省了我的理智!

#4


0  

I solved it by turning on the Application log under Logging => Diagnostics log in the Azure web app configuration.

我通过打开Azure Web应用程序配置中的Logging => Diagnostics日志下的Application日志解决了这个问题。

You can then see the error in the "Log stream" pane and fix it.

然后,您可以在“日志流”窗格中看到错误并进行修复。

In my case the error where the following two lines in the web.config:

在我的情况下,web.config中以下两行的错误:

<add name="ExtensionlessUrlHandler-Integrated-4.0" 
 path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" 
 preCondition="integratedMode,runtimeVersionv4.0"/>
<remove name="ExtensionlessUrlHandler-Integrated-4.0"/>

I removed them and it worked again.

我删除了它们,它再次起作用。

#5


0  

If you're trying to configure your site where you don't have access to IIS, such as an Azure Web App, you can configure Classic ASP settings in the Web.Config.

如果您尝试将站点配置为无法访问IIS的站点(例如Azure Web App),则可以在Web.Config中配置经典ASP设置。

Under

<system.webServer>

You can place an

你可以放置一个

<asp>

element which configures various things with how Classic operates.

这个元素用经典的运作方式配置各种各样的东西。

The property which was affecting my site was

影响我网站的财产是

**appAllowDebugging="true"**

While this property is fine and dandy when you're developing with Visual Studio and have a Just-In-Time debugger installed, it messes up the error handling for Classic Asp.

虽然当您使用Visual Studio进行开发并且安装了即时调试器时,此属性很好并且花花公子,但它会混淆Classic Asp的错误处理。

BTW, took me forever to figure out what I changed.

顺便说一句,带我永远弄清楚我改变了什么。

#1


2  

  1. You problem might be on the browser side: make sure that the IE setting to "show friendly messages" is turned off
    Azure上的经典ASP网站“由于发生内部服务器错误,无法显示该页面。”

    问题可能出在浏览器端:确保IE设置为“显示友好消息”已关闭

  2. Also, on the server side, you must have some setting to allow error messages to be sent to client (sorry, I only have access to the IIS flavor of that setting... not sure what's in Azure):
    Azure上的经典ASP网站“由于发生内部服务器错误,无法显示该页面。”

    此外,在服务器端,您必须有一些设置允许将错误消息发送到客户端(抱歉,我只能访问该设置的IIS风格...不确定Azure中的内容):

#2


11  

Thank you G. Stoynev! It worked after adding the custom error asp page! I used the code from the following link to create custom error asp page

http://support.microsoft.com/kb/224070

Also the following link as well helped http://www.tacticaltechnique.com/web-development/classic-asp-getlasterror-in-iis7/

Now the system.webServer section in my web.config looks as follows:

谢谢G. Stoynev!它添加自定义错误asp页面后工作!我使用以下链接中的代码创建自定义错误asp页面http://support.microsoft.com/kb/224070以下链接也帮助http://www.tacticaltechnique.com/web-development/classic- asp-getlasterror-in-iis7 /现在我的web.config中的system.webServer部分如下所示:

<system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules runAllManagedModulesForAllRequests="true"/>
    <httpErrors> 
     <remove statusCode="500" subStatusCode="100" />
     <error statusCode="500" subStatusCode="100" prefixLanguageFilePath="" path="/errors.asp" responseMode="ExecuteURL" /> 
   </httpErrors> 
  </system.webServer>

#3


7  

One (odd) thing to try, which worked for me:

一个(奇怪的)尝试,这对我有用:

Try FTP'ing onto your Azure website, and rename your web.config to something completely different.

尝试FTP到您的Azure网站,并将您的web.config重命名为完全不同的东西。

I renamed mine to web.config2 - the Azure "The page cannot be displayed because an internal server error has occurred." error message disappeared, and my ASP.Net application burst into life again.

我将我的名称重命名为web.config2 - Azure“由于发生了内部服务器错误,因此无法显示该页面。”错误消息消失了,我的ASP.Net应用程序再次爆发。

From there, I recreated the web.config from scratch, copying chunks of it from my original version, piece by piece (to see what was causing the problem)

从那里,我从头开始重新创建web.config,从原始版本一块一块地复制它的块(看看导致问题的原因)

Yeah, I know... it's a dumb suggestion, but Azure was giving me no hints about what was causing the error, even with logging turned on, and this saved my sanity !!

是的,我知道......这是一个愚蠢的建议,但Azure没有给我任何关于导致错误的原因的暗示,即使开启了日志记录,这也节省了我的理智!

#4


0  

I solved it by turning on the Application log under Logging => Diagnostics log in the Azure web app configuration.

我通过打开Azure Web应用程序配置中的Logging => Diagnostics日志下的Application日志解决了这个问题。

You can then see the error in the "Log stream" pane and fix it.

然后,您可以在“日志流”窗格中看到错误并进行修复。

In my case the error where the following two lines in the web.config:

在我的情况下,web.config中以下两行的错误:

<add name="ExtensionlessUrlHandler-Integrated-4.0" 
 path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" 
 preCondition="integratedMode,runtimeVersionv4.0"/>
<remove name="ExtensionlessUrlHandler-Integrated-4.0"/>

I removed them and it worked again.

我删除了它们,它再次起作用。

#5


0  

If you're trying to configure your site where you don't have access to IIS, such as an Azure Web App, you can configure Classic ASP settings in the Web.Config.

如果您尝试将站点配置为无法访问IIS的站点(例如Azure Web App),则可以在Web.Config中配置经典ASP设置。

Under

<system.webServer>

You can place an

你可以放置一个

<asp>

element which configures various things with how Classic operates.

这个元素用经典的运作方式配置各种各样的东西。

The property which was affecting my site was

影响我网站的财产是

**appAllowDebugging="true"**

While this property is fine and dandy when you're developing with Visual Studio and have a Just-In-Time debugger installed, it messes up the error handling for Classic Asp.

虽然当您使用Visual Studio进行开发并且安装了即时调试器时,此属性很好并且花花公子,但它会混淆Classic Asp的错误处理。

BTW, took me forever to figure out what I changed.

顺便说一句,带我永远弄清楚我改变了什么。