开发者

ASP.NET MVC switching between secure to none secure content

After logging to the mvc site using a secure connection (https), calling actions using https connection show up with the user logged in but calling actions using http it bahaves as if user didn't log on.

Since I need to use a virtual directory for https connections(and can't use that directory for http connection) Https links start with: https://www.sitename.com/vdir开发者_开发问答/... Http links start with: http://www.sitename.com/...

Any idea what's causing this behavior?

Any help greatly appreciated. Thank you!


Two different virtual directories cannot share session information in IIS 6, unless your are willing to use SQL State or a state server, and use the (unsafe?) cookieless session mode.

To accomplish the wanted behavior, open both port 80 and port 443 on the main site, so you can access them both with http://sitename.com and https://sitename.com. Then you can switch between http and https whenever you want. Just ditch the idea of different virtual directories for different protocols.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