2017-05-31 120 views
0

我已经部署了我节点应用到蔚蓝的,但得到所有各方此错误消息:ERR_CONTENT_DECODING_FAILED蔚蓝的应用,维修退回ERR_CONTENT_DECODING_FAILED

我已经尝试过像把这个放入我的web.config几件事情

<urlCompression doStaticCompression="true" doDynamicCompression="true" /> 
    <httpCompression> 
     <dynamicTypes> 
     <clear /> 
     <add enabled="true" mimeType="text/*"/> 
     <add enabled="true" mimeType="message/*"/> 
     <add enabled="true" mimeType="application/x-javascript"/> 
     <add enabled="true" mimeType="application/javascript"/> 
     <add enabled="true" mimeType="application/json"/> 
     <add enabled="false" mimeType="*/*"/> 
     <add enabled="true" mimeType="application/atom+xml"/> 
     <add enabled="true" mimeType="application/atom+xml;charset=utf-8"/> 
     </dynamicTypes> 
     <staticTypes> 
     <clear /> 
     <add enabled="true" mimeType="text/*"/> 
     <add enabled="true" mimeType="message/*"/> 
     <add enabled="true" mimeType="application/javascript"/> 
     <add enabled="true" mimeType="application/atom+xml"/> 
     <add enabled="true" mimeType="application/xaml+xml"/> 
     <add enabled="true" mimeType="application/json"/> 
     <add enabled="false" mimeType="*/*"/> 
     </staticTypes> 
    </httpCompression> 

但没有任何工作。 有人可以帮忙吗?

网站我部署是这一个: https://github.com/aumanjoa/chronas-community

回答

1

我把你的网站,并部署到Azure的应用服务。将CLOUDINARY_URL值设置为应用设置和连接字符串mongo后,我得到如下错误。

enter image description here

这里是我的参考的web.config。

<?xml version="1.0" encoding="utf-8"?> 

<configuration> 
    <system.webServer> 
      <!-- Visit http://blogs.msdn.com/b/windowsazure/archive/2013/11/14/introduction-to-websockets-on-windows-azure-web-sites.aspx for more information on WebSocket support --> 
      <webSocket enabled="false" /> 
      <handlers> 
       <!-- Indicates that the app.js file is a node.js site to be handled by the iisnode module --> 
       <add name="iisnode" path="keystone.js" verb="*" modules="iisnode"/> 
      </handlers> 
      <rewrite> 
       <rules> 
        <!-- Do not interfere with requests for node-inspector debugging --> 
        <rule name="NodeInspector" patternSyntax="ECMAScript" stopProcessing="true">      
         <match url="^keystone.js\/debug[\/]?" /> 
        </rule> 

        <!-- First we consider whether the incoming URL matches a physical file in the /public folder --> 
        <rule name="StaticContent"> 
         <action type="Rewrite" url="public{REQUEST_URI}"/> 
        </rule> 

        <!-- All other URLs are mapped to the node.js site entry point --> 
        <rule name="DynamicContent"> 
         <conditions> 
           <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True"/> 
         </conditions> 
         <action type="Rewrite" url="keystone.js"/> 
        </rule> 
       </rules> 
      </rewrite> 

      <security> 
       <requestFiltering> 
        <hiddenSegments> 
         <remove segment="bin"/> 
        </hiddenSegments> 
       </requestFiltering> 
      </security> 

      <httpErrors existingResponse="PassThrough" /> 

      <iisnode watchedFiles="web.config;*.js" debuggingEnabled="false" /> 
    </system.webServer> 
</configuration> 

显然,错误与你的不同。因此,您可以确认您的应用程序在将其部署到Azure之前是否在本地正常运行。另外,请注意,gzip压缩在默认情况下处于启用状态,无需任何操作。详情请参阅Azure Web App Not Using GZip Compressiongzip compression in Windows Azure Websites

+0

感谢您的努力。我想我在我的web应用程序中错过了一些配置。我已经尝试了一个新的,现在它工作 – aumanjoa