Asp.net web application compiling, but not launching the browser when the application is run (VS 2010)
I have a Web Application that I received from another developer, when I first opened the solution in Visual Studio 201开发者_如何学Go0, it gave a message that the URL for the application has not been created in IIS and do I want Visual Studio to set up a virtual folder. I clicked "yes", and in the IIS manager I see that the virtual folder has been created. I also went to directory security for the virtual folder and enabled integrated windows authentication.
The problem is that when I try launch the application, changes to "running", but a browser windows is not opened and if I look in inetpub\wwwroot I do not see a folder for my application. Another thing I noticed, is that in the properties for the virtual folder in IIS, under the tab ASP.Net, there is a dropdown box called ASP.Net version; this dropdown box only has options 2.0.50727 and 4.0.30319 whereas the application that I am trying to launch is targetting .Net framework 3.5. The .Net framework 3.5 is installed on the computer so I have no idea why it is not being shown in this dropdown box. Maybe it is relevant to the problem I am experiencing?? The IIS version running on my computer is IIS 6.
Does anyone know what could be going wrong here and how I can fix it? Thanks.
EDIT: Ok. Now I am a step further. I have changed the start action under the Web section of the solution properties to be Specific page: Default.aspx; this setting was on Don't open a page. (Thanks, anirudh4444 for this info). Now the browser opens when I click run, and I briefly see it attempting to go to the correct url (namely, http://localhost/ripcord/default.aspx), but it immediately changes to http://www.ripcord.co.za/default.aspx, which is the site where this project was previously hosted. It then displays "The remote server returned an error: (400) Bad Request." If I manually put in the local url then I get a popup box showing asking me for a username and password.
EDIT 2: I added a stack trace here, but have removed it because it is not relevant to the problem that I am encountering. This stack trace, I have determined, is actually showing an exception occurring on the remote site. My problem is that when I try and navigate to http://localhost/ripcord that it is redirecting to the remote site. I am needing to stop it doing that and instead execute the application locally.
Redirection can occur in several places: the web.config settings (like an in a tag), in IIS configuration, in the project settings (like start up behavior), or in code.
Do a search in your code and config files to find 'http://www.ripcord.co.za' to see if it is your code. Then look at IIS settings.
What does the customErrors in your Web.config look like? Does it use a relative path or an absolute path?
<customErrors mode="On" defaultRedirect="~/errors/GeneralError.aspx">
<error statusCode="404" redirect="~/errors/PageNotFound.aspx" />
</customErrors>
If an exception is thrown and not handled, the custom errors will use the redirect settings
精彩评论