开发者

Deploy MVC 2 to IIS 7.5 Windows Server 2008 Integrated Mode

I'm stuck while I'm trying to deploy my mvc 2 web application in IIS, using IIS 7.5 in Windows Server 2008 R2, integrated mode.

I got into an issue with Session, Session lost when I use hostname to launch my web pages in IE 7 or IE 8. This issue is not related to cookies, Session is always null doesn't matter cookies are enabled or disabled in IE.

doesn't matter cookies are enabled or not.

However, if I use IP address url (like http://192.168.1.101/ ), Session works fine. Also, Firefox is working fine all case.

I'm thinking that, this issue doesn't come from my code, correct? I might do s开发者_高级运维omething wrong while I was trying to deploy my mvc2 application in IIS. I just dome some easy configuration steps to have mvc 2 works in IIS like below

  1. Install IIS 7.5

  2. execute aspnet_regiis -ir

  3. create a new website in IIS using .Net framework 4.0 application pool integrated mode.

  4. publish my web project (file system mode)

  5. copy published folder to "root directory" of the website has just created

  6. copy the dll system.web.mvc.dll to bin

From here, I already have my web run in IIS, everything, javascript, css, views, dll.... working well except Session

I appreciate any suggest, any comment any guide helps to get this issue resolved.

Thanks


Thank you, I found the problem, it caused by the server host name which contains an underscore


If the app works fine in one browser (Firefox), there is no problem with the deployment of the application. Also, just because it's broken in IE whether cookies are enabled or not does not mean that the issue is not related to cookies. IE could be rejecting the cookies, for example, by some other means. Especially if it works in IE when you use the IP address...

Have you tried sniffing the traffic back and forth to see what is actually being sent? Is IE sending cookies to the server on each request?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