Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does VS2010 store the Base Url for Classic ASP websites?

We have some legacy Classic ASP websites to maintain, and are wanting to use VS2010 to edit them, due to familiarity because of lots of .Net work.

I can open the website inside Visual Studio.

I can configure IIS to run the website based on the working folder used in VS2010.

I can configure VS2010 to automatically open my default browser pointing to the correct location, using the 'Base Url' setting in the Properties page.

What I CAN'T do, is work out where VS2010 stores this value, as there's no mention of it in the solution file that VS2010 has created, and as there's no project file for the website, there's nothing there too. Yet, when I close and re-open VS2010, it somehow retains this information.

This is important to me, as I need to be able to commit all files to our source control for use by other developers and, ideally, not have them worry about setting this value themselves.

So, the question is: Where does Visual Studio 2010 store the Base Url when working on Classic ASP websites?

like image 373
Brett Rigby Avatar asked Jan 26 '26 14:01

Brett Rigby


1 Answers

I don't know where this is saved, but in tracking things like this down in the past I typically take the following approach:

  1. Open Visual Studio and change this one setting
  2. Apply the changes
  3. Look for all files that have been modified in the last 1 minute in the project folders and in the Visual Studio folders

You can be sure there will be at least a few other files changed that are not relate to this, but it should narrow your search. You may want to re-close VS before searching too, but that will modify other files as well (making for a slightly larger pile of changed files to sift through).

If you still don't have it, search the registry (but I cannot imagine this would be where it was storing anything project specific).

EDIT:

Just created a new project and played with setting this property. It is definitely stored in the .suo (Solution User Options) file for the project, in the root of the project folder as @Lankymart suggested (and is a hidden file if you are not seeing it). It is not stored in plain-text.

You may be able to access it programmatically here: http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.shell.interop.ivspersistsolutionopts.loaduseroptions.aspx

As there are a ton of absolute path settings in these files, moving it to other environments is not really an option. I would suggest you are stuck with project start up documentation that lists these settings as part of the project setup process. I think any other solution is going to be equally annoying|fragile (or worse).

Not sure if there is another way to accomplish what setting the base URL does without managing from the Start Options panel - that is likely your last-best hope for a solution.

like image 74
Matthew Avatar answered Jan 29 '26 02:01

Matthew