Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running WCF service shows directory listing instead of the service

Tags:

c#

wcf

I'm fiddling with a wcf service, and I've created a simple test one. When I 'run' the service, I get a directory listing in ie of the folder that the service is in. I can click on the 'myservice.svc' and it brings me to the page I'd expect, so that's ok.

I get the eerie feeling that this is wrong. Is it? If so, how is it fixed?

like image 253
Steven Evers Avatar asked Oct 18 '10 21:10

Steven Evers


1 Answers

that's fine. It's a side effect of the fact that your service is being hosted inside a website. Just make sure your webservice client is pointing at the svc file and you'll be set.

In the project properties of visual studio you can configure the "start" page, but this is just a debug (F5) configuration, and will have no effect on your deployment.

like image 159
Rob Fonseca-Ensor Avatar answered Sep 24 '22 17:09

Rob Fonseca-Ensor