Click here to Skip to main content
15,906,816 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi:

I am currently developing in Visual Studio 2008 two solutions,the first is a web service project (WebService) and the second is a WCF project (WcfClient) where I will make call to the methods of the first one.
I added the Library reference of the first project to the second.

My problem is that when I made the call, it show me this error message:

Error 1 Type 'System.Web.Services.WebService "is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.Services, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a. C: \ Documents and Settings \ Administrator \ My Documents \ Visual Studio 2008 \ Projects \ WcfLayer \ WcfClient \ client.c 18 13 WcfClient


Please heeeeeeeeeeeeeeeelp. :(( :(( :(( :((

knowing that i'm begginer.
Posted

Thank you very much, the problem was solved when i just add "System.Web.Services" to the references of my WCF project. :rose: :) :rose:
 
Share this answer
 
You need to add System.Web.Services.WebService to the references of your WCF project. That's it, no need for any using statements or anything like that.

What is happening is that your WCF project references your WebService project and you've told it (WCF) where to find it (WebService) by adding it to the references. However your WebService uses the Services.WebService and the WCF project doesn't know how to find it so it complains. Adding a reference tells your WCF project where to look.
 
Share this answer
 
v2
You don't need to add a library reference of your service in the client.
You actually need to add your service as "a service reference" to the client.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900