简体   繁体   English

如何在IIS本地调试和部署?

[英]How do I debug and deploy locally with IIS?

I'm getting started with web development so this is probably simple. 我开始使用Web开发,所以这可能很简单。 I once worked with someone that had me setup my workstation so that I could host my web apps locally in IIS (not IIS Express). 我曾经和那些让我设置工作站的人一起工作,这样我就可以在IIS(而不是IIS Express)中本地托管我的网络应用程序。 I was able to make changes to the markup and stylesheets and just save the changes, then refresh my browser to see the changes. 我能够更改标记和样式表,只保存更改,然后刷新浏览器以查看更改。 If I changed the code behind, I had to rebuild the solution. 如果我改变后面的代码,我不得不重建解决方案。 But again, I just refreshed the browser and the new changes were ready for testing. 但同样,我只是更新了浏览器,新的更改已准备好进行测试。

There was something different about debugging and actually stepping through the code though; 调试和实际执行代码有一些不同之处; I just don't remember that detail but I can always spin up the built in dev web server for that, I guess. 我只是不记得那个细节,但我总是可以启动内置的开发Web服务器,我想。

Where can I find an outline of the steps necessary to set this up? 我在哪里可以找到设置它所需步骤的大纲? I don't think I need detailed step-by-step instructions. 我认为我不需要详细的逐步说明。

Thanks! 谢谢!

Visual Studio-->Solution explorer-->right click project-->properties-->Web tab-->Mark 'Use Local IIS Web Server'. Visual Studio - >解决方案资源管理器 - >右键单击项目 - >属性 - > Web选项卡 - >标记'使用本地IIS Web服务器'。 Also click on 'Create Virtual Directory' button. 还单击“创建虚拟目录”按钮。 And now application can be debbuged asusual. 现在应用程序可以进行debubged asusual。

Supposing you have IIS installed on your computer, you will find "Server" options in the "Web" tab when you look at your Project properties in Visual Studio. 假设您的计算机上安装了IIS,当您在Visual Studio中查看项目属性时,您将在“Web”选项卡中找到“服务器”选项。 Just choose "Local IIS Web Server." 只需选择“本地IIS Web服务器”。 The rest should be fairly self-explanatory. 其余的应该是相当不言自明的。

Tools > Attach to process > w3wp.exe > Attach button 工具>附加到进程> w3wp.exe>附加按钮

You need to launch VS as admin to do this. 您需要以管理员身份启动VS才能执行此操作。 If there are multiple, attach to the one with the app pool you setup the website under. 如果有多个,请附加到应用程序池中的那个,您可以在其下设置网站。 You will probably need to check show processes from all users. 您可能需要检查所有用户的show processes。 There is a VS addin called "Attach to" that will add an Attach to IIS menu item i the tools menu. 有一个名为“附加到”的VS插件,它将在工具菜单中添加一个附加到IIS菜单项。

you need to attach process to IIS or you can directly set up visual studio project properties to use local IIS web server. 您需要将进程附加到IIS,或者您可以直接设置visual studio项目属性以使用本地IIS Web服务器。

Attach the debugger to the IIS process. 将调试器附加到IIS进程。 To do this, click Debug and then click Attach to Process. 为此,请单击“调试”,然后单击“附加到进程”。

The Attach to Process dialog box is displayed. 将显示“附加到进程”对话框。

Under Available Processes, locate the name of the process to which you want to attach the debugger. 在“可用进程”下,找到要将调试器附加到的进程的名称。 (For windows 7 it is w3wp.exe) (对于Windows 7,它是w3wp.exe)

If the process you need is not displayed, you can display more processes that are running. 如果未显示您需要的进程,则可以显示正在运行的更多进程。 To do this, check Show processes from all users and Show processes in all sessions. 为此,请选中“显示所有用户的进程”和“显示所有会话中的进程”。

Under Available Processes, click the name of the process and then click Attach. 在“可用进程”下,单击该进程的名称,然后单击“附加”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何以完全信任的方式部署IIS ASP .NET应用程序? - How do I deploy an IIS ASP .NET application with full trust? IIS 错误 500.2 -1 如何在 IIS Windows 10 中部署一个简单的自定义处理程序? - IIS Error 500.2 -1 How do I deploy a simple custom Handler in IIS Windows 10? 如何将MVC3 Hello World应用程序部署到localhost并配置IIS - How do I deploy MVC3 Hello World App to localhost and configure IIS 如何使用CLR Profiler调试在IIS 7.5上运行的ASP.Net应用程序? - How do I use CLR Profiler to debug an ASP.Net app running on IIS 7.5? 如何在本地IIS 7中运行asp.net项目 - How can I run asp.net project Locally IIS 7 如何正确部署到IIS 7 - How to properly deploy to IIS 7 如何在Visual Studio中本地调试文件权限问题? - How can I locally debug file permission issues in Visual Studio? 在IIS 7.5上本地运行(部署?)ASP.NET MVC - Run (deploy?) ASP.NET MVC on IIS 7.5 locally 在IIS 7.5中本地部署asp.net网站 - Deploy asp.net website in IIS 7.5 locally 没有授权ASP.NET访问请求的资源。 可以在调试模式下访问文件夹,但是在IIS上部署时无法访问 - ASP.NET is not authorized to access the requested resource. Can access a folder in debug mode but not when I deploy it on IIS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM