Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
How to define Endpoints for multiple service contracts(interfaces) implemented in separate classes ?
padmavathi gudipati
Aug 26 2010 1:53 AM
2.6k
Reply
Hi
I have taken a WCFService library in which I have defined multipled service contracts(interfaces) in separate cs files and implemented them separately. For example ..
[ServiceContract]
public interface IService1
{
[OperationContract]
string GetService1Msg();
}
[ServiceContract]
public interface IService2
{
[OperationContract]
string GetService2Msg();
}
I have defined above interfaces in separate cs files.
Now I have implemented them separately as follows.
//this is Service1.cs file
public class Service1 : IService1
{
string GetService1Msg()
{
retutn "Service1";
}
}
//this is Service2.cs file
public class Service2 : IService2
{
string GetService2Msg()
{
retutn "Service2";
}
}
My intention here is to expose above two as two service contracts/interfaces outside.
Now My question is how to define endpoints for these two service interfaces in app.config of this WCF Servicelibrary?
Thanks in advance
Padma
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
WCF service Library. Where to add . svc file
Cannot add Service as ServiceReference in Silverlight Project