1
votes

I have developed and published (via the "publish" feature in VS 2013) a simple WCF web service on IIS on my local machine. The physical deploy path is the folder : c:\inetpub\wwwroot\MyWCF_Service_On_IIS\ I saw on IIS that the virtual folder has been created under "default Web site" (with the same name : MyWCF_Service_On_IIS). The default web site listens on port 80. Why there is no way to access the service ? whatever combination of paths and urls fails. I tried :

localhost/MyWCF_Service_On_IIS/Service1.svc (Service1.svc is the .svc file hosting the only endpoint);

localhost/Service1.svc

127.0.0.1/MyWCF_Service_On_IIS/Service1.svc

127.0.0.1/Service1.svc

localhost

127.0.0.1

Even if I don't expose metadata endpoints I expect to see a least a help page about the service and how to get the metadata themselves. But I only get errors Whatever attempt I do fails miserably. I would like to know, once and for all, what is the rule IIS uses to map virtual folders to physical folders.

1

1 Answers

0
votes

We are supposed to directly deploy all related files/file directories to the root folder of the website by using FileSystem mode.

C:\inetpub\wwwroot

Moreover, we need to enable windows features to handle the SVC extension for supporting WCF service.
enter image description here
There is no need to use a virtual folder in that case. Here is the content of the wwwroot folder on my side.

bin folder
PrecompiledApp.config
Service.svc
Web.config

The service URL is http://localhost/service.svc
If we specify the URL by using a virtual path. We should convert the virtual path to the application.
enter image description here
Then the service URL is http://localhost/MyWCF/Service1.svc.
Feel free to let me know if the problem still exists.