3

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
Steen Tøttrup
  • 3,755
  • 2
  • 22
  • 36
Tobias Koller
  • 2,116
  • 4
  • 26
  • 46
  • So do you still have a question? Or did you just answer it yourself? – Steen Tøttrup Jan 05 '15 at 11:47
  • yes I answered my question. – Tobias Koller Jan 05 '15 at 12:22
  • 1
    Just as a remark, maybe helpful for other people: I was trying to achieve the same but by using the /path:[...] option, which did not work as expected. The solution was quite simple but unintuitive: **the path you provide in as /path argument needs to be the _parent_ folder of the 'bin' folder in which your compiled WebApi binaries lie.** – Efrain May 10 '16 at 11:40

1 Answers1

1

You can try that

C:\Program Files\IIS Express\iisexpress.exe /config:"C:\Users\Tobias\Documents\IISExpress\config\applicationhost.config" /site:MyWebservicename
Ali A. Jalil
  • 873
  • 11
  • 25