开发者

Session_Start() called, then Session_End(), then Session_Start() again and URL changes

开发者 https://www.devze.com 2023-03-27 15:00 出处:网络
I\'ve got a weird one.:-)I have an MVC (ASP.Net C#) app that uses CBA (and WIF) for authentication. It works fine when I go to the default root of my app: https://myappThis calls my IP (https://myapp

I've got a weird one. :-) I have an MVC (ASP.Net C#) app that uses CBA (and WIF) for authentication.

It works fine when I go to the default root of my app: https://myapp This calls my IP (https://myappSTS) takes creden开发者_开发问答tials and all is good.

The issue happens when I try to go to a non-root url before login. Like this: 1. Open browser 2. Enter a non-default URL like https://myapp/customerpage

In this scenario, in the global.asax, I see I hit Session_start and when I check the httprequest url it is correct ("/customerpage"). Then my Session_End() gets called. Then Session_Start() gets called again! This time my URL is the root url ("/") and it all works great.

This sequence happens before STS is called. STS does not get called until the second session is created.

The problem is that we sometimes email links to customers and they should just click, login and get taken to the right place.

Does anyone know why this is happening? I'm running IIS7.5 (64 bit), .Net 4.

Thanks!

Rich

http://richdotnet.blogspot.com/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号