Thursday, March 5, 2009

Unauthorized (401.1) Exception calling Web Services in SharePoint (.Net Framework 3.5 )

After installing .NET Framework 3.5 sp1 following error may occur while making call to webservice. This thing mostly happen when you are trying to make webservice call using fully qualified domain name instead of IPAddress or Hostheader is used to map request on single port.

I found one strange thing in IIS Log that , for such request it is not sending authentication information to webservice request even though you pass it in NetworkCredential. One solution is to disable integrated authentication and use basic authentication. This will compromise with security but solve problem. Another solution that need to require registry changes. You can find it at following link with grate explanation.

http://www.crsw.com/mark/Lists/Posts/Post.aspx?ID=44
http://support.microsoft.com/default.aspx?scid=kb;EN-US;896861

No comments: