Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

One of the questions I'm often asked is whether it is possible to run an ASP.NET web-site project as a top-level root "/" site using the built-in VS web-server and the VS 2005 Web Site Project model.

By default, when you open a web-site as a file-system based web site project and run it, VS will launch and run the built-in web-server using a virtual app path that equals the project's root directory name.  For example: if you have a project named "Foo", it will launch and run in the built-in web-server as http://localhost:1234/Foo/  What a lot of people want to-do instead is to just run the web-site as http://localhost:1234/ or (if port 80 isn't already in use): http://localhost/  Doing this can make site navigation and url handling logic much simpler in your code.

Prior to VS 2005 SP1 being released, I would recommend either running the project using IIS instead (here is a past post of mine on using the web-site project model with IIS), or to use a blog of mine from a year ago that discusses how to use the "external tools" feature in VS to enable root web-sites to accomplish this.  The good news is that VS 2005 SP1 makes this even easier with the built-in VS web-server.

Step by Step Instructions on Configuring a VS 2005 Web Site Project to Run as a Root "/" Site

The below steps walkthrough how to configure a VS 2005 Web-Site Project to run as a root "/" web-site:

1) Open up an existing web-site project or create a new one by selecting the File->New Website menu item.

2) Using the solution explorer within Visual Studio, select the web-site project node:

3) Go to the property-grid within the IDE, which (if the project root node is selected) will now display the project properties for the web-site.  There are three relevant properties that we care about for the purposes of this tutorial: "Virtual path", "User dynamic port", and "Port Number".  Change the "virtual path" setting to / to run as a root web-site.  You can also then set the dynamic port setting to "false" and configure a specific port to use (for example: port 8081 or port 80 if it isn't already in use):

4) Now click on a page within the project and run it.  You will see that the web-server was launched as a root "/" site:

Note that the :8081 was added at the end of http://localhost because I already have IIS7 running on my Vista machine and it has a site using port 80.  If I disabled IIS I could have configured the web-site project to use port 80, in which case the web-browser would just have http://localhost/ in the address bar. 

I can now perform root-relative navigation within my sitemap (example: /products, /help, etc), as well as in my redirect logic and with standard HTML elements (example: <a href="http://weblogs.asp.net/path">).  I can also now reference javascript files relative from the root, for example: <script src="http://weblogs.asp.net/js/library1.js"></script>.

Tips/Tricks for Handling CSS StyleSheets with VS 2005 and ASP.NET 2.0

One of the techniques I recommend taking advantage of with ASP.NET 2.0 when using CSS is to use the Master Page feature to provide a consistent UI across your site, and to reference all stylesheets in one place using a master page (all pages based on the master will then automatically pick them up). 

One tip to take advantage of is the relative path fix-up support provided by the <head runat="server"> control.  You can use this within Master Pages to easily reference a .CSS stylesheet that is re-used across the entire project (regardless of whether the project is root referenced or a sub-application):

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Site.master.cs" Inherits="Site" %>

<html>
<head runat="server">
    
<title>Master Page</title>
    
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</
head>
<body>
    
<form id="form1" runat="server">
    
        
<asp:contentplaceholder id="MainContent" runat="server">
        
</asp:contentplaceholder>
    
    
</form>
</body>
</html>

The path fix-up feature of the <head> control will then take the relative .CSS stylesheet path and correctly output the absolute path to the stylesheet at runtime regardless of whether it is a root referenced web-site or part of a sub-application. 

The pages within your web-site can then look like the content below and automatically pick up the stylesheet settings (both at runtime at a design-time within the VS HTML WYSIWYG Designer):

<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="Sample Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">

    
<h1>Root Web Site Sample</h1>
    
    
<a href="/Products">Click here to go to the Products section (note the absolute path) </a>

</asp:Content>

Because image references contained within a .CSS stylesheet are referenced by a browser relative to the path of the .CSS file (and not actually the path of the page the stylesheet is being used on), you can combine this behavior with the <head runat="server"> logic above to have your images automatically work both with root web-sites and sub-applications (and not break if you change paths later). 

Images referenced this way will also show up fine within the VS 2005 HTML WYSIWYG designer (which can otherwise sometimes have trouble determining the root "/" path to pick up image references).

Hope this helps,

Scott

P.S. The Web Application Project Model within VS 2005 also has full support for root "/" web projects and the VS web-server (WAP projects by default are root relative).  To configure the path settings using a web application project, right-click on the web project node in the solution explorer, select "properties", and then click the "web" tab to configure them.

P.P.S. Click here to read more of my ASP.NET 2.0 Tips, Tricks and Gotcha posts.

