Windows azure platform load balancing on DotNetOpenAuth redirects mvc 2 action

I blocked this error until the DotNetOpenAuth redirect action was called ( http://www.dotnetopenauth.net/ )

Basically, I applied an example here

http://www.dotnetopenauth.net/developers/code-snippets/programmatic-openid-relying-party/

In my application, while running locally, I click this line

return request.RedirectingResponse.AsActionResult();

At this point, it completes this action and then balances the load balancing of azure dev.

That's where it gets weird. If I debug line by line in a redirect action, it will not crash.

Has anyone seen anything like this that can give me any direction to fix?

@dthorpe indicates that I should tell you everything I tested by deploying in a production environment, and that seems to work.

+3
source share
3 answers

I have a fix. This is a small hack, but it works, and you do not need to fake anything.

Change this:

return request.RedirectingResponse.AsActionResult();

:

string location = request.RedirectingResponse.Headers["Location"];
return Redirect(location);

This exacerbated the problem and allows authentication. I will allow someone brighter than me to give a detailed explanation of why this is so.

Hope this helps!

+1
source

We had the same problem . Currently, I do not know what I know, and the application is still working fine, but is being deployed in the cloud.

, ( ifdef DEBUG ). , OpenID dev, , DotNetOpenAuth. .

+3

- , - Azure, . web.config , "", , .

<system.diagnostics>
  <trace>
    <listeners>
      <!--<add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="AzureDiagnostics">
        <filter type="" />
      </add>-->
    </listeners>
</trace>

, , , !

0

Source: https://habr.com/ru/post/1758077/


All Articles