Solved

401 error connecting to sharepoint via web service

Posted on 2011-02-15
8
443 Views
Last Modified: 2012-06-22
I've created a web app which displays sharepoint data on web pages.
This has always worked fine. We upgraded the sharepoint instance to 2010 and all was well within the sharepoint front end.
I open the visual studio web project and change the web reference to point to the new sharepoint address.
I can run the project locally on my workstation (asp.net development server) but when I copy the changes to the web server I get 401 unauthorised access errors.
The IIS settings have not changed.
Windows authentication and impersonation is used (The web.config )
I have rebooted the web server and the sharepoint server on the network admins advice as a server somewhere had been demoted fom being a domain controller and <insert networky speak>

Any ideas?
0
Comment
Question by:QPR
  • 5
  • 2
8 Comments
 
LVL 2

Expert Comment

by:siteoutfitters
ID: 34901237
Do you receive this error message only if you try to browse the Web site directly on the server? If you browse the Web site from a client computer, the Web site works as expected please review this helpful link:
http://support.microsoft.com/kb/896861/en-us

If that's not helpful I will do some more checking for you.
0
 
LVL 29

Author Comment

by:QPR
ID: 34901288
If I browse to the URL from my workstation I get 401
If I RDP to the web server and then browse to the URL from there I get in fine!

This leads me to suspect that this server does not have delegation to the SP server but it did for the original. Will check this when I get back from a meeting I have to dash to. Thanks for the clue
0
 
LVL 14

Expert Comment

by:KoenVosters
ID: 34901353
When looking at the event viewer, what type of authentication are you using?
If you are using Kerberos (and changed the urls of the site) did you change the SPN's with ADSIEDIT?
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 29

Author Comment

by:QPR
ID: 34911024
siteoutfitters
The url http://support.microsoft.com/kb/896861/en-us doesn't apply as I have the oppsite situation.
I can browse the sire directly from the server but not from the client PC

Could the port number be something to do with it?
On the old 2007 server the SP site was found under the default port 80... on this new SP 2010 server the site lives in a site collection at port 47272
0
 
LVL 14

Expert Comment

by:KoenVosters
ID: 34913974
If you want to be sure about the ports extend the web app to a hostheader on port 80 add it to your hosts file and test local on your server. But i do not think the port is the problem. The web service, is it running in the vti bin of sp?
0
 
LVL 29

Author Comment

by:QPR
ID: 34919244
I have stopped the site on port 80, changed the SP site to use port 80, changed the url and it's still the same so, I agree, we can discount ports.
Yes I am pointing to the _vti_bin folder and to the asmx file

Everything points to delegation not being set up but the network admin assures me it's been done in AD
0
 
LVL 29

Accepted Solution

by:
QPR earned 0 total points
ID: 35186940
MS are on the case and are working through this so I may as well clean up here
0
 
LVL 29

Author Closing Comment

by:QPR
ID: 35221380
see comment
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SharePoint Designer 2010 has tools and commands to do everything that can be done with web parts in the browser, and then some – except uploading a web part straight into a page that is edited in SPD. So, can it be done? Scenario For a recent pr…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question