Add a service link, multiple credentials

I started a new console application project in VS (I am using VS2010) and select Add a service link to a web service protected by username and password.

When I click Go to the dialog box, I am faced with a Yes / No prompt to accept the certificate. I select Yes, then I come to the Discovery credential prompt, asking for a username and password.

If I assign them correctly several times (3+), I finally get access to the WSDL. Or, oddly enough, if I correctly name them once and then cancel and then repeat the process, my loans are accepted on the first try.

I asked The Googles and found some examples related to SQL Reporting Web Services, and someone posted something similar here, but no one seems to have a definitive answer.

Can anyone explain this weird behavior? Is the service configured incorrectly or is it some known issue with web services or WCF services?

+6
source share
5 answers

I am not sure if this is the answer or not, but I am sending it if it helps someone else.

From what I saw, if you are faced with the problem of a continuous username and password when adding a link to a web link or service to a secure web service, and you are sure that the credentials are correct, make sure that you are trying to do two things

1) Use domain name \ username instead of username

2) After you enter your credentials at least once correctly, and you are prompted to repeat the second time, DO NOT DO A FEW MORE for 30-60 seconds (I just did this, YMMV). If you wait in response to an invitation and then click Cancel, the service link may sit there, waiting for you to add to the project.

From what I see, Visual Studio is in a hurry and will re-offer you before you have time to load WSDL and / or create proxy classes.

+7
source

I have almost the same problem. It was necessary to provide credentials more than 3 times and never stopped. Enabling an anonymous solution is not real. This will not request credentials.

Solution (without anonymous): - enter a username with DOMAIN information . There are two domains in my client environment.

That you get the invitation three times (I think) because it does some discovery things at three different URLs.

+5
source

I was worried a lot about it yesterday, and Google did not help much, except to search for others who encountered the same confusion.

I could perfectly view wsdl in IE, so IE just passed credentials. Thus, after 5 hours "wtf" decided that the link to the discovery link in VS2010 simply did not transmit the credentials .... it is confirmed by the msg error message indicating that the server does not allow anonymous authentication.

"so that he would not provide my credentials in the same way as IE?"

The mind may not. perhaps I assumed that would be so. Perhaps VS2010 ONLY wanted anonymous authentication to discover.

By checking the SSRS services that I was trying to “discover,” it was discovered that anonymity was not allowed.

So, in my case, VS2010 wanted to authenticate anonymity for discovery and didn’t seem to want to provide credentials in the same way as IE.

So, I opened IIS on the hosting server, turned on anonymous authentication for SSRS, and VS2010 stopped presenting useless login prompts.

A service reset has entered and proxies have been generated.

I have not tried disabling anonymous access, but I mean that since I am going to pass ClientCredentials to the proxy, when I use it, it will be safe to disable anonymous access on the host.

VS2010, which is simply required for authentication anonymously from this dialog box, I assume. He did not return to provide credentials, as I expected.

0
source

I had the same issue that tried to connect to a secure third-party web service, even though I have credentials and they work.

The workaround I found that worked from this fooobar.com/questions/425354 / ... - it seems you can enter the credentials as part of the discovery URL as follows:

http://[username]:[password]@[serviceUrl]/service?wsdl 

eg.

 http://bob1: password1@myservice.com /service?wsdl 

When I tried this method using the Add Service Link dialog box, I no longer received these credential pop-ups, and proxy classes were created without problems.

0
source

Today I came across a similar case. I followed many workarounds, but none of them worked. Then I tried a new approach: instead of typing http://server.domain.name/path/to/wsdl I entered http: //server.ip.address/path/to/wsdl and it worked like a charm.

0
source

Source: https://habr.com/ru/post/905546/


All Articles