Setting up Start Options in Visual Studio and Visual Web Developer

Posted by in ASP.NET category on for Beginner level | Views : 13301 red flag

While working with Visual Studio or Visual Web Developer, we usually come across setting start up options, this article focuses on each of the start up options and explains their uses.

Start Options section let us setup the desired behavior of the web site or web application when it is debugged through Visual Studio or Visual Web Developer.

There are mainly three sections of the Start Options as shown the the picture below. There are few steps you need to follow to come to the Start Options.

Picture - 1

1. Go to Solution Explorer, right click Website project and click Property Pages as shown in the picture below.

Picture 2

2. Above step will give you Picture - 1, as shown above, click Start Options from the left site box and you will get Start Option dialogue box.

3. If your project is not a Website but it is a Web Application, right click the Web Application project in the solution explorer and click Properties. Click Web from left side tabs.

Get solutions of the .NET problems with video explanations, .pdf and source code in .NET How to's.

Once you are on the Start Options details dialogue box, you will have ability to setup different Start Options, lets see them one by one.

Start action
    1. Use current page: If you have selected first radio button, your current page will be assumed as the start page and when you hit F5 or click Debug menu > Start Debugging, whatever page is open currently in the Visual Studio or Visual Web Developer will be the first page (starting page) in the browser. For example, you have default.aspx, page1.aspx, page2.aspx and all pages are open in the Visual Studio, but you were working on page2.aspx, when you will hit F5, debugging will start from page2.aspx despite you have default.aspx (generally default.aspx page is considered as the start page if you have not specified any other page)
    2. Specific page: If you have selected second radio button, you need to specify a specific page you want to open when your debugging start. The specified page will open as the first page in the browser. You are free to specify any page irrespective of their file extensions. For example, you can specify *.aspx, *.htm, *.txt or whatever. This can also be done by right clicking the page (in the Solution Explorer) you want to specify as Start page and selecting Set As Start Page.
    3. Start external program: If you have selected third radio button, you can specify any external program that you want to open when your debugging start. Not relevant but you can specify C:\WINDOWS\system32\calc.exe and Windows calculator will start :). This also let you specify the command line arguments and working directory when your external program will open.
    4. Start URL: When you want a url to be the start page when you start your debugging, this option let you specify that. This is generally not used however in certain scenario, you might use this.
    5. Don't open a page, wait for a request from an external application: This option is equal to manually attaching debugger proccess from going to Debug menu > Add to process > select available proccess and attaching. This option will not open a page but the debugger will be attached and you are ready to debug your application. To do that you need to manually open the browser and hit the url (This option will automatically start the default web server that will appear in the bottom right corner of your monitor). For example, if your ASP.NET Development Server (in Visual Web Developer) starts on port 1369, you can hit http://localhost:1369/MyWeb/ assuming your project name was MyWeb. In Visual Studio, you can simply hit http://localhost/MyWeb and it should work if your IIS is setup in default mode.
    1. Use default web server: This option let Visual Studio or Visual Web Developer use the default web server avaialble on your computer. Visual Web Developer let you specify few more options like port, virtual path, using your local IIS Web Server instead of using its own Visual Studio Development server.
    2. Use custom server: This opiton let you specify any custom server you want to use when your debugging start.
    1. This changes based on what applications are installed on your system but ASP.NET option is common. If you have Silverlight project template and SQL Server project template also installed, you can see these options as well. This option let you attach these debuggers along with default debuggers so while debugging, you can debug, silverlight and others application pages at one go. In some scenaiors, you may not want all types of activitoes to be debugged, in that case you can uncheck a particular debugger for example Silverlight and focus on ASP.NET debugging only.

One more thing that is related with debugging is that if you have multilple projects in the Solution and you want a specific project to start when your debugger start, you can right click that project in the Solution Explorer and select Set as StartUp Project.

Hope this information will be useful for beginners. Thanks for reading. To get subsequent articles alert in your email directly, subscribe to the article feed.

Page copy protected against web site content infringement by Copyscape

About the Author

Full Name: Sheo Narayan
Member Level: HonoraryPlatinum
Member Status: Administrator
Member Since: 7/8/2008 6:32:14 PM
Country: India
Regards, Sheo Narayan

Ex-Microsoft MVP, Author, Writer, Mentor & architecting applications since year 2001. Connect me on | |

Login to vote for this post.

Comments or Responses

Login to post response

Comment using Facebook(Author doesn't get notification)