iis express visual studio 2017

I am having an issue with Visual Studio 2017 RC where when I run an MVC and/or WebAPI app using IIS Express the app never actually runs. Instead I get stuck with a page in the browser indicating it is trying to attach and from there it goes no further. If I open another tab/window in the browser and try to navigate directly to the launch URL, it just spins forever. Likewise when I run this using the dot net run command, the app launches and runs fine.

There do not seem to be any errors that I can see, just that the browser spins indefinitely without actually ever loading the page/endpoint.

Note: this occurs for most any circumstance. Newly created project in VS with no changes, known working project from previous versions, etc.

Содержание

  1. 2 Answers 2
  2. 9 ответов
  3. 19 Answers 19

2 Answers 2

Looks like our workarounds meanwhile are

  • dotnet run
  • Publish to local IIS. Which is working for me.
  • (Untested: downgrade from core-1.1 to core-1.0)

If you aren’t familiar with VS2017/asp.net:

You have, or can reveal via View Menu —> Other Toolbars :

Debug toolbar —> dropdowncombobutton saying » [green arrow>] IIS Express «

  • Click on the dropdown downarrow part of the button.

You should see a Run option. This is the equivalent of dotnet run from the commandline.

You can configure the options that appear in the dropdown with

Right-click on project in solution explorer —> Properties —> Debug

Если я попытаюсь запустить мое. Сетевое приложение, я получаю это сообщение. Я понимаю, что есть много сообщений, требующих исправить это, но я пробовал каждый метод, который они предлагают, и никто не работает.

Если я войду в свойства проекта при отладке и изменим порт, он будет подключаться 1 раз. Затем, если я попытаюсь подключиться снова, он снова даст мне ту же ошибку. Затем я могу переключить порт обратно на оригинал, и он будет загружаться один раз, после чего он будет работать в любое время, кроме этого, пока я не переключу его снова. У кого-нибудь есть идеи или исправления, которые они использовали?

9 ответов

8 Решение Tofuninja173 [2017-11-13 07:51:00]

Я установил core 2.0 и обновил VS 2017 до 15.4.3 сегодня, имел ту же ошибку.

Я закончил тем, что менял приложение для работы на другом порту, это сработало для меня.

Я попытался удалить папку vs, но не работал.

У меня была эта проблема. В каталоге проекта есть скрытая папка с именем «.vs». Закройте Visual Studio и удалите эту папку. Проблема будет решена.

1 DomBurf [2018-03-27 18:48:00]

Я знаю, что уже есть принятый ответ на этот вопрос, но ни один из решений не работал для меня, и мое решение может помочь кому-то. Я использую VS2017 с проектом ASP.NET Core 2.0 Razor Pages.

Ошибка только начала появляться без видимой причины, и я попробовал решения, размещенные здесь.

Я запустил веб-приложение из командной строки, используя команду прогона dotnet, чтобы проверить, не вызвало ли это каких-либо значимых ошибок, и было предупреждение о том, что URL-адрес не связан правильно. Я просмотрел в своих проектах PropertieslaunchSettings.json файл и заметил, что свойства applicationUrl были разными.

  1. Измените значения для приложенияURL, чтобы они были одинаковыми
  2. Закройте проект и закройте VS
  3. Удалите скрытую папку.vs (как указано в принятом ответе)
  4. Запуск VS в качестве администратора

Ваше приложение должно работать нормально.

В решении, если у вас есть несколько проектов с использованием ASP.NET Core в Visual Studio 2017, и вы пытаетесь использовать тот же номер порта, вы получите эту ошибку. У вас должно быть уникальное назначение портов в вашем решении.

Перейдите сюда в свой проект: Properties/launchSettings.json, откройте этот файл и отредактируйте номера портов здесь. Примечание. Здесь вы меняете порт SSL (два места).

Причина: VS/IIS Express поддерживает привязки ко всем проектам ASP.NET Core в вашем решении, использующим IIS Express в качестве сервера. Например, если вы используете Kestrel или какой-либо другой сервер, у вас не будет этой проблемы. VS создает новый порт для каждого приложения, когда он создан в решении, чтобы убедиться, что у вас нет конфликтов портов.

Если вы пытаетесь использовать ответные порты приложений Azure AD и пытаетесь «повторно использовать» регистрацию вашего приложения, вы можете просто изменить порт «app», чтобы вам не пришлось регистрировать его в Azure; Это не будет работать. Если вы просто тестируете приложения и хотите повторно использовать регистрацию, вы должны убедиться, что приложение, в котором вы сейчас работаете, является ТОЛЬКО одним из портов — вручную. Если вам нужно протестировать два или более приложения, вы должны зарегистрировать их в Azure AD индивидуально, как и в процессе производства.

If I attempt to launch my .net core app I get this message. I realize there are many posts out there claiming to fix this but I have tried every method they suggest and none are working.

If I go into the project properties under debug and change the port, then it will connect 1 time. Then if I attempt to connect again, it will give me the same error again. I can then switch the port back to the original and it will load one time, then it will fail any time beyond that, until I switch it again. Anyone have any ideas or fixes they used?

19 Answers 19

I installed core 2.0 and updated VS 2017 to 15.4.3 today, had the same error.

I ended up changing the application to run on a different port, it worked for me.

I have tried to delete the vs folder but did not work.

I had this problem. There is a hidden folder in directory of project that name is ‘.vs’. Close the Visual Studio and delete this folder. The problem will be solved.

I know there is already an accepted answer to this question, but none of the solutions worked for me and my solution may help someone. I am using VS2017 with an ASP.NET Core 2.0 Razor Pages project.

The error just started appearing for no obvious reason, and I tried the solutions posted here.

I ran the web app from the command line using the dotnet run command to see if that would bring up any meaningful errors, and there was a warning about the URL not being correctly bound. I looked in my projects PropertieslaunchSettings.json file and noticed that the applicationUrl properties were different.

  1. Change the values for applicationURL so they are the same
  2. Close the project and close VS
  3. Delete the hidden .vs folder (as mentioned in the accepted answer)
  4. Start up VS as Admin

Your app should work fine.

In a solution if you have multiple projects using ASP.NET Core in Visual Studio 2017 and you are trying to use the same port number you will get this error. You must have unique port assignment in your solution.

Go here in your project: Properties/launchSettings.json open this file and edit the port numbers here. Note: This is where you change the SSL port (two places).

Reason: VS/IIS Express maintains bindings to all the ASP.NET Core projects in your solution that use IIS Express as the server. For example if you use Kestrel or some other server you will not have this problem. VS creates a new port for each app when it is created in the solution to ensure you do not have port conflicts.

If you are trying to use Azure AD registered applications reply ports and trying to «reuse» your app registration, you might think to simply change the «app’s» port so that you don’t have to register it in Azure; this will not work. If you are just testing apps and want to reuse a registration then you must make sure that the app you are currently working on is the ONLY one on the port — manually. If you need to test two or more apps then you must register them in Azure AD individually as you would in production.

Источник: computermaker.info

Техника и Гаджеты
Добавить комментарий