Reputation: 24103
What is the best experience of combining wcf services in an asp.NET application?
Should I add wcf services files to the asp.NET project?
Should I create a separate project for the wcf services and refer somehow to them in the asp.NET application?
Upvotes: 0
Views: 266
Reputation: 49985
I presume you have an ASP.NET application that also hosts a few WCF services that can be accessed from the client. There is nothing wrong with this and it works perfectly well.
The three things you should consider doing are:
This may seem like overkill, and it's not always necessary to do it this way, but i would do at least steps 1 & 2. Keeping the data objects and contracts (interfaces) in their own separate assemblies is important as it helps when sharing (referencing) the data objects from different projects (i.e. if you have a Silverlight or Windows Forms/WPF client that can consume those assemblies).
Separating out the implementation (step 3) is good, but not the most important thing to do. If you do follow this step, you can still publish the WCF endpoints through your ASP.NET application.
Upvotes: 1