Published Tuesday, December 19, 2006 11:58 PM by ScottGu

Comments

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Wednesday, December 20, 2006 9:55 AM by Sahil Malik

This is awesome. Setting it up in IIS was a royal pain - this makes life a lot simpler.

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Wednesday, December 20, 2006 10:19 AM by Joe

Very valuable information. Thanks much!

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Wednesday, December 20, 2006 11:13 AM by dwahlin

That's a great feature to have!  Is there a document anywhere that lists all of the new features in SP1?  

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Wednesday, December 20, 2006 11:42 AM by Dave

Have there been any enhancements to the "Copy Web Site" tool? I've never seen any way to configure this for the type of comparison I want or any way to exclude certain files (Like do not publish my dev web.config to my staginging webserver).

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Wednesday, December 20, 2006 12:19 PM by ScottGu

Hi Tom,

You can definitely use the ResolveClientUrl method like that in both .aspx/.ascx markup as well as in your own control logic (the method is built-in to every control).  It provides a really useful way to come up with client references to urls.

Thanks,

Scott

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Wednesday, December 20, 2006 12:21 PM by ScottGu

Hi Dan,

We are putting together a comprehensive list of all SP1 changes now, and will probably have one posted in early Jan.

For web scenarios, Omar from the web tools team is going to try and blog the list of web tool specific changes today or tomorrow on his blog here: http://blogs.msdn.com/webdevtools/

Hope this helps,

Scott

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Wednesday, December 20, 2006 12:21 PM by Al Ortega

THANKS!!! I was using the previous method you had talked about and after installing SP1 I no longer could use the root directory trick.  I kept getting a directory not found error.  Now everything is back as it should be and it's easier to implement which is awesome!

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Wednesday, December 20, 2006 12:24 PM by ScottGu

Hi Dave,

Unfortunately there haven't been any major enhancements to the "Copy Web Site" tool with SP1 (other than a few bug fixes).  It doesn't provide more advanced filtering of certain files yet.  

One thing you might want to look at is using either the web application project or web deployment project for this.  You can mark files in your project as non-content files - in which case they won't be deployed when you do a publish.

Hope this helps,

Scott

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Wednesday, December 20, 2006 12:26 PM by npearson99

That's it.  I think Scott has like 12 interns working for him writing blogs all the time.  No way does he have the time to get all this stuff done.

Just like dwahlin, I would also like a list of all the new features in sp1, especially the ones that pertain to asp.net

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Wednesday, December 20, 2006 12:28 PM by ScottGu

Hi npearson99,

No interns helping me blog I'm afraid - I actually write and come up with every post. :-)

I'm officially on vacation this week, which is why I've had to blog more than usual this week.

Thanks,

Scott

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Wednesday, December 20, 2006 12:52 PM by Eric Land

I'm not sure if this is off topic but... When using a WAP setup with sub projects (with IIS(that's my tie in to the thread ;) )) Can you put a web site project (file based) in as a sub project of a WAP set up?

Also, can you have subproject level web.config's (for use in application or sub project level authentication), regardless of the site architecture method? The threads all seem to point to having one root level web.config (or should you just have one crazy big root config?)

Thanks,

Eric

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Wednesday, December 20, 2006 1:10 PM by Shane C.

This is exactly the solution I was looking for -- but something is preventing me from trying it. My Visual Studio 2005 Pro does not have a "Virtual path" property. I checked another computer running VS2005 Team System and it was also missing the property. Any info on this would be great.

# SP1 Issue/Solution

Wednesday, December 20, 2006 1:14 PM by Kevin

I installed SP1 and when I viewed the Property Grid for my project, the new options did not appear. I could not figure it out. I opened one of my projects which has 3 separate web applications, and tried each one - then I saw that it worked for two of the projects, but it would not show the Port Number/ virtual path options for one of the projects.

Then I realized that for that one project I had the project "Property Pages" - Start Options set to "Use custom server" so I could use the 8080 external tools trick.

I set that back to use default Web server and Voila - the new properties appeared in the grid.

I just thought I would share this with the rest of you to save some time and hassle.

Kevin

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Wednesday, December 20, 2006 1:20 PM by foobar

Scott, is there any way to have the built-in web server ignore specific file types from authentication?  I have a web site with a login screen, but the CSS file is never delivered because the web server protects the file due to my security rule in web.config.

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Wednesday, December 20, 2006 1:26 PM by ScottGu

Hi Shane,

