Adding the Reference:
Make sure that you are adding the Reference like this. You need to click on "Add Service Reference
", go to "Advanced
" and finally click on "Add Web Reference
".
Then add the following:
http://***/service1.asmx
For port 8080
you use:
http://***:8080/service1.asmx
Setup the Proxy for your Web Service:
To make sure that the Web Service is using your Internet Explorer proxy
you can add the following to your Web Service
object on your client application.
webService1.Proxy = WebRequest.GetSystemWebProxy();
You can also set up the Proxy manually:
webService1.Proxy = new WebProxy("hxxp://my-proxy-settings:8080/");
NTLM
If you use NTLM you will probably need to make sure that you use the Default Credentials on your client project as well. You can easily do this by passing it in when creating the Web Serivce using UseDefaultCredentials
set to true
.
public webService _webService = new webService() { UseDefaultCredentials = true };
You can also disable NTLM Authentication for your Web Service project. You can do this under Project Properties -> Web
. If you uncheck this option you should be able to add the Web Service without having to authenticate.
http://msdn.microsoft.com/en-us/library/aa378749.aspx