Today I Learned: How to run Web Service Project in IIS Express

One thing I really hate is getting stuck on something and googling for a solution, and getting pages upon pages of solutions for problems that aren’t mine.  Not saying it should be different, but it does tend to get me upset.

I have a web service that I need to test, and I want to do that without locking up Visual Studio.

I right clicked the solution, hit Publish.  Selected IIS, FTP, etc option, selected File System from the Publish Method drop down, and put it in a shallow folder in C:\.

Ran iisexpress and gave it the path of the folder I indicated in the previous step.

iisexpress /path:C:\iis\ /port:9090

Started up my test application which makes requests to the URL.

localhost:9090/api/<controller>/<action/

Worked just fine.  This probably shouldn’t have taken up 2 hours of my time…

Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s