简体   繁体   中英

How do I change a web site from an IIS hosted site to an ASP.Net Development Server hosted site?

On my previous machine I had IIS6 installed and created a web project using IIS as the host. This project was completed, published to an internal hosting server and checked in to source control.

I now need to go back and make a minor change to the project, however in the meantime I have acquired a new machine. On my new machine I don't have IIS – and don't really have any wish to go back to using IIS as I find the ASP.Net development server sufficient for my needs.

I can't open the project at all in Visual Studio without becoming an Administrator and installing IIS 6. Is there some way I can modify the project and solution files to make it play nicely and use the ASP.Net development server instead?

EDIT: additional info, this was created as a web site not a web project so there is no .csproj file.

Version info: Visual Studio 2008, .net 3.5.

Thanks for any help,

Can you start a new project and use the "Use Custom Web Server" option?

Personally I would start a new project and get the files directly from Source Control - being a web site rather than project you shouldn't run into any problems and whilst you only need to make a minor change now you may well need to make more minor changes in the future so having quick and ready access to the source will likely be useful.

If it's a Web Site project (no .proj file, no pre-compilation of the project code into a dll) you can try the following:

Open the .sln file in a text editor of choice, and in the "ProjectSection(WebsiteProperties)" add the following line:

VWDPort = "xxxx"

Where xxxx is a random port number that's not in use - this seems to be the only differnce between using a proper server and using the development server.

If it was a Web Application Project you could try the following:

Open the .proj file in a text editor of choice, and modify the WebProjectProperties:

False True 0 / False

That might get you going.

Looking around, it seems you can run the Development server stand alone:

http://blog.sb2.fr/post/2008/11/28/Use-Microsoft-NET-ASPNET-Development-Server-Standalone.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM