如何将网站从IIS托管站点更改为ASP.Net Development Server托管站点?

时间:2021-02-03 03:38:58

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.

在我以前的机器上安装了IIS6并使用IIS作为主机创建了一个Web项目。该项目已完成,已发布到内部托管服务器并签入源代码管理。

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.

我现在需要回去对项目做一个小改动,但与此同时我又购买了一台新机器。在我的新机器上,我没有IIS - 并且我真的不希望回到使用IIS,因为我发现ASP.Net开发服务器足以满足我的需求。

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?

我无法在Visual Studio中打开项目而无需成为管理员并安装IIS 6.我是否可以通过某种方式修改项目和解决方案文件以使其良好地运行并使用ASP.Net开发服务器?

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

编辑:附加信息,这是作为一个网站而不是一个Web项目创建的,因此没有.csproj文件。

Version info: Visual Studio 2008, .net 3.5.

版本信息:Visual Studio 2008,.net 3.5。

Thanks for any help,

谢谢你的帮助,

3 个解决方案

#1


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

您可以启动一个新项目并使用“使用自定义Web服务器”选项吗?

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.

就个人而言,我会启动一个新项目并直接从Source Control获取文件 - 作为一个网站,而不是项目,你不应该遇到任何问题,虽然你现在只需要做一个小改动,你可能需要做更多的小事未来的变化,因此快速准备访问源可能会有用。

#2


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:

如果它是一个Web站点项目(没有.proj文件,没有将项目代码预编译到dll中),您可以尝试以下方法:

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

在所选的文本编辑器中打开.sln文件,并在“ProjectSection(WebsiteProperties)”中添加以下行:

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.

其中xxxx是一个未使用的随机端口号 - 这似乎是使用正确的服务器和使用开发服务器之间的唯一差异。

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

如果是Web应用程序项目,您可以尝试以下方法:

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

在所选的文本编辑器中打开.proj文件,然后修改WebProjectProperties:

False True 0 / False

False True 0 / False

That might get you going.

那可能会让你前进。

#3


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

#1


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

您可以启动一个新项目并使用“使用自定义Web服务器”选项吗?

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.

就个人而言,我会启动一个新项目并直接从Source Control获取文件 - 作为一个网站,而不是项目,你不应该遇到任何问题,虽然你现在只需要做一个小改动,你可能需要做更多的小事未来的变化,因此快速准备访问源可能会有用。

#2


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:

如果它是一个Web站点项目(没有.proj文件,没有将项目代码预编译到dll中),您可以尝试以下方法:

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

在所选的文本编辑器中打开.sln文件,并在“ProjectSection(WebsiteProperties)”中添加以下行:

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.

其中xxxx是一个未使用的随机端口号 - 这似乎是使用正确的服务器和使用开发服务器之间的唯一差异。

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

如果是Web应用程序项目,您可以尝试以下方法:

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

在所选的文本编辑器中打开.proj文件,然后修改WebProjectProperties:

False True 0 / False

False True 0 / False

That might get you going.

那可能会让你前进。

#3


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