Can you double check that you have SP1 installed and are using a VS 2005 Web Site Project?  Also - can you check to see whether you might be running into the issue Kevin described above (where the custom server option is checked - in which case those properties aren't present)?

Thanks,

Scott

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Wednesday, December 20, 2006 4:07 PM by Shane C.

I've successfully installed SP1 and the Virtual Path property is indeed there. I changed it to "/" and my site full of absolute paths shows up correctly in a web browser via the built-in web server. However, Visual Studio's Design View still can't find any of my images or stylesheet references. I tried restarting VS to no avail. I was hoping this new Virtual Path property would fix all my broken images, and my search for a solution to this over the last few weeks has been pretty fruitless. Any ideas I could try out?

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Wednesday, December 20, 2006 4:25 PM by Mike

Scott or readers of this blog,

I am very interested in hearing from you how to accomplish nested websites. Right now I have 1 solution with 4 websites. One is in the IIS root and 4 are in virtual folders marked application in IIS. These 4 all have a virtual folder that points to a folder called MasterPages in the IIS root.

Using this setup I can share master pages and configure single sign-on. (Because the web.config cascades, sweet!)

Anyway, I want to do this exact structure using the built-in web server. Is that possible?

If not, is this scenario considered for Orcas?

Happy holidays Scott!

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Wednesday, December 20, 2006 7:31 PM by Brad

Scott,

So if you have multiple web apps in a solution that need to talk to one another,  would IIS could cassini run them simultaneously (concurrent)?  i.e. a web app project that needs to talk to a web service project in the same solution.

What if the apps were in seperate solutions?

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Wednesday, December 20, 2006 10:50 PM by Ivan

nice scott, thanks

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Thursday, December 21, 2006 1:37 AM by vikram

Thanks for this update. This is really cool for testing the web sites

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Thursday, December 21, 2006 2:33 AM by ScottGu

Hi Brad,

If you have multiple independent web-sites in your solution, you can configure all of them to run simultaneously - in which case you can definitely have web-services talk to each other.

Hope this helps,

Scott

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Thursday, December 21, 2006 2:35 AM by ScottGu

Hi Shane,

When you do "/" references for images or stylesheets, VS will look at the root path of your drive for the files (which in most cases is not the behavior you want).

If you follow my tip/trick above you can reference stylesheets relatively using a master page and ASP.NET will automatically fix up the path for you (and support showing it in design-view).  Images referenced via the stylesheet will also then be fully supported in design-view as well.

Hope this helps,

Scott

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Thursday, December 21, 2006 2:43 AM by ScottGu

Hi Foobar,

With regard to your question about authorization rules with Cassini (the built-in webserver), I think this blog post should help you with your scenario: http://weblogs.asp.net/scottgu/archive/2006/01/31/437027.aspx

Hope this helps,

Scott

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Thursday, December 21, 2006 2:57 AM by ScottGu

Hi Mike,

Depending on your file-structure, you should be able to implement nested projects using the built-in webserver.

One difference with the built-in web-server and IIS is that the built-in web-server doesn't support the concept of "virtual directories" - which means that to have a sub-url entry it needs to be a sub-directory underneath the root project.  As long as your sub-projects are structured on disk like this then everything should work.

The IIS virtual directory feature is very useful, though, for cases where you don't want the project directories to be underneath a root one.  In this case you could have them anywhere on disk and just use IIS to connect them up.

For more information on creating/using sub-projects with Visual Studio, I'd also make sure to check out this blog post: http://weblogs.asp.net/scottgu/archive/2006/08/16/Tip_2F00_Trick_3A00_-Creating-Sub_2D00_Web-Projects-using-the-VS-2005-Web-Application-Project-Option.aspx

Hope this helps,

Scott

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Thursday, December 21, 2006 2:58 AM by ScottGu

Hi Eric,

I just answered a similar question to your sub-project one above for Mike that you might want to check out.

Also - have you reviewed this blog post: http://weblogs.asp.net/scottgu/archive/2006/08/16/Tip_2F00_Trick_3A00_-Creating-Sub_2D00_Web-Projects-using-the-VS-2005-Web-Application-Project-Option.aspx

Hope this helps,

Scott

# Root-Relative Paths

Thursday, December 21, 2006 10:12 AM by Shane C.

Scott,

Thanks for the reply. The problem I was having with using site root-relative resources such as "/images/image.jpg" or "/styles/style.css" (which would break in Design View) was caused by using the File System project type for my new web sites. I've switched over to HTTP and now everything behaves normally. I caution any other ASP.NET newcomers to avoid doing what I did!! It took me a long time to find this solution. Is such behavior a bug or intentional? Thanks again for all your help.

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Thursday, December 21, 2006 11:10 AM by npearson99

Scott, vacation means you DON'T work :).  

I really love the blogs though.  Your my favorite asp.net blog.

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Thursday, December 21, 2006 11:42 AM by Ken

How about .js files. I have a common javascript file that I want all pages to have acces to. I have it in my master page and it works fine for all page in the root - but any pages that are in a folder under the root do not have access to the .js file?

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Thursday, December 21, 2006 2:13 PM by Josh

Scott:

A follow up to Shane's question. I want to use root "/" for images and style sheets outside of a master page. When I do the VS designer doesn't like it.

For example, inside the body I have the following:

<IMG alt="company logo" src="/images/Logo.gif" />

This fails to display in the designer, any thoughts? Is there a way to set what the designer thinks is the root? I've noticed some settings in the Solution file...

Thanks again for this post.

Josh.

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Thursday, December 21, 2006 5:08 PM by foobar

Scott,

Ah, thanks for the article.  It's not a perfect solution but it'll do.

Also, one thing I haven't seen mentioned anywhere:  Intellisense now works in skin files!  Woo hoo!

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Thursday, December 21, 2006 5:17 PM by Josh

Scott:

How do you use a root reference "/" (outside of Master Pages) with the src property of an image and still have it display in the designer? For example:

<img src="/images/logo.gif" alt="Logo" />

will not display in the Visual Studio 2005 SP1 Designer. But if you change it to a relative path:

<img src="images/logo.gif" alt="Logo" />

it displays.

You mention the virtual root for the designer is in a different location. Is it in the solution file or stored somewhere else that  can be updated to make this work?

Thanks again for the posts!

Josh.

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Thursday, December 21, 2006 6:02 PM by Jesse

Scott.  Im glad the root website capability made it into the service pack. This is a big help.  Im a little bummed about absolute image references not showing up in the designer though.  Your proposed workaround is ok, but its not typical to put every image reference in a stylesheet is it?

Seems like designer support for absolute paths would be such a trivial thing to implement but I guess it must be more complicated than I can imagine since it dint make it into the service pack.  

Besides the image problem, are there any other advantages to using an IIS website over a file system website?  It appears they are pretty much functionaly equivalent now.

Thanks again.

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Monday, December 25, 2006 9:07 AM by rob hare

Thanks Scott

Will this work with web developer express addition.

rgds

Rob

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Wednesday, December 27, 2006 9:57 AM by ScottGu

Hi Rob,

Yep - this will work with the Visual Web Developer Express edition as well.

Thanks,

Scott

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Wednesday, December 27, 2006 9:08 PM by Paul

Scott i tried to post 5 times and i never see my post, can I email my  question?

Thanx.

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Wednesday, December 27, 2006 9:27 PM by ScottGu

Hi Paul,

I'm not sure why your post isn't showing up.  Feel free to email me directly (contact details are under the "about" link at the top of this page).

Thanks,

Scott

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Wednesday, December 27, 2006 9:28 PM by ScottGu

Hi Brian,

That is odd - you should definitely see this option if you have SP1 installed.  Can you try selecting the Help->About menu item and scroll down in the list of installed products to see if SP1 is listed?

Thanks,

Scott

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Tuesday, January 2, 2007 4:12 PM by Chris Sigrist

I also was getting an error after upgrading Web Developer Express to SP1 that "such and such directory does not exist".  After fidgeting around  with the External Tools settings, I found that if you place a final space and a slash after in the arguments, like this:

/port:8080 /path:$(ProjectDir) /

the problem is solved.

Chris

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Wednesday, January 3, 2007 9:44 PM by JNapier

Image references aren't showing up in the designer.  Your proposed workaround is ok, but its not typical to put every image reference in a stylesheet is it?

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Thursday, January 11, 2007 9:01 AM by Mats

This is on the spot what i was lookin for.

Bad news (for me) is that i can't get it work.

Upgraded to SP1 (Microsoft Visual Studio 2005

Version 8.0.50727.42  (RTM.050727-4200)

Microsoft Visual Studio 2005 Professional Edition - ENU Service Pack 1 (KB926601))

But i can't se the "virtual path". If i create a http-base website the properties are totally different.

I this only available in Vista?

/Mats

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Friday, January 12, 2007 2:19 AM by ScottGu

Hi Mats,

Can you use the technique in this blog post to double check that you have SP1 applied: http://weblogs.asp.net/scottgu/archive/2007/01/01/a-few-vs-2005-sp1-links-and-information-nuggets.aspx

You should then be able to set this property within the property grid of a file-system based web project on all versions of Windows.

Thanks,

Scott

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Wednesday, January 17, 2007 12:21 AM by Cesar

I'm creating a website that will support themes. I'm creating the first default theme.

As far as refering to background images on CSS using url('myimage.gif') everything is fine.

But I have some images on the front pages that are simply being linked as images, using <img >

They look like:

<img alt="rss" src="App_Themes/Default/rss10.gif"/></a>

But so, now, when someone create and uses another theme, it will not pickup the corresponding images, but it will be always pointing to the default theme.

How do I do to get these images dinamycally pointing to the current theme directory ?

# It can't deploy the web application.

Friday, January 19, 2007 2:11 AM by Cesar

I don't know if it is my instalation or what, but the Publish Website option seems to don't like this configuration.

When I press Publish I get an error that says "Build failed", but no error list is given.

Changing the virtual path from "/" back to something like "/mysubdirectory", make it work again.

Does anyone else is having this ?

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Friday, January 19, 2007 12:51 PM by JA

Excellent. Thanks for adding the ability to configure this.

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Friday, January 19, 2007 8:57 PM by ScottGu

Hi Cesar,

I haven't seen that problem before.  Can you send me an email with the details of your configuration?  I'll then have someone on the team take a look to figure out what is going on.

Thanks,

Scott

# Master page in a virtual directory

Friday, February 2, 2007 10:22 AM by Jay

I have an issue with using a Master page from a virtual directory.  The pages work fine, but Intellisense doesn't work on any of the aspx's that reference the Master from the virtual directory.  I get "the '~/SharedControls/Site.Master' File Does Not Exist" error on the page declaration.  Is there any way to make this work.

We have several applications using a common  website (control library) set up as a virtual directory under each application.  This common site holds all of the master, images, styles etc.  This strategy seems to be working well, but the lack of IntelliSense is killing me.

Any thoughts? Thanks,

Jay

# like mats - properties now showing

Monday, February 5, 2007 8:04 PM by sparau

Like Mats - the property pages are not showing - the install went smoothly and appears in help->about.

With either existing web projects or new ones the property list has just :

MISC

- full path

- Opened URL

POLICY

- Policy File

Thankfully the trick mentioned above of adding a space and a trailing / to the old method got it to work for me - phew, i dont have time to re-install atm :) :)

