Re: Access remote xml file using Credentials

From: Joe Kaplan \(MVP - ADSI\) (joseph.e.kaplan_at_removethis.accenture.com)
Date: 01/21/05

  • Next message: Feroze [msft]: "Re: Wininet Authentication Problem"
    Date: Thu, 20 Jan 2005 19:35:52 -0600
    
    

    The trick to this is going to be figuring out what credentials you need to
    access the SharePoint server and then pass those in the correct format. I
    suggest setting IE to always prompt for Windows Integrated authentication
    and then make sure you pass the same stuff in your WebRequest via the
    Credentials property. WebRequest is really just doing what the browser is
    doing, so your goal is to make sure you can simulate that properly.

    I'm not sure what else I can tell you without having more details about how
    the authentication with SharePoint is working.

    Joe K.

    "Ianb" <Ianb@discussions.microsoft.com> wrote in message
    news:91561217-F325-4303-83C7-03E8D71BC590@microsoft.com...
    > Good thinking but I'm still not winning. I put some exception trapping in
    > and
    > here is the response:
    > System.Net.WebException: The remote server returned an error: (401)
    > Unauthorized. at System.Net.HttpWebRequest.CheckFinalStatus() at
    > System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at
    > System.Net.HttpWebRequest.GetResponse() at
    > System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials
    > credentials) at System.Xml.XmlDownloadManager.GetStream(Uri uri,
    > ICredentials
    > credentials) at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri,
    > String
    > role, Type ofObjectToReturn) at System.Xml.XmlTextReader.CreateScanner()
    > at
    > System.Xml.XmlTextReader.Init() at System.Xml.XmlTextReader.Read() at
    > ASP.DocumentBuilder_aspx.Page_Load() in
    > D:\Inetpub\wwwroot\WorkSQE\scripts\DocumentBuilder.aspx:line 58
    >
    >
    > Ian


  • Next message: Feroze [msft]: "Re: Wininet Authentication Problem"

    Relevant Pages


    Loading