Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm trying to use the Admin webservice of SharePoint 2007 within a console application. So I add a new service reference to my project pointing to http://<central administration>/_vti_bin/Admin.asmx. But instead of creating the proxy class it ends in an error. Regarding the error message, the service cannot be accessed due to an authentication problem.

The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'.

Also trying to access the page via web browser results in a redirect to an error page. I can access all other webservices via browser as well as via Visual Studio.

I've also had a look at the add service reference menu, but couldn't find option to pass any credentials.

What am I doing wrong?

share|improve this question
    
I never had any problems with making a reference to the admin.asmx of the Central Admin WebApp. Is your CA maybe running using https?I never had any problems with making a reference to the admin.asmx of the Central Admin WebApp. Is your CA maybe running using https? –  Anonymous Nov 21 '09 at 12:46
    
No the CA doesn't use https. –  Flo Nov 23 '09 at 10:07
add comment

3 Answers 3

up vote 3 down vote accepted

Ok, my problem got solved. Reading doesn't seem to be one of my strengths. I used the wrong URL. It's not

http://<central administration>/_vti_bin/Admin.asmx

but

http://<central administration>/_vti_adm/Admin.asmx

Sorry for bothering you with my question!

share|improve this answer
add comment

I haven't used web services to communicate with the CA app, but I can't imagine that it works differently than regular SharePoint sites. Anonymous is not supported, you will need to pass some user credentials through the wsObject.Credentials method. You can set it use Default Credentials or you can specify a domain, user, password. Of course the account specified would need access to CA in order to execute.

share|improve this answer
add comment

Chances are that your browser does not recognise central admin as a local site and is not trying to login with your domain credentials.

Try getting the browser to access without an error first by adding your central admin url to your trusted sites and making sure that trusted sites log you in automagically.

If that does not work, use something like fiddler to check what is going on. The normal authentication pattern is that the browsers tries an anonymous call if that has a security error another method is tried(I forget which) and finally an ntlm call is made.

share|improve this answer
    
I'm automatically logged on if I visit the CA, so that shouldn't be the problem. –  Flo Nov 23 '09 at 8:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.