Click here to Skip to main content
15,920,217 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
There was an error downloading 'http://localhost:2022/Service1.svc?wsdl'.
Unable to connect to the remote server
No connection could be made because the target machine actively refused it
Metadata contains a reference that cannot be resolved: 'http://localhost:2022/Service1.svc?wsdl'.
There was no endpoint listening at http://localhost:2022/Service1.svc?wsdl that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
Unable to connect to the remote server
No connection could be made because the target machine actively refused it
If the service is defined in the current solution, try building the solution and adding the service reference again.
Updated 29-May-14 0:49am
Murali Vijay 29-May-14 3:43am    
Have you configured your service in web server??
Nandhini Devi 29-May-14 4:49am    
how to configure i am new to this field ?
Naz_Firdouse 29-May-14 4:14am    
is your service running either locally or in IIS???
Nandhini Devi 29-May-14 4:50am    
its running locally only and please say how to do it in iis
Murali Vijay 29-May-14 5:15am    
if you are working in local machine , the service should be in running mode.then only it will
take the service ref or else configure your service in iis

1 solution

See If it is running locally at that time your Service should be in running mode. I meant to say that you should run through your visual studio in other instance and your client should use it in different instance in, so that user service should always be working in your local machine.

just confirm that , or you can deploy the service in IIS and use that URL to configure your service. I hope this helps you
Share this answer
Nandhini Devi 29-May-14 7:57am    
i am new to this and if you know what to do can you help me wcf +windows phone +sql .this is what i am doing
Murali Vijay 29-May-14 8:11am    
you have done everything in correct manner.just run the wcf service application and copy the wcf url then add the service reference in web application . then problem will solve.
Nandhini Devi 29-May-14 10:49am    
when i run wcf service its working and service created message is displayed like this "You have created a service.

To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:"
but after i tried to add reference its not working .. displayed error above like that
Nandhini Devi 29-May-14 10:44am    
when i tried to add the reference only i got error like that .i dnt know how to solve
Ranjeet Patel 30-May-14 3:32am    
it seems you are running in local host. If yes do one check, Just copy the URL of the service in other browser and check whether the service is in running mode.

The thing is when you add the service it should be in running mode always.

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