RE: search webservice authorization issue

From: Mario (Mario_at_discussions.microsoft.com)
Date: 03/18/05


Date: Thu, 17 Mar 2005 23:29:01 -0800

Thanks for your reaction. I tried this method and it works fine. Still, I
think it should work using impersonation, but for the time being, using a
dedicated account is OK for me.

Mario

"Ken" wrote:

>
> It works fine on your local machine with default credentials because you are
> hte logged in user on your local server and have full access as an Admin most
> likely to your local box, however, once you cross your local machine
> boundary, your sending your credentials to the target SPS server, SPS in turn
> is authenticating the request and it's failing, if you do not have your
> account setup on that target SPS as someone that can Search you'll get the
> error your getting now.
>
> In general, I usually create a network credential object, then assign the
> account i want to use to execute a remote search on behalf of a user (rather
> than using the current logged on user credentials, which implies I have their
> account setup in SPS to access Search), something like the following
>
> Dim objCred as New NetworkCredential
>
> objCred.Domain = "targetdomain"
> objCred.UserName = "username_with_access_search_on_sharepoint"
> objCred.Password = "password_with_access_search_on_sharepoint"
>
> 'Windows authentication:
> MySearchSvc.Credentials = objCred.GetCredential(New Uri(objQuerySvc.Url),
> "NTLM")
>
> Now you have a configurable way to access search using any accounts you want
> to have setup. Be careful with this because your adding user names and
> passwords here, only do this in a highly secure environment if you end up
> going that way.
>
> "Mario" wrote:
>
> > I built a webapplication that uses the search webservice of Sharepoint portal
> > Server. On my development machine (server A) it works fine, but when I deploy
> > the application to the intranetserver (server B) the webservice fails. I
> > receive the exception: The request failed with HTTP status 401: Unauthorized.
> > The webservice and SPS run on server C.
> >
> > I authenticate with
> > MySearch.Credentials =
> > System.Net.CredentialCache.DefaultCredentials
> > MySearch.PreAuthenticate = True
> > where MySearch is the webreference to the webservice.
> > In the web.config I use <identity impersonate="true" /> and deny anonymous
> > requests.
> >
> > Can someone help me?
> >
> >
> > --
> > Mario Delamboy



Relevant Pages

  • Re: Repeated logon prompts for sp site when logging into windows sessi
    ... > site every time I open a windows session on my local machine. ... what on your home page is trying to access something on the SPS site. ... to pass the current credentials, assuming that your network logon credentials ... is the same as your SPS access credentials. ...
    (microsoft.public.sharepoint.portalserver)
  • Re: WMI, authenticate a user on the local machine
    ... You want to authenticate an account on the local machine? ... So it must be that you have credentials and you are trying to find out if these credentials are valid on the local machine, assuming that the credentials came from outside the machine. ...
    (microsoft.public.dotnet.framework)
  • RE: search webservice authorization issue
    ... It works fine on your local machine with default credentials because you are ... hte logged in user on your local server and have full access as an Admin most ... boundary, your sending your credentials to the target SPS server, SPS in turn ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: User May be Logged in somewhere else. Lockout 3x a day
    ... Could also be an Scheduled Task or mapped drive that uses persistent credentials. ... Common Causes for Account Lockouts ... This section describes some of the common causes for account lockouts The common ... manager on member computers that use the account as well as domain controllers. ...
    (microsoft.public.win2000.general)
  • Re: Please help me, it is highly Urgent.............
    ... The reason why the threshold is given as 5 is because of security concern. ... with credentials that subsequently expired. ... Account lockout duration = 0 ... Persistent drives may have been established ...
    (microsoft.public.windows.server.active_directory)

Loading