views:

66

answers:

2

I have cornered this error down to a redirect action call by DotNetOpenAuth(http://www.dotnetopenauth.net/)

Basically I have implemented the example here

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

In my application while running locally I hit this line

return request.RedirectingResponse.AsActionResult();

At this point it completes this action and then the azure dev fabric load balancer crashes.

Here is where it gets strange. If I debug line by line into the redirect action it will not crash.

Has anyone seen anything like this that can give me some direction on a fix?

@dthorpe points out that I should tell you all I have tested this by deploying to the production environment and this does seem to work.

+3  A: 

We had same problem. There is no fix I currently know of and application still works fine, while deployed in the cloud.

Yet for the local testing purposes I merely introduced switch (it could be compile-time ifdef DEBUG or configuration switch). Whenever there is attempt to authenticate via the OpenID in local dev fabric, we immediately assume the identity is valid and authenticated by the DotNetOpenAuth. This worked for us and allowed to move the development forward.

Rinat Abdullin
That works for me, I was hoping it wasn't the answer but given you had the same problem and never got an answer I declare this the best answer!
Jonathan Park
+1  A: 

I have a fix. It's a slight hack, but it does work and you don't have to fake anything.

Change this:

return request.RedirectingResponse.AsActionResult();

to this:

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

This gets around the issue and allows authentication to proceed. I'll allow someone brighter than myself to give a detailed explanation as to why this is the case.

Hope this helps!

Michael Gorsuch