views:

76

answers:

3

Another beginner question for ASP.NET:

I'm starting an ASP.NET project in Visual Studio 2008, and would like to link it to a folder on a remote server (as in it builds/publishes to this folder). It may be my phrasing, but I cannot seem to figure out how to do this (even with Google at my side!).

I naively tried to just upload the code files to the server, but running my code produces errors related to the fact that the pages are not set up as an application.

Any help would be appreciated (or a link to a resource where i could learn more about this basic asp.net/vs08 stuff I keep running into).

+2  A: 

On your web server the folder you copied your files into needs to be set up as an application or a virtual directory. This is done through the Internet Information Service panel found in the "Administrative Tools" off the Control Panel.

Depending what flavor of IIS you are using the procedure may differ.

Visual Studio 2008 has a publish feature. If you right-click on the web project there is a "Publish" option. You can then select where you want to Publish your files.

Chuck Conway
Is there a way to do this through VS08?
Matt Dunnam
@Matt: IIS setup is completely done server side. Think of it as a container for your code. Once IIS is properly configured you use VS08 to publish to that container.
Chris Lively
+1  A: 

2 fast answers:

You can use the Publish option in Visual Studio and create a folder inside wwwroot to publish

Alternatively, you can create a simple setup program. Just add a new "web setup project" to the solution and add the results of the web site to the setup project.

And of course, have you tried googling asp.net deployment to get some help?

Good luck! :)

Rafa G. Argente
A: 

You will love Visual Studio 2010, which should be out in early 2010, if it follows previous versions. This would also mean an MSDN release a few months earlier. Why? Better deploy story.

As for where we are today, you can publish and have a directory created. You will have to publish to IIS instead of a directory to accomplish this. This means you have to have permissions to add a web app and publish to it.

For a directory, you will have to create the app in the IIS Manager. If you do not have access, try the IIS admin. If you cannot get them to do it, you are back to publish.

Gregory A Beamer