Question

I'm running Visual Studio 2013 and my application is being odd. I startup my web application and get redirected to the login page just fine, but once I login, it attempts to redirect to Default.aspx. This wouldn't normally be a problem, but the domain is being removed on redirect and therefore, it is causing an error. If I put the domain name back into the url, I get the page I was expecting.

Example This is what I'm expecting after login.

http://localhost:8080/Default.aspx

What I'm getting after login is this:

http://Default.aspx

I'm thinking there is an issue in my VS setup, IIS Express, or an error in my Web.config, but not sure where to look.

EDIT: This only happens with this webapp. I have other webapp projects that I work on and it doesn't occur in those. That leads me to believe the issue is more likely a setting that is off in either VS, the project, or my Web.config.

EDIT: For added clarification, after login, any link/button that I click causes this error to occur. I have to add the domain every time I navigate to a new page. This leads me to believe the error is not actually caused by the login itself.

Était-ce utile?

La solution

There wasn't an issue in the code. The issue was in IIS Express itself. To fix my issue, I switched to using my local IIS server instead.enter image description here

I set the specific page, switched the sever to Local IIS, and then set the project URL and created a virtual directory in IIS.

This solved the URL resolving to \\Default.aspx.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top