Cheers

Shane

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Wednesday, February 14, 2007 12:35 PM by Simondo P

Is there any way to programatically stop (from the command line) the WebDev.WebServer.exe process?

Cheers,

Simondo.

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Friday, February 16, 2007 2:03 PM by ScottGu

Hi Simondo,

The only way I can think of to stop it would be to do a kill process on the process ID of webserver.

This tip/trick of mine should help with this: http://weblogs.asp.net/scottgu/archive/2006/07/01/Tip_2F00_Trick_3A00_-Command_2D00_line-Tasklist_2F00_Taskkill-Utilities-.aspx

Thanks,

Scott

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Friday, February 16, 2007 3:07 PM by Simondo

Thanks Scott

My command prompt didn't recognize 'taskkill.exe', but 'tskill.exe' did the trick.

Thanks again,

Simondo.

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Friday, February 23, 2007 1:58 PM by Jerome

Scott, I saw you mention that SP1 now supports intellisense in skin files.  Is that something that you have to turn on and if so how?  I've installed SP1 but not getting intellisense in the skin files.

Thanks

J

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Tuesday, February 27, 2007 2:52 AM by ScottGu

Hi Jerome,

You shouldn't need to configure anything to enable this.  Are you not seeing it show up?

If so, send me email and I can try and have someone take a look at it for you.

Thanks,

Scott

# WAP settings

Wednesday, February 28, 2007 2:09 PM by Alex

Scott,

I tried to find an answer for thisquestion for some time with no luck. What is "override application root url" and how exactly does it work?

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Saturday, March 3, 2007 9:33 PM by ScottGu

Hi Alex,

By default the built-in web-server uses a virtual root path when running an app.  For example:

http://localhost/apppath1/">http://localhost/apppath1/

You can use the above technique to instead have it run out of the root.  For example:

http://localhost/

Hope this helps,

Scott

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Saturday, March 10, 2007 12:30 AM by Jin

Just installed SP1 and the virtual path property did show.  However, the entire Properties window is blank when I'm in Source view, but works properly when I'm in Design view.  Anyone have this strange behavior after the SP1 installation?

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Saturday, March 10, 2007 12:35 AM by Jin

Never mind.  I found the solution by googling.  SP1 installation by default turns off the Properties page because many find it annoyance rather than helpful.  Had to turn it back on from Tools | Options.  Why change the settings that are in place?

# re: Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1

Wednesday, March 14, 2007 5:43 AM by Jeremy Leppan

Hi Scott

Thanks again for updating this post. I am glad to see you are running vista, like me so early since its release. Please continue to blog, your information is useful.