2

I have a lot of WCF Service Library and each libary has multiple service. I want to host that libaries at one virtual directory in IIS. How can I do that. After that I don't to use config file I read that information from db. I can do that custom service host factory but how can I host Multiple Wcf Service library in same IIS virtual directory?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Sinan Oran
  • 49
  • 2
  • 9

1 Answers1

1

Create a *.svc for each of your multiple service libraries inside that IIS virtual directory..

Each SVC file corresponds to one service (implementation class), so each service needs its own *.svc file - but you can absolutely have multiple *.svc files in a single directory, no problem

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • This way is not good for me. I have 150 WCF Service Library and Each Service Library has 100 service. I want to that service without svc file and web config I configure them dynamically – Sinan Oran Aug 15 '11 at 08:12
  • @Sinan Oran: that's **the way** to do it, at least in .NET 3.5; if you're on .NET 4, you could also use the "file-less activation" model. See the [Developer's Introduction to WCF 4](http://msdn.microsoft.com/en-us/library/ee354381.aspx) to do this without physical *.svc files. – marc_s Aug 15 '11 at 08:29
  • I found my solution. http://blog.micic.ch/net/dynamic-iis-hosted-wcf-service in that address you can see – Sinan Oran Aug 16 '11 at 07:56
  • @Sinan Oran: seems overly complicated to me - but if it works for you - all the better! – marc_s Aug 16 '11 at 08:25