无Cookie会话和IIS7导致重定向循环 [英] Cookieless sessions and IIS7 causes a redirect loop

查看:226
本文介绍了无Cookie会话和IIS7导致重定向循环的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用无Cookie会话的ASP .NET网站。当使用以下网址向网站发出初始请求时:

I have an ASP .NET website that uses cookieless sessions. When the initial request is made to the site using a url such as:

http :// localhost / site

IE只显示标准的Internet Explorer无法显示网页消息。 Firefox更有帮助并显示以下消息:

IE just displays the standard "Internet Explorer cannot display the webpage" message. Firefox is a bit more helpful and displays the following message:

此URL的重定向限制已超出。无法加载请求的页面。这可能是由以下cookie引起的阻止了。

"Redirection limit for this URL exceeded. Unable to load the requested page. This may be caused by cookies that are blocked."

我将一些跟踪放入global.asax并进入应用程序启动事件但不进入会话启动事件。

I put some tracing into global.asax and I get into the application start event but not into the session start event.

我没有明确阻止任何使用浏览器的cookie,也没有设置任何http重定向规则。

I have not explictly blocked any cookies with the browsers and have not setup any http redirect rules either.

该网站适用于我的开发服务器和IIS6。

The site works fine with my development server and under IIS6.

如果我关闭无cookie会话,那么一切在IIS7中很好。

If I switch off cookieless sessions then everything is fine in IIS7.

我可以使用最简单的网站重现这一点,即在Visual Studio,File> New Website中然后只设置cookieless =trueweb .config设置。

I can reproduce this with the simplest of websites, i.e. in Visual Studio, File > New Website and then just set the cookieless="true" web.config setting.

我已经在一个工作室工作站上对它进行了测试并且它可以工作,所以我猜它是IIS7中的某个设置。

I have tested this on a colleauges workstation and it works, so I am guessing it is some setting in IIS7 somewhere.

任何想法?

推荐答案

我发现了问题。

我有两个ISAPI过滤器,它们都指向同一个dll:

I had two ISAPI Filters defined both pointing to the same dll:

%windir%\ Myicoft.NET \Framework \v2。 0.50727\aspnet_filter.dll
c:\windows \ Microsoftoft.NET\Framework\v2.0.50727\aspnet_filter.dll

%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_filter.dll c:\windows\Microsoft.NET\Framework\v2.0.50727\aspnet_filter.dll

我删除了第二个,一切都很好。我不知道是什么把副本放在那里,肯定不是我。

I deleted the second one and all was well. I don't know what put the duplicate there, it certainly wasn't me.

这篇关于无Cookie会话和IIS7导致重定向循环的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