18

我已将 azure 网站部署到美国东部位置,预留实例。我有 CustomErrors=On。经过几分钟的工作(性能相当不错),应用程序挂起,速度变慢。(我在 elmah 中没有看到任何错误。)之后开始返回 500 错误。我的自定义错误页面没有显示(我只看到“页面无法显示,因为发生了内部服务器错误。”纯文本)所以我什至无法自定义它。然后应用程序重新启动。我们不能像那样投入生产。我不知道该怎么办。

4

9 回答 9

19

我今天在 VS2013 上遇到了同样的问题。

我的 WCF-Services 网站在本地运行良好,但在发布到 Azure 时拒绝运行。

在 VS2013 Update 2 中,我导入了 Azure Publish Profile 文件,发布到 Azure,但总是收到以下消息:

The page cannot be displayed because an internal server error has occurred

即使是我的基本Default.htm文件,它显示了一个简单的“ This is default.htm ”消息,也拒绝显示,而且,我只会得到同样的消息。

解决方案

幸运的是,我有第二个 WCF 服务正确发布到 Azure,所以我将它的 web.config 文件与“错误”项目的 web.config 文件进行了比较。

我发现我需要手动将“ system.web ”部分删除为:

<system.web>
   <compilation debug="true" targetFramework="4.5" />
   <httpRuntime targetFramework="4.5" requestPathInvalidCharacters="" />
</system.web>

(它删除了大量程序集、页面\控件、httpHandlers 和 httpModules 的东西)并且还完全摆脱了“ system.webServer ”部分。

完成此操作后,我可以发布到 Azure,一切正常。

希望这可以帮助。

于 2014-06-27T09:17:15.840 回答
7

The best advice I can give to troubleshoot your problem is to check the website diagnostics logs. You can download log locally as described here.

If you use new Windows Azure Powershell 0.6.12 you can use Powershell commands to download the logs directly using the following commands:

azure site log tail [options] [name] //{Retrieves the value for the selected key}
  --filter - Filter to match against for displaying log output.
  --log - Write output in a log format.

Above command streams live diagnostic logs from your website to the console --path [path] - Path under the LogFiles folder to pull logs from.

More info on PS: https://github.com/windowsazure/azure-sdk-tools-xplat

Also you can contact Azure Websites team through forums and ask for assistance.

于 2013-03-29T19:06:58.493 回答
4

我也刚遇到这个问题。就我而言,由于手动编辑,web.config 完全无效:我更改了数据库密码并将新密码复制并粘贴到 web.config 中。

密码中有一个&符号(&),我忘记对其进行编码。

于 2015-10-08T16:07:44.247 回答
2

我遇到了同样的问题,最后通过将我的应用程序池转换为 Classic 而不是 Integrated 来解决它。我在 azure 门户上没有找到这个选项,只好打开“旧的 azure 管理平台”。

希望这可以帮助。

于 2015-02-24T14:11:29.577 回答
2

就我而言,我只是在项目属性中将目标框架从 3.5 更改为 4.5。 在此处输入图像描述

于 2017-07-04T03:51:39.147 回答
0

您可能超出了存储限制。

我的网络应用程序(WordPress)也有同样的问题,可以通过 FTP 访问我的网站并删除wp-content/ai1wm-backups文件夹中不必要的备份来修复它。

Deployment center您可以在>>中找到您的 FTP 凭据FTP credentials

于 2021-02-17T16:52:01.717 回答
0

有同样的问题 - 意识到我已经用我的 ftp 上传删除了 wwwroot 文件夹。重新创建文件夹并添加站点 - 工作。

于 2020-04-14T12:34:02.360 回答
-1

只需从 web 配置中删除 mime 类型,它就解决了

于 2017-05-30T04:40:18.240 回答
-3

这是由以下web.config文件设置 引起的自定义错误

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

这是一个自定义错误,如果您在网站上工作并且在配置自定义域后收到此错误。您应该在 azure 上启动该站点的一个新实例,然后确保在从 Visual Studio 发布网站或用于部署 Web 应用程序的任何内容之前,您已将所有内容设置为域名。

于 2015-11-28T07:18:10.007 回答