2013-09-29 3 views
2

MVC 5 spa template을 사용하여 새로운 Visual Studio 2013 RC에서 azure로 테스트 웹 사이트를 게시하려고합니다.ASP.NET MVC 5 Identity and Azure

저에게 문제가되는 것을 제외하고는 등록/로그인/로그 오프 프로세스가 정상적으로 작동합니다. 잘못된 자격 증명을 사용하여 로그인하려고하면 페이지에 다시 나타나는 오류 문자열은 "알 수없는 오류가 발생했습니다."입니다. "사용자 이름 또는 암호가 잘못되었습니다." ApplicationOAuthProvider.cs에있는 GrantResourceOwnerCredentials이 제대로 작동하면해야합니다.

로컬 호스트에서 올바른 "사용자 이름 또는 암호가 잘못되었습니다." 메시지. 푸른에서

오류 로그 :

</head> 
<body> 
<div id="content"> 
<div class="content-container"> 
<h3>HTTP Error 400.0 - Bad Request</h3> 
<h4>Bad Request</h4> 
</div> 
<div class="content-container"> 
<fieldset><h4>Most likely causes:</h4> 
<ul> <li></li> </ul> 
</fieldset> 
</div> 
<div class="content-container"> 
<fieldset><h4>Things you can try:</h4> 
<ul> <li>Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click <a href="http://go.microsoft.com/fwlink/?LinkID=66439">here</a>. </li> </ul> 
</fieldset> 
</div> 

<div class="content-container"> 
<fieldset><h4>Detailed Error Information:</h4> 
<div id="details-left"> 
<table border="0" cellpadding="0" cellspacing="0"> 
<tr class="alt"><th>Module</th><td>&nbsp;&nbsp;&nbsp;__DynamicModule_Microsoft.Owin.Host.SystemWeb.OwinHttpModule, Microsoft.Owin.Host.SystemWeb, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35_08fdea3d-9972-4dc2-b0fc-c8ffdb2e4253</td></tr> 
<tr><th>Notification</th><td>&nbsp;&nbsp;&nbsp;AuthenticateRequest</td></tr> 
<tr class="alt"><th>Handler</th><td>&nbsp;&nbsp;&nbsp;ExtensionlessUrlHandler-Integrated-4.0</td></tr> 
<tr><th>Error Code</th><td>&nbsp;&nbsp;&nbsp;0x00000000</td></tr> 

</table> 
</div> 
<div id="details-right"> 
<table border="0" cellpadding="0" cellspacing="0"> 
<tr class="alt"><th>Requested URL</th><td>&nbsp;&nbsp;&nbsp;http://[site]:80/Token</td></tr> 
<tr><th>Physical Path</th><td>&nbsp;&nbsp;&nbsp;C:\DWASFiles\Sites\[site]\VirtualDirectory0\site\wwwroot\Token</td></tr> 
<tr class="alt"><th>Logon Method</th><td>&nbsp;&nbsp;&nbsp;Not yet determined</td></tr> 
<tr><th>Logon User</th><td>&nbsp;&nbsp;&nbsp;Not yet determined</td></tr> 

</table> 
<div class="clear"></div> 
</div> 
</fieldset> 
</div> 

<div class="content-container"> 
<fieldset><h4>More Information:</h4> 
The request could not be understood by the server due to malformed syntax. 
<p><a href="http://go.microsoft.com/fwlink/?LinkID=62293&amp;IIS70Error=400,0,0x00000000,9200">View more information &raquo;</a></p> 
<p>Microsoft Knowledge Base Articles:</p> 

나는 같은 구문을 전송하고 올바른 로그인 자격 증명이 제출 될 때 처리되기 때문에이 잘못된 구문이 될 수있는 방법을 모르겠어요.

지식 기반 기사 이외의 답변에 가까워지기 위해 어떤 일이 벌어지고 있는지 또는 최소한 길을 알아내는 데 충분한 지식을 가진 사람이 있습니까? 아직 명확하지 않다면이 기사를 처음 접했을 것입니다. ASP.NET에서의 첫 번째 웹 사이트, OAuth에 대한 첫 번째 소개 및 Azure의 첫 번째 사용 방법입니다.

+0

나는 바이올린에서 POST 헤더와 요청 본문을보고 있었고 좋은 자격 증명을 가진 로그인 구문과 나쁜 자격 증명을 가진 로그인 구문 사이에 어떤 차이점도 볼 수 없습니다. 다른 사람이이 문제가 있습니까? 아마도 이것이 새로운 mvc 5 신원 체계라는 사실과 관련된 버그일까요? 어쩌면 문제가 비정상 인 구문을 나타내는 하늘 로그가 잘못되었을 수도 있습니다. – user2787092

+0

그것은 Azure 문제가 아니라 ASP.NET MVC 인 것처럼 보입니다. 어쩌면 코드에서 사용자의 이름을 표시 할 수 있지만 Identity가 null 값과 다른지 확인하지는 않습니다. 좋은 팁 : 너겟 엘마를 활성화하고이 테스트를 반복하십시오. 오류 및 스택 추적을 볼 수 있습니다. –

+0

코드가 localhost에서 작동한다고 언급 했어야합니다. Azure에서는 '알 수없는 오류가 발생했습니다.'라는 메시지 만 표시합니다.이 점을 나타내 기 위해 원래 게시물을 업데이트했습니다. Elmah를 살펴 보겠습니다. 제안 해 주셔서 감사합니다. – user2787092

답변

0

이 글을 몇 번 보았으므로 업데이트/응답을 추가하고 싶습니다. 문제가 무엇인지 알지 못했지만 Visual Studio 2013 RTM으로 업데이트 한 후 사라졌습니다. RTM에서 ASP.Identity에 대한 업데이트가 상당 부분 수정 되었기 때문에 (VS와 관련이 없으며 내가 아는 모든 기능에 대해 Azure에 적용된 업데이트로 해결되었을 수도 있음) 잘하면 이 같은 문제를 가진 사람은 그것이 사라지는 것을 보았습니다.