Quantcast
Channel: Host WCF in IIS - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Host WCF in IIS

$
0
0

Hello all you smart people.

So, I've dared to make myself a WCF-service.It works as is should, when i run it in the WCF testing utility.

But with the next step I've run into some troubles.Hosting the WCF-service in IIS.

As said, the service works with the test utility.

My solution:
https://dl.dropboxusercontent.com/u/21380898/RealKursusSolution.PNG

For hosting my service in IIS i created a folder called "HostIISTcp" as you can see in the solution, where i added my dll's and my pdb's under the "bin" folder. As i can understand, IIS cannot operate with an app.config file so i created a web.config file, where i simply copy/pasted from the app.config file in the class library.

The web.config :

<?xml version="1.0" encoding="utf-8" ?><configuration><system.web><compilation debug="true" /></system.web><system.serviceModel><services><service name="MyWCFServices.RealKursusService.KursistService"><endpoint address="" binding="basicHttpBinding" contract="MyWCFServices.RealKursusService.IKursistService"><identity><dns value="localhost" /></identity></endpoint><endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /><host><baseAddresses><add baseAddress="http://localhost:8080/MyWCFServices/RealKursusService/KursistService/" /></baseAddresses></host></service></services><behaviors><serviceBehaviors><behavior><serviceMetadata httpGetEnabled="True"/><serviceDebug includeExceptionDetailInFaults="False" /></behavior></serviceBehaviors></behaviors></system.serviceModel></configuration>

I believe that the problem lays with the web.config file, and pardon me for being a newbie at this, but I've been googling like a crazy and i really cant find a proper solution.

To sum up:Am I on the right track?Are there another (better) solution for hosting wcf-services in IIS?And if you could point out if anything is missing in the web.config file it would be great.

I'm using visual studio 2012, IIS 8 .net framework 4.5 and sitting in a leather-chair.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>