[英]angular app hosted on azure app service crashes on chrome only
我有一個Webapi / Angular網站托管在同一天藍色的appservice上。 因此/ site / api具有我的身份驗證令牌和其他API。 / site / app有我的角度應用程序。
在我們的暫存中,問題在於這不是azure應用程序服務,而是帶有IIS 7的Windows 2012 VM,一切正常。 我在IE,firefox,chrome和safari上運行有角度的網站,並且在任何地方都沒有問題。
但是后來我瀏覽了我在azure網站上托管的應用程序,在我撥打過$ http的某些地方,Chrome瀏覽器始終崩潰。 我得到內部服務器500,但正在嘗試,但看不到更多詳細信息。 在IE和firefox上瀏覽時,在azure網站上托管的同一個角度應用程序不會給我任何錯誤。 我還向我的web.config中添加了動詞OPTION,但沒有幫助。
error seen in chrome :
{Message: "An error has occurred."}
Message :"An error has occurred."
謝謝。
更多日志數據:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="WWW Server" Guid="{3A2A4E84-4C21-4981-AE10-3FDA0D9B0F83}"/>
<EventID>0</EventID>
<Version>1</Version>
<Level>3</Level>
<Opcode>16</Opcode>
<Keywords>0x100</Keywords>
<TimeCreated SystemTime="2016-06-21T04:25:31.841Z"/>
<Correlation ActivityID="{00000000-0000-0000-9D0F-0080000000E9}"/>
<Execution ProcessID="76" ThreadID="5400"/>
<Computer>RD0003FF853E2D</Computer>
</System>
<EventData>
<Data Name="ContextId">{00000000-0000-0000-9D0F-0080000000E9}</Data>
<Data Name="ModuleName">__DynamicModule_Microsoft.Owin.Host.SystemWeb.OwinHttpModule, Microsoft.Owin.Host.SystemWeb, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35_53f2659e-bb7a-4b20-8ef3-c37bb14b89e2</Data>
<Data Name="Notification">64</Data>
<Data Name="HttpStatus">500</Data>
<Data Name="HttpReason">Internal Server Error</Data>
<Data Name="HttpSubStatus">0</Data>
<Data Name="ErrorCode">0</Data>
<Data Name="ConfigExceptionInfo"></Data>
</EventData>
<RenderingInfo Culture="en-US">
<Opcode>MODULE_SET_RESPONSE_ERROR_STATUS</Opcode>
<Keywords>
<Keyword>RequestNotifications</Keyword>
</Keywords>
<freb:Description Data="Notification">PRE_EXECUTE_REQUEST_HANDLER</freb:Description>
<freb:Description Data="ErrorCode">The operation completed successfully.
(0x0)</freb:Description>
</RenderingInfo>
<ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">
<EventGuid>{002E91E3-E7AE-44AB-8E07-99230FFA6ADE}</EventGuid>
</ExtendedTracingInfo>
</Event>
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="WWW Server" Guid="{3A2A4E84-4C21-4981-AE10-3FDA0D9B0F83}"/>
<EventID>0</EventID>
<Version>1</Version>
<Level>5</Level>
<Opcode>49</Opcode>
<Keywords>0x0</Keywords>
<TimeCreated SystemTime="2016-06-21T04:25:31.841Z"/>
<Correlation ActivityID="{00000000-0000-0000-9D0F-0080000000E9}"/>
<Execution ProcessID="76" ThreadID="5400"/>
<Computer>RD0003FF853E2D</Computer>
</System>
<EventData>
<Data Name="ContextId">{00000000-0000-0000-9D0F-0080000000E9}</Data>
<Data Name="Buffer">{"Message":"An error has occurred."}</Data>
</EventData>
<RenderingInfo Culture="en-US">
<Opcode>GENERAL_RESPONSE_ENTITY_BUFFER</Opcode>
</RenderingInfo>
<ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">
<EventGuid>{D42CF7EF-DE92-473E-8B6C-621EA663113A}</EventGuid>
</ExtendedTracingInfo>
</Event>
HTTP Error 500.0 - Internal Server Error The page cannot be displayed because an internal server error has occurred.Detailed Error Information: Module __DynamicModule_Microsoft.Owin.Host.SystemWeb.OwinHttpModule, Microsoft.Owin.Host.SystemWeb, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35_53f2659e-bb7a-4b20-8ef3-c37bb14b89e2 Notification PreExecuteRequestHandler Handler System.Web.Http.WebHost.HttpControllerHandler Error Code 0x00000000 Logon Method Bearer Logon User admin
cors設置被關閉。 更新web.config到下面修復它。
<add key="webpages:Version" value="2.0.0.0" />
<add key="CORSOrigins" value="https://domainname.net" />
<add key="CORSMethods" value="OPTIONS, GET, POST" />
<add key="Access-Control-Allow-Headers" value="Origin, Content-Type, Depth, User-Agent, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control" />
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.