[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

401 error connecting to sharepoint via web service

Posted on 2011-02-15
8
Medium Priority
?
472 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Loops Section Overview
Screencast - Getting to Know the Pipeline
Suggested Courses

865 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