How Do I create a SVC File That References A WCF Class Library???

P

pbd22

OK.

MY QUESTION:

I am having a really hard time understanding how I create a SVC
file in my Web Project that points to a WCF Class Library created in
the same solution.

BACKGROUND:

I have a solution and in it, WebUI and WCF Class Library

MYSolution
- MyWebUI
- MyWCFClassLib

Now, I am trying to add SVC files to my web project so I can
expose my various endpoints.

MySolution
-MyWebUI
----MyService.SVC
-MyWCFClassLib
---- AuthService (Auth.cs, IAuth.cs, AuthService.cs)
---- TradeService (Trade.cs, ITrade.cs, TradeService.cs)

MY SPECIFIC QUESTIONS ARE:

1) Do I need to create a new SVC file for each namespace?
Since I have both Authentication and Trade I would have
auth.svc and trade.svc ?

2) I have been advised in another forum that I should not be
referencing my WCF class library in my Web Project. Assuming I
understood this correctly, is this right? If my SVC file for
Authentication looks like this:

<%@ServiceHost language="c#" Debug="true"
Service="MyProject.WebAPI.Authentication, WebAPILibrary" %>

How does it know about the assembly if it is not a class reference?

Clarification much appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top