I have previously used parameters when setting Default document in IIS.
Example list of default documents:
- Default.a开发者_JAVA技巧spx?control=start
- Default.asp
- Default.html
And when I go to www.mypage.com i end up on www.mypage.com/Default.aspx?control=start But this no longer work. I now end up on www.mypage.com/Default.aspx
Any ideas on what might be wrong? security updates from microsoft?
Running: Windows Server 2003, IIS 6, ASP.net 2.0
AFAIK, it doesn't work with IIS 7 or IIS 7.5 to begin with. Since you are saying that it worked with IIS 6, I checked with IIS 6 as well...
I created a default document in IIS 6 called... test.aspx?test=123
When I browsed http://localhost, I was NOT redirected to http://localhost/test.aspx?test=123... although IIS would assume that you want this page and give you an appropriate output. I just checked from this code... and as expected it totally ignored test query string.
If I pass anything from my browser, the code works as expected.
In a nutshell, what I want to say is... Default document does not work with Query string. Although, it is pretty easy to achieve in code. Just do a Server.Transfer or Response.Redirect and attach the querystring if it is not already available.
HTH, Rahul
精彩评论