如何在本地运行 ASP.NET C# Web 应用程序?
对于 Web 应用程序,我使用 ASP.NET C#(操作系统- Windows7、.NET 4)并且任务已完成。但我不知道如何在Windows7以及Server 2008(服务器2008中安装了.NET 4和IIS)中本地运行它。我必须在两个平台中运行它。所以请提供任何帮助。多谢。
For a web application I am using ASP.NET C# (OS- Windows7, .NET 4) and the task has done. But I don't know how to run it locally in Windows7 as well as in Server 2008(.NET 4 and IIS installed in server 2008). And I have to run it in both the platfrom. So any help please. Thanks a lot.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您的 Win 7 计算机上安装了 IIS 7,则:
,该按钮负责让您的应用程序使用 IIS 运行。您还可以像这样开发/调试 ASP.NET 应用程序。
至于部署 ASP.NET 应用程序,请确保安装了所有先决条件。您需要使用 IIS 管理器创建网站并将该网站关联到应用程序池。
If you have IIS 7 installed on your Win 7 machine, then:
That takes care of getting your application to run using IIS. You can also develop/debug ASP.NET applications like this.
As regards, deploying your ASP.NET application, after making sure all pre-requisites are installed. You'll need to use IIS Manager to create a website and associate that website to an application pool.
首先,您需要 .NET 4 Framework< /a> 在本地计算机上,您必须从 Windows 7 相应的添加/删除软件(激活功能)添加 IIS 功能。我假设您使用的是 Windows 7 Pro,因为家庭/基本版不支持此类服务器/开发任务。
如果此任务已完成,我认为您只需将文件放入 iis(标准)inetpub 文件夹(c:\inetpub\wwwroot)即可。您可以在 Windows 7 中配置 IIS,其方式与 Windows Server 2008 中的方式基本相同。
因为您似乎不是 Visual Studio 的用户,所以我还建议尝试 Visual Web Developer Express 或 WebMatrix。这两者都附带一个内部 Web 服务器,可以在调试 Web 应用程序时自行启动/停止。
At first you need .NET 4 Framework on the local computer and you have to add the IIS functionality from Windows 7 corresponding add/remove software (activate functions). I presume you have Windows 7 Pro, because the home / basic edition aren't supporting server / development task like those.
If this tasks already is done, i think you just have to put your files into the iis (standard) inetpub folder (c:\inetpub\wwwroot). You can configure IIS in Windows 7 on mostly the same way as in Windows Server 2008.
Because it appears that you aren't a user of Visual Studio I would also recommend trying Visual Web Developer Express or WebMatrix. Both of those ships with an internal webserver that starts/stops themself while debugging the web application.