Running ASP.NET Web Api 2 application without Visual Studio

穿精又带淫゛_ 提交于 2019-12-23 02:36:12

问题


I'm developing a asp web api 2 webservice for a private project. I created a webservice-project which includes all the folder (App_Data,App_Start,Controllers,...) and all my classes/functionallity.

Now I would like to run it as a selfhosted windows service or from command line to test all the functionallity without running Visual Studio.

All I found was a tutorial how to create a new command-line programm and create a new webservice (http://www.asp.net/web-api/overview/hosting-aspnet-web-api/use-owin-to-self-host-web-api) .... But how can I just selfhost my created webservice-project and use its WebApiConfig??

UPDATE 1

at least I found out how to start the IISExpress from CommandLine to test my webservice without VisualStudio: I had to run this:

C:\Program Files\IIS Express\iisexpress.exe /config:"C:\Users\Tobias\Documents\IISExpress\config\applicationhost.config" /site:MyWebservicename

回答1:


You can try that

C:\Program Files\IIS Express\iisexpress.exe /config:"C:\Users\Tobias\Documents\IISExpress\config\applicationhost.config" /site:MyWebservicename


来源:https://stackoverflow.com/questions/27765029/running-asp-net-web-api-2-application-without-visual-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!