Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

Visual Studio 2012: Can't access Sharepoint Web Services because of Discovery Credentials Prompt

$
0
0
 

Hi.

I've exactly the same problem that is descripted here, so I'll add its description here.

My SharePoint is 2010

I am trying to access the web services that are located in this url:http://<part_of_th_url_omitted>/_vti_bin/Lists.asmx. I have no problem accessing this URL using my broswer, that is, when I type the URL and my browser's address bar and press enter, I can see the list of the services that are available. I encounter no problem by accessing this site through my browser at all.

However, when I try to access the services from that URL (http://<part_of_the_url_omitted>/_vti_bin/Lists.asmx), a Discovery Credential Dialog box prompts me for my username and password. SO what I do is I enter my username and password that I used to access the sharepoint using my browser, the problem is, the dialog box doesn't seem to accept the username and password that I enter as the dialog box is keep on appearing.

Below are the detailed steps on how I go about in adding the Web Services.

1. From the Solution Explorer, I right click on the "Service References" folder.

2. From the context menu that appears, I Click on "Add Service Reference...". The "Add Service Reference" Dialog box will appear.

3. From the "Add Service Reference" dialog box, I click on the "Advanced,,," button which can be seen at the bottom-left of the dialog box. The "Service Reference Settings" Dialog box will appear.

4. From the "Service Reference Settings" dialog box, I click on the "Add Web Reference..." dialog box. The "Add Web Reference" Dialog box will appear. This is the dialog box where I can type the URL of the service that I want to access. So I type "http://<part_of_the_url_omitted>/_vti_bin/Lists.asmx". AFter typing that, I click on the Go button (which is the green arrow button at the right of the address bar of this dialog box).

5. After doing that, a prompt dialog box will appear which has the title "Windows Security" and it is aking for my username and password. SO what I do is I enter the Username and the Password that I use in accessing the sharepoint site (http://<part_of_the_url_omitted>/_vti_bin/Lists.asmx)

6. The prompt seems to accept the Username and Password, but after that, a new dialog box appeared with the title "Discovery Credential" and it says "The Service 'http://<part_of_the_url_omitted>/_vti_bin/Lists.asmx' requires a username and password". SO what I do is I enter again the un and pw that I use to access the sharepoint site, the one that I used inm the previous dialog box.

7 After entering the username and the password and clicking the OK button. The dialog box reappears still asking for a username and a password, but this time, it shows a different message. It says "The Service 'http://<part_of_the_url_omitted>/_vti_bin/Lists.asmx/$metadata' requires a username and password". SO it really, what oonly changed is the URL, it has now the $metadata at the end. What do I do? I eneter the username and password again.

8. After clicking Ok again, the dialog box reappears, now it says "The Service 'http://<part_of_the_url_omitted>/_layouts/1033/error.aspx' requires a username and password." Now it shows a very different username. Of ocurse, I still type in the username and password and click Ok.

9. after doing that, the dialog box reappears again and it shows the same message as in step 6. So I do steps 6, 7 and 8 in a loop.

10. When I finally get tired of entering the username and password, I click on cancel. The message box reappears again. So I click on cancel again. After doing that, I can then, surprisingly, see the list of the web services. However, not surprisingly, I still can't use it because the "Add Reference" button which I need to click in order to use the Web services is disabled. So I can only see the list of the services but I can't use it.



Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>