简体   繁体   中英

How do I debug and deploy locally with IIS?

I'm getting started with web development so this is probably simple. 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). 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.

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'. Also click on 'Create Virtual Directory' button. And now application can be debbuged 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. Just choose "Local IIS Web Server." The rest should be fairly self-explanatory.

Tools > Attach to process > w3wp.exe > Attach button

You need to launch VS as admin to do this. 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. There is a VS addin called "Attach to" that will add an Attach to IIS menu item i the tools menu.

you need to attach process to IIS or you can directly set up visual studio project properties to use local IIS web server.

Attach the debugger to the IIS process. 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)

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM