Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IIS cannot be used to debug ASP.NET Core 1.0 websites without publishing them first #1927

Closed
PonchoPowers opened this issue Feb 6, 2017 · 14 comments

Comments

@PonchoPowers
Copy link
Contributor

PonchoPowers commented Feb 6, 2017

IIS Express allows you to debug a project, but IIS does not, without publishing it first.

What I don't understand is why IIS cannot work in the same way as IIS Express.

Historically, we have been able to point IIS to our project directory and then build the application. When the website is requested, IIS serves it without a problem. Then, if we wanted to debug the application in Visual Studio, we could just attach the debugger to the w3wp.exe process.

We now have to point IIS to the location of the published website and we have to keep publishing the website when we make a change which requires a build. After we have done that we then need to visit the website so that we can attach the Visual Studio debugger to the dotnet.exe process. This means we can't debug the first request made to IIS.

If you look at the questions asked on Stack Overflow, you can see there are a number of people asking why you have to publish first, expecting things to work as they did previously. It seems like a step back to me.

I get that you should be using IIS Express to debug when developing in Visual Studio, but it is untrue to say that IIS and IIS Express work the same because there are subtle differences which can catch you out, and end up wasting hours of your time, trying to work out why something works in one and not the other.

The problem I have is it takes so long to publish a website, because you have to stop IIS, publish the website and start IIS again, that developers will ultimately get frustrated. Builds take long enough, so we shouldn't have to wait to publish too in order to test.

Therefore, can you clarify why IIS Express allows you to debug the project and IIS doesn't?

@PonchoPowers PonchoPowers changed the title IIS cannot be used to debug ASP.NET Core 1.0 website without publishing it first IIS cannot be used to debug ASP.NET Core 1.0 websites without publishing them first Feb 6, 2017
@guardrex
Copy link
Contributor

guardrex commented Feb 6, 2017

Looks to be a dup of either/both:
aspnet/Tooling#734
aspnet/Tooling#912

@Tratcher
Copy link
Member

Tratcher commented Feb 6, 2017

Indeed. VS tooling for developing directly in IIS will be available eventually, but we've got to deal with some more fundamental things first like the project.json -> csproj transition.

@PonchoPowers
Copy link
Contributor Author

Are there plans to have it available for the release of Visual Studio 2017?

@Tratcher
Copy link
Member

Tratcher commented Feb 6, 2017

No

@olsh
Copy link
Contributor

olsh commented Jun 26, 2017

Are there any updates on this?

@Tratcher
Copy link
Member

@BillHiebert how's the IIS tooling coming along?

@olsh
Copy link
Contributor

olsh commented Aug 17, 2017

Well, the feature was released in VS 2017 15.3
https://www.visualstudio.com/en-us/news/releasenotes/vs2017-preview-relnotes
(ASP.NET Core : In addition to IIS Express, we now also support F5 with IIS for ASP.NET Core projects.)

But it's pretty buggy. When I use it, VS freezes from time to time and detaches debugger.
Sometimes debugging doesn't start and only iisreset or the PC rebooting helps.

@PonchoPowers
Copy link
Contributor Author

PonchoPowers commented Aug 17, 2017

Thanks for making me aware of this. I didn't hear about this as I've not been keeping a close eye on things.

15.3 is a preview release so I don't think the feature is ready for production yet.

You might be best off logging a bug for the issue you are having then it can be tracked otherwise it might be lost in the discussion taking place in regards to this issue.

@olsh
Copy link
Contributor

olsh commented Aug 17, 2017

Hmm, it seems like a release.
https://blogs.msdn.microsoft.com/visualstudio/2017/08/14/visual-studio-2017-version-15-3-released/

If you download the installer from https://www.visualstudio.com/ it will install 15.3

Upd. I posted a wrong link in the previous comment, here is the correct one:
https://www.visualstudio.com/en-us/news/releasenotes/vs2017-relnotes

@PonchoPowers
Copy link
Contributor Author

Yup the first link you sent confused me, is it the preview release you installed and are having problems with or the production release?

@olsh
Copy link
Contributor

olsh commented Aug 17, 2017

I installed the production release from https://www.visualstudio.com/

@PonchoPowers
Copy link
Contributor Author

I can't see how to debug directly in IIS without publishing first, are you getting IIS mixed up with IIS Express?

@PonchoPowers PonchoPowers reopened this Aug 17, 2017
@olsh
Copy link
Contributor

olsh commented Aug 17, 2017

You don't need to publish an app or use IIS Express.
https://blogs.msdn.microsoft.com/webdev/2017/07/13/development-time-iis-support-for-asp-net-core-applications/

@PonchoPowers
Copy link
Contributor Author

Ah cool thanks for this additional information, I just tested and it does indeed work, I am not having problems so you should log a new bug at https://developercommunity.visualstudio.com/spaces/8/index.html

natemcmaster pushed a commit that referenced this issue Dec 5, 2018
…-master

[automated] Merge branch 'release/2.2' => 'master'
@ghost ghost locked as resolved and limited conversation to collaborators Dec 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants