Reputation: 3154
I have published two websites under the Default Web Site node in IIS:
> Default Web Site
> Site1
> Site2
The idea is that they should reply to the following URL:
The website is protected by authentication therefore the first page is the login page. The URL I get is as follows:
http://localhost/Site1/Account/Login?ReturnUrl=%2fSite1
After I put username and password the website is not able to redirect me to the home page and always land in the login page (even though the authentication is completed correctly, because if I write an URL of the website, this will work correctly).
But, if I force the starting URL to (adding a backslash at the end):
http://localhost/Site1/Account/Login?ReturnUrl=%2fSite1/
The website works properly. Moreover, the website works properly even if I publish it as a standalone website (not an application of the Default Web Site):
> Default Web Site
> Site1
> Site2
Am I missing something in my IIS configuration?
Upvotes: 0
Views: 687
Reputation: 3154
Turned out this was a known issue. With some more research I found out it was a trailing slash problem and I worked it out using IIS URL Rewrite, as suggested here and here
Upvotes: 0
Reputation: 784
Change the port no and try
port for both site inherrit from Default Website port no.
better practice to make each application/site on root and provide them different port.
Hope this will help.
Upvotes: 1