Developer Tip: ASP.NET Configuration in Visual Studio 2010

I’ve just come across a strange issue in Visual Studio 2010, when trying to launch and access the ASP.NET Configuration tool (used for configuring security settings).

When I tried to access the site by selecting it from the Project menu, it would start the local web server on whatever port it chose, but wouldn’t open the page in my browser automatically. So I manually opened the link by right-clicking the icon for the web server in the system tray and choosing “Open in Web Browser”.

The result was a URL opened such as http://localhost:53764/asp.netwebadminfiles/ and this would cause an error “An error was encountered. Please return to the previous page and try again.”

The solution:

After testing sites that use both the MySQL Connector/NET provider and the “standard” (?) SQL Server Membership Provider, and suffering the same issue, I tried running the tool from Visual Studio 2008 (on older, pre-upgrade versions of my websites), and found that the issue appears to be related to the full URL not being used when clicking that “Open in Web Browser” link.

The template to use for the URL is:

where xxxxxx is the port that has been used by the web server and path-to-project-file is exactly that… for example:

I hope this helps anyone else having this same issue – if you found anything else that solved it (particularly a more permanent solution!) please let us all know.

You may also like
Setting directory permissions with Octopus Deploy
Mapping Shapefiles with CartoDB
My Brief Affair With Microsoft Edge
  • There is an easier which I discovered after much frustration.

    Stop both processes, and then run the site in debug mode/push play in VS.

    Once started, go to the Solution Explorer and click the icon for ASP.NET configuration – so far it has worked every time for me.

  • Thanks Joel – that is an easier way to do it! Shame it means having to run a debug session, but it’s a good workaround nonetheless. I haven’t actually had this issue for a while now, so maybe something on my system “fixed itself”, but I’ll try this next time I’m experiencing it.