Sudeep Gill
Sudeep Gill

Reputation: 193

C# web services

I am new to web services. I was just following a tutorial and created a web service. The next step was to create a proxy by entering wsdl followed by path to esdl contract. It was supposed to create a service1.cs file however my system created service.cs file which was similar to except on the tutorial.

The next step is to create a console tester application. I added the service.cs file to my console project but it cannot compile. I'm getting the following error:

Error   1   
The type or namespace name 'Services' 
does not exist in the namespace 'System.Web' 
(are you missing an assembly reference?)    
C:\.....\tws\Service.cs 4   18  tws

Please help.

Upvotes: 7

Views: 15478

Answers (2)

Siddhartha
Siddhartha

Reputation: 1563

In your project System.Web.Services reference is missing to add this follow below

click on

References> Add References>  Assemblies > Framework >System.Web.Services 

Either scroll the list to find this or type "System.Web.Services" in search box

select System.Web.Services and add it .

Upvotes: 3

Caspar Kleijne
Caspar Kleijne

Reputation: 21864

Did you look in the project references?

System.Web.Services is NOT in System.Web but in a different separate assembly.

See if there is a reference to :

  System.Web.Services

if not add a reference to:

  System.Web.Services.dll

Upvotes: 18

Related Questions