How to make remote debug to asp.net core 7 hosted on IIS ?

Ahmed Salah Abed Elaziz 390 Reputation points
2023-12-06T22:30:09.9333333+00:00

I work on asp.net core 7 I face more differenced between my local system project with asp.net core 7 and same application hosted and publish on iis

as sample when page load I retrieve join date input and display it without any issue on local system

but when i publish same code that not give me any issue on local and publish it on IIS it give me error

so i need to install remote debug to debug issue on server directly

but I don't know how to make remote debug

I worked on asp.net core 7 visual studio 2022

so I have multi question i need answer for it

when i need to make remote debug to published app hosted on another server ON IIS so

suppose i have two pc

developer pc

iis pc

1- what tools i will install on developer pc for remote debug app on iis

2-what tools i will install on IIS pc for remote debug app on iis

3- What port i will use it

4- what permissions and roles need for two pc

5-how to access my iis applications .NET core which files i will add

to access iis application remotely

please help me answer by details if possible

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,803 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,598 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. AgaveJoe 29,946 Reputation points
    2023-12-06T22:50:29.47+00:00

    I recommend reading the official documentation for the framework and host you are targeting.

    Remote Debugging

    Remote Debug ASP.NET Core on a Remote IIS Computer in Visual Studio

    0 comments No comments

  2. Brando Zhang-MSFT 3,956 Reputation points Microsoft External Staff
    2023-12-07T06:37:52.9966667+00:00

    Hi Ahmed Salah Abed Elaziz,

    1- what tools i will install on developer pc for remote debug app on iis

    Only VS should be installed on the developer PC.

    what tools i will install on IIS pc for remote debug app on iis

    You should install the remote debugger tool from this link according to your VS version.

    What port i will use it

    If you are using the VS 2022, the port number will be 4026, you could also see the port inside the remote debugger tool after you enabling it.

    what permissions and roles need for two pc

    Administrator

    how to access my iis applications .NET core which files i will add

    Using VS's attach to process inside the debug view. By using this you could attach the application process which hosted on the IIS.

    User's image

    More details, you could refer to this article.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.