-1

At this point I have a WCF Service working using Cassini/IIS Express with a .NET client when I run it from Visual Studio, but am having difficulties when I try to publish it to directly IIS. For some reason I cannot connect to the WCF Service. I have been researching how to publish by looking at these Microsoft online docs:

https://learn.microsoft.com/en-us/dotnet/framework/wcf/wcf-service-publishing

For now I am just trying to publish it locally, where I choose to publish it to the File System to C:\inetpub\wwwroot\GeoService but when I try to browse to the server I only get errors like:

BTW, I have tried browsing to these sites:

http://localhost/GeoService.svc

http://localhost/GeoService/

http://localhost/GeoService/GeoService.svc

Where I get errors like:

HTTP Error 404.0 - Not Found

HTTP Error 403.14 - Forbidden

Please note that the full source code is here:

https://github.com/john1726/WcfEndToEnd.git

What am I missing? Does anyone have any suggestions? TIA.

user8128167
  • 6,929
  • 6
  • 66
  • 79
  • 1
    WCF is not enabled by default on Windows, so you need some extra steps (for Windows Server releases you can refer to https://help.genesys.com/pureconnect/mergedprojects/wh_tr/mergedprojects/wh_tr_web_portal_marquee/desktop/activate_windows_communication_foundation_wcf.htm) – Lex Li Aug 23 '21 at 19:27

1 Answers1

0

Please note that I tried to perform the steps in the Microsoft online docs but I ended up having to update the server by going to Programs and Features -> Turn Windows Features on or off and selecting .NET Framework 4.8 Advanced Services where I enabled all options because the aspnet_regiis.exe -ir and ServiceModelReg.exe -ia commands are no longer supported:

  • ASP.NET 4.8
  • WCF Services

For WCF Services I turned on:

HTTP Activation
MSMQ Activation
Named Pipe Activation 
TCP Activation
TCP Port Sharing

Also I turned on Windows Process Activation Service:

.NET Environment

Furthermore, I had to turn on Directory Browsing by going to IIS Manager and navigating to MyServer -> Sites -> My Site and clicking on Directory Browsing and choosing Enable.

Another step I did was enable IIS 6 metabase by in the turning features on or off I went to Internet Information Services -> Web Management Tools -> IIS Metabase and IIS 6 configuration compatibility

See Error - Unable to access the IIS metabase

Thus the URL I ended up using was:

http://localhost/GeoService/GeoService.svc

user8128167
  • 6,929
  • 6
  • 66
  • 79