[英]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.