How to change the default browserwhen running the Asp.Net Core MVC with VS studio 2022?

Zard Wang 21 Reputation points
2022-07-06T09:35:05.883+00:00

It's only Edge in web browser list , can not show and add other browser.
And when I run the project, It prompts an error, can not find this file:"https://localhost:7191"

218133-image.png

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

Accepted answer
  1. Zhi Lv - MSFT 32,011 Reputation points Microsoft Vendor
    2022-07-07T03:01:09.737+00:00

    Hi @Zard Wang ,

    How to change the default browserwhen running the Asp.Net Core MVC with VS studio 2022?

    You can refer to the following steps to add/remove browser:

    Click the small drop down menu arrow beside the debug toolbar menu:

    218357-image.png

    Then choose the Browse With... option, then you can add the browser to the browser list:

    218330-image.png

    After that you can change the debug browser via the Web Browser option.

    218386-image.png

    can not find this file:"https://localhost:7191"

    About this issue, I suggest you can try the following steps:

    1. Try to debug your application via IIS express. Since the request url is an https request, I assume you are debugging the application using Kestrel, like this: 218411-image.png Then, you can change it to IIS express, then debug the application and use the Http request to test the web page.
      218349-image.png
    2. Try to download other browser, and then refer to the previous description to change the browser.
    3. Try to create a new project and test whether it works or not. If not perhaps the issue relates the VS 2022, try to repair it or reinstall it.

    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.

    Best regards,
    Dillion


0 additional answers

Sort by: Most helpful