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

发布于 2024-07-12 23:23:07 字数 458 浏览 7 评论 0原文

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

我现在需要回去对项目进行一些小改动,但与此同时我已经购买了一台新机器。 在我的新机器上,我没有 IIS,而且也不想再继续使用 IIS,因为我发现 ASP.Net 开发服务器足以满足我的需求。

如果没有成为管理员并安装 IIS 6,我根本无法在 Visual Studio 中打开该项目。是否可以通过某种方式修改项目和解决方案文件以使其正常运行并使用 ASP.Net 开发服务器?

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

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

谢谢你的帮助,

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,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

人心善变 2024-07-19 23:23:07

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

就我个人而言,我会开始一个新项目并直接从源代码管理获取文件 - 作为一个网站而不是项目,您不应该遇到任何问题,虽然您现在只需要进行细微的更改,但您可能需要进行更多的细微更改未来可能会发生变化,因此快速且随时访问源代码可能会很有用。

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.

笑梦风尘 2024-07-19 23:23:07

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

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

VWDPort = "xxxx"

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

如果它是一个 Web 应用程序项目,您可以尝试以下操作:

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

错误的
真的
0
/

错误的

这可能会让你继续前进。

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.

旧话新听 2024-07-19 23:23:07

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文