WCF Service Issue on Windows Server 2008 R2

2019-07-29 12:38发布

I had a WCF Service running without issue on Windows Server 2008 and just moved that service over to a Windows Server 2008 R2 instance. The domain name for the site and service were pointed to the new service and the ASP.NET site works just fine. That stated, the WCF Service keeps throwing Endpoint not found responses when trying to run the wsdl=wsdl10 command.

I tried installing the ServiceModelReg in the v3.0/Windows Communication Foundation directory; editing the applicationHost.config file to add in the .svc mimeType, I checked the Handler Mappings but SVC was already there. And I tried running aspnet_regiis -iru from the 4.0 directory.

Nothing worked.

I then tried removing and adding back in the WCF Activation and Process Activation Features - no help there. I rechecked the web.config file but it is using domain names and not IP addresses to define the endpoint's location.

I am completely stuck - does anybody have any ideas?

2条回答
Bombasti
2楼-- · 2019-07-29 12:43

As it turns out, you need to add the Application Server role to the web server (http://technet.microsoft.com/en-us/library/cc754024%28v=ws.10%29.aspx) in Windows Server 2008 and above. That takes care of most of the issues.

Second, all files - including DLLs, images, everything - in the folder containing the website needs to provide Read & Execute privileges to the IUsers group.

Finally if you are using any 3rd party DLLs, you need to make sure IIS has full control - http://learn.iis.net/page.aspx/624/application-pool-identities/

查看更多
Explosion°爆炸
3楼-- · 2019-07-29 12:55

I would like to add a fourth option in this.

My AJAX-enabled WCF service was not working, because on the server the application has a secure SSL connection. You can find more here: MSDN

It states:

IIS-hosted WCF services can make use of HTTP transport security (for example, HTTPS and HTTP authentication schemes such as Basic, Digest, and Windows Integrated Authentication) as long as the IIS virtual directory that contains the service supports those settings. The HTTP Transport Security settings on a hosted endpoint’s binding must match the transport security settings on the IIS virtual directory that contains it.

Here is an approach to solve it: How to programmatically configure SSL for WCF Services

查看更多
登录 后发表回答