Reputation: 411
I am new to WCF and have what I think should be a simple question. I created a solution that contains a WCF service library, and a website to host the service. In the website I reference the service library proj, so the service.dll is in my website's /bin. I edited the .svc file in the website to use the referenced project's service, but when I right click on the web.config and choose "Edit WCF Configuration" under services it says "No services defined".
I am following this tutorial, http://www.youtube.com/watch?v=SVPXLF-g4Ws&feature=related and when he does the "Edit WCF Configuration" step, the referenced service is listed.
He is using vs2008, I am using vs2010. Am I missing something? I am hope I have provided is enough info to get some answers.
Thank You
Upvotes: 0
Views: 1178
Reputation: 11
I am having this same exact issue, but I recreated my WCF service in VS2008 and it worked. I would love to know why the configuration doesn't recognize the service in VS2010.
Update:
I edited the web.config
file replacing the System.ServiceModel
section with the one from the WCF Library app.config
.
Upvotes: 1
Reputation: 87218
At first there are no services defined in the configuration file (web.config) - it's defined in the .svc file, and if you try to access it, it will even work (if you're using .net 4.0), as WCF will add a default endpoint if no configuration is found for the service.
If you want to customize the configuration for your service, select "Create a New Service...", then browse to the /bin directory and select the class library DLL. Then you can select the service class, and proceed from there.
Upvotes: 0