Last post Apr 17, 2013 11:49 PM by AsadN
Apr 17, 2013 10:18 AM|AsadN|LINK
I have an existing ASP.NET web application running in Production (.NET 4.0, IIS 7.0) on HTTPS (let's call it https://myapp.com). Now there is a requirement to add a new WCF Service to the application which will be consumed by a desktop application located
on a different server. Here is what I have done:
<service name="myService" behaviorConfiguration="myBehavior">
<endpoint address="https://myapp.com/Webservices/myService.svc" binding="basicHttpBinding"
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false" />
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
According to my understanding, I have done all that is required. When I run the URL
What am I missing here? I am a novice to WCF and have been stuck in this issue for too long.
Apr 17, 2013 10:38 AM|Gaspard|LINK
This thread may help
Apr 17, 2013 10:58 AM|sukumarraju|LINK
'resource not found'. To double check, I create a test console application and try to 'Add Service Reference' using the same URL but it fails to discover it.
1. Open the SVC file on IIS by selecting
content tab (shown below), service should respond with the default page.
2. when the above is not working refer below tutorial to host the service on IIS
3. When the service is responding (as above), then refer this article to enable
Update the thread with progress for further help.
Apr 17, 2013 11:49 PM|AsadN|LINK
@sukkumarraju, thanks for your pointers. I browsed the SVC file from within IIS as you suggested, and ran into:
"The service cannot be activated because it does not support ASP.NET compatibility."
To fix this issue, I went on to set
<serviceHostingEnvironment aspNetCompatibilityEnabled="false" />
Moreover I removed 'httpGetEnabled=true' from <serviceMetadata> because I had no endpoints defined on plain http (non-https).