gpt4 book ai didi

c# - 从命令行运行 ASP.NET Web 应用程序

转载 作者:行者123 更新时间:2023-11-30 20:46:39 29 4
gpt4 key购买 nike

我有 ASP.NET Web 应用程序并想运行它。机器上没有安装 Visual Studio。在装有 Visual Studio 的机器上,我能够使用此链接中提到的步骤运行该应用程序

http://www.codeproject.com/Articles/166319/Run-ASP-NET-Web-Application-from-Command-Prompt

但是,生产箱没有 WebDev.WebServer20.EXE。显然可以下载 exe 文件,然后我可以运行该程序,但在生产机器上我不能那样做。

还有其他方法可以从命令行运行 ASP.NET 程序吗?这是一个简单的程序,我没有使用任何第三方 dll 文件,也没有命令行参数。

最佳答案

Is there any other way to run ASP.NET program from command line? It is a simple program, I am not using any third-party dll files and there are no command line arguments. I have has IIS. Could you tell me what to do next. Actually I am not a .NET developer so not familiar with all this. Any help would be great.

您缺少基本概念。

您不需要像可执行程序一样运行 ASP.Net Web 应用程序。生产服务器不需要 Visual Studio;它只需要 IIS 和目标 .Net Framework。

由于您在本地计算机上安装了 Visual Studio,因此您可以直接发布到生产服务器。 Here是一个例子。 - 或者 - 将文件发布到本地文件夹并将文件复制到生产文件夹。

然后在IIS中创建站点,并映射物理路径。

关于c# - 从命令行运行 ASP.NET Web 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26597461/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com