Hi all.
I am trying to get data from a 3rd party webservice. It seems the
webservice is running on an iis server. Fiddler shows me:
"Server: Microsoft-IIS/6.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET"
Fiddler shows furthermore:
"Access is denied.
Description: An error occurred while accessing the resources required
to serve this request. This may have been caused by an incorrect user
name and/or password.
Error message 401.1: Logon credentials were not recognized. Make sure
you are providing the correct user name and password. Otherwise,
contact the Web server's administrator for help."
If i paste the webservice url into my browser there is a prompting
dialog for username and password. With my login data everything works
fine and i can see the wsdl.
Now, here my code how i try to access the webservice:
myCredentials = new
System.ServiceModel.Description.ClientCredentials( );
myCredentials.UserName.UserName = "myUser";
myCredentials.UserName.Password = "myPass";
WSClient myWSClient = new WSClient();
myWSClient.ClientCredentials.UserName.UserName =
myCredentials.UserName.UserName;
myWSClient.ClientCredentials.UserName.Password =
myCredentials.UserName.Password;
WSDataResponse myWSDataResponse = new WSDataResponse();
myWSDataResponse.CultureCode = "de-DE";
WSDataRequest myWSDataRequest = new WSDataRequest();
myWSDataRequest.CultureCode = "de-DE";
myWSDataResponse = myWSClient.GetWSData(myWSDataRequest);
WSDataDictionary[] myWSDataDictionary =
myWSDataResponse.WSDataDictionary;
It is the first time i work with WebServices. I dont know if you need
more informationen. Can somebody help me to find a solution for this?
Greetz
Sebastian