简体   繁体   English

无法在vs2017(.net Core)中运行WebAPI解决方案

[英]Unable to run webapi solution in vs2017(.net core)

Hi I started working on visual studio 2017 and trying to create small webapi application using .net core. 嗨,我开始研究Visual Studio 2017,并尝试使用.net core创建小型Webapi应用程序。 I followed https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-web-api . 我遵循了https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-web-api My application name is RestPrototype. 我的应用程序名称是RestPrototype。 When i click on the arrow of run i can see below options. 当我单击运行箭头时,我可以看到以下选项。 1. RestPrototype 2. IISExpress. 1. RestPrototype 2. IISExpress。 In visual studio browser options were coming. 在Visual Studio中,浏览器选项不断涌现。 When i click on the name of the application(RestProtocol) program begins to run. 当我单击应用程序的名称(RestProtocol)时,程序开始运行。 First one black screen appears next IE will open and close. 首先出现一个黑屏,然后下一个IE将打开和关闭。 I have attached below screen shot. 我已附上以下屏幕截图。

在此处输入图片说明

Can someone help me to run the above application? 有人可以帮我运行上面的应用程序吗? Any help would be greatly appreciated. 任何帮助将不胜感激。 Thank you 谢谢

After clicking on your project name RestProtocol under Run option your project gets started and it gets self hosted. 在“运行”选项下单击您的项目名称RestProtocol后,您的项目开始启动并进行自我托管。
So you able to see whether the port number assigned to your project is active or not using Resource Monitor in your system. 因此,您可以使用系统中的资源监视器查看分配给项目的端口号是否处于活动状态。
If it is active use Postman or other rest client to give Web API request that you had created in your project. 如果处于活动状态,请使用Postman或其他Rest Client发出您在项目中创建的Web API请求。 You can see your rest API will works. 您可以看到其余的API可以使用。
I tried this it works for me. 我尝试过它对我有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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