Ask a Question related to ASP.NET Security, Design and Development.
-
Ianb #1
Access remote xml file using Credentials
Hi
I'm trying to access an xml document outside my site root to do some
manipulation and I'm getting an error (on the while statement):
The remote server returned an error: (401) Unauthorized.
I guess this is because I don't have permissions on the file but I've been
trying to set credentials before the file access. Can any one see what I'm
doing wrong - Heres my code:
------------------------------------
WebClient oWebClient = new WebClient();
oWebClient.Credentials = CredentialCache.DefaultCredentials;
string sResource = docRecord.Filepath + docRecord.Filename;
Stream oStream = oWebClient.OpenRead(sResource);
StreamReader oSR = new StreamReader(oStream);
// create an instance of the XmlDocument object
XmlTextReader oXmlRdr = new XmlTextReader(oSR.ReadToEnd());
oXmlRdr.WhitespaceHandling = WhitespaceHandling.None;
while(oXmlRdr.Read()) {
// ... xml manipulation
}
// close the object and free up memory
oXmlRdr.Close();
oStream.Close();
-----------------------------------
and corresponding web.config entry:
<authentication mode = "Forms">
<forms>
<credentials passwordFormat = "Clear">
<user name ="ianb" password = "******"/>
</credentials>
</forms>
</authentication>
<authorization>
<deny users = "?"/>
</authorization>
===============================
I have also tried the following and got the same result:
WebClient oWebClient = new WebClient();
NetworkCredential oCred = new NetworkCredential("ianb", "******");
oWebClient.Credentials = oCred;
String strURL = "http://validURL/XMLPage.xml";
Stream oStream = oWebClient.OpenRead(strURL);
StreamReader oSR = new StreamReader(oStream);
XmlTextReader oXmlRdr = new XmlTextReader(oSR.ReadToEnd());
oXmlRdr.WhitespaceHandling = WhitespaceHandling.None;
while(oXmlRdr.Read()) {
// ... xml manipulation
}
// close the object and free up memory
oXmlRdr.Close();
oStream.Close();
-------------------------------------
I would prefer to use the web.config option. Can anyone help me with this
Thanks
Ian B
Ianb Guest
-
How to get integrated credentials from anonymous access
I want to allow both anonymous and integrated access to a web service simultaneously. That is, if the calling user can be authenticated on the... -
Access Denied with Custom Credentials
Hi all, I'm exploring how to make authentication works with WebService. I've setup the WebService with no anonymous access and using Integrated... -
Web Service Credentials - Access Denied
I am having problems passing the credentials from the current user to the Web Service. THANK YOU in advance for any help!! Web Service and Web... -
remote file access fails
Context: Running Windows 2003 Server on an intranet. A web is configured with an anonymous access account that is a domain account that has... -
Remote Fax/Credentials
I am trying to use one fax modem on a networked computer in Windows XP. The help instructs to set up the fax printer that is on the server as a... -
Ianb #2
Access remote xml file using Credentials
Hi
I'm trying to access an xml document outside my site root to do some
manipulation and I'm getting an error (on the while statement):
The remote server returned an error: (401) Unauthorized.
I guess this is because I don't have permissions on the file but I've been
trying to set credentials before the file access. Can any one see what I'm
doing wrong - Heres my code:
------------------------------------
WebClient oWebClient = new WebClient();
oWebClient.Credentials = CredentialCache.DefaultCredentials;
string sResource = docRecord.Filepath + docRecord.Filename;
Stream oStream = oWebClient.OpenRead(sResource);
StreamReader oSR = new StreamReader(oStream);
// create an instance of the XmlDocument object
XmlTextReader oXmlRdr = new XmlTextReader(oSR.ReadToEnd());
oXmlRdr.WhitespaceHandling = WhitespaceHandling.None;
while(oXmlRdr.Read()) {
// ... xml manipulation
}
// close the object and free up memory
oXmlRdr.Close();
oStream.Close();
-----------------------------------
and corresponding web.config entry:
<authentication mode = "Forms">
<forms>
<credentials passwordFormat = "Clear">
<user name ="ianb" password = "******"/>
</credentials>
</forms>
</authentication>
<authorization>
<deny users = "?"/>
</authorization>
===============================
I have also tried the following and got the same result:
WebClient oWebClient = new WebClient();
NetworkCredential oCred = new NetworkCredential("ianb", "******");
oWebClient.Credentials = oCred;
String strURL = "http://validURL/XMLPage.xml";
Stream oStream = oWebClient.OpenRead(strURL);
StreamReader oSR = new StreamReader(oStream);
XmlTextReader oXmlRdr = new XmlTextReader(oSR.ReadToEnd());
oXmlRdr.WhitespaceHandling = WhitespaceHandling.None;
while(oXmlRdr.Read()) {
// ... xml manipulation
}
// close the object and free up memory
oXmlRdr.Close();
oStream.Close();
-------------------------------------
I would prefer to use the web.config option. Can anyone help me with this
Thanks
Ian B
Ianb Guest
-
Ianb #3
Access remote xml file using Credentials
Hi
I'm trying to access an xml document outside my site root to do some
manipulation and I'm getting an error (on the while statement):
The remote server returned an error: (401) Unauthorized.
I guess this is because I don't have permissions on the file but I've been
trying to set credentials before the file access. Can any one see what I'm
doing wrong - Heres my code:
------------------------------------
WebClient oWebClient = new WebClient();
oWebClient.Credentials = CredentialCache.DefaultCredentials;
string sResource = docRecord.Filepath + docRecord.Filename;
Stream oStream = oWebClient.OpenRead(sResource);
StreamReader oSR = new StreamReader(oStream);
// create an instance of the XmlDocument object
XmlTextReader oXmlRdr = new XmlTextReader(oSR.ReadToEnd());
oXmlRdr.WhitespaceHandling = WhitespaceHandling.None;
while(oXmlRdr.Read()) {
// ... xml manipulation
}
// close the object and free up memory
oXmlRdr.Close();
oStream.Close();
-----------------------------------
and corresponding web.config entry:
<authentication mode = "Forms">
<forms>
<credentials passwordFormat = "Clear">
<user name ="ianb" password = "******"/>
</credentials>
</forms>
</authentication>
<authorization>
<deny users = "?"/>
</authorization>
===============================
I have also tried the following and got the same result:
WebClient oWebClient = new WebClient();
NetworkCredential oCred = new NetworkCredential("ianb", "******");
oWebClient.Credentials = oCred;
String strURL = "http://validURL/XMLPage.xml";
Stream oStream = oWebClient.OpenRead(strURL);
StreamReader oSR = new StreamReader(oStream);
XmlTextReader oXmlRdr = new XmlTextReader(oSR.ReadToEnd());
oXmlRdr.WhitespaceHandling = WhitespaceHandling.None;
while(oXmlRdr.Read()) {
// ... xml manipulation
}
// close the object and free up memory
oXmlRdr.Close();
oStream.Close();
-------------------------------------
I would prefer to use the web.config option. Can anyone help me with this
Thanks
Ian B
Ianb Guest
-
Joe Kaplan \(MVP - ADSI\) #4
Re: Access remote xml file using Credentials
Did you try supplying explicit credentials in the Credentials property
instead of DefaultCredentials?
Joe K.
"Ianb" <Ianb@discussions.microsoft.com> wrote in message
news:0F163CF2-74C9-4DBC-BD5D-6ED6B1772014@microsoft.com...> Hi
>
> I'm trying to access an xml document outside my site root to do some
> manipulation and I'm getting an error (on the while statement):
>
> The remote server returned an error: (401) Unauthorized.
>
> I guess this is because I don't have permissions on the file but I've been
> trying to set credentials before the file access. Can any one see what I'm
> doing wrong - Heres my code:
> ------------------------------------
> WebClient oWebClient = new WebClient();
> oWebClient.Credentials = CredentialCache.DefaultCredentials;
>
> string sResource = docRecord.Filepath + docRecord.Filename;
> Stream oStream = oWebClient.OpenRead(sResource);
>
> StreamReader oSR = new StreamReader(oStream);
>
> // create an instance of the XmlDocument object
> XmlTextReader oXmlRdr = new XmlTextReader(oSR.ReadToEnd());
>
> oXmlRdr.WhitespaceHandling = WhitespaceHandling.None;
> while(oXmlRdr.Read()) {
> // ... xml manipulation
> }
>
> // close the object and free up memory
> oXmlRdr.Close();
> oStream.Close();
> -----------------------------------
> and corresponding web.config entry:
>
> <authentication mode = "Forms">
> <forms>
> <credentials passwordFormat = "Clear">
> <user name ="ianb" password = "******"/>
> </credentials>
> </forms>
> </authentication>
> <authorization>
> <deny users = "?"/>
> </authorization>
>
> ===============================
> I have also tried the following and got the same result:
> WebClient oWebClient = new WebClient();
> NetworkCredential oCred = new NetworkCredential("ianb", "******");
> oWebClient.Credentials = oCred;
> String strURL = "http://validURL/XMLPage.xml";
> Stream oStream = oWebClient.OpenRead(strURL);
> StreamReader oSR = new StreamReader(oStream);
>
> XmlTextReader oXmlRdr = new XmlTextReader(oSR.ReadToEnd());
> oXmlRdr.WhitespaceHandling = WhitespaceHandling.None;
>
> while(oXmlRdr.Read()) {
> // ... xml manipulation
> }
>
> // close the object and free up memory
> oXmlRdr.Close();
> oStream.Close();
> -------------------------------------
> I would prefer to use the web.config option. Can anyone help me with this
>
> Thanks
>
> Ian B
Joe Kaplan \(MVP - ADSI\) Guest
-
Ianb #5
Re: Access remote xml file using Credentials
Hi Joe
Only in the form I've shown you in the second coding attempt... ie:
NetworkCredential oCred = new NetworkCredential("ianb", "******");
oWebClient.Credentials = oCred;
is there another way to do this?
Ian
"Joe Kaplan (MVP - ADSI)" wrote:
> Did you try supplying explicit credentials in the Credentials property
> instead of DefaultCredentials?
>
> Joe K.
>
> "Ianb" <Ianb@discussions.microsoft.com> wrote in message
> news:0F163CF2-74C9-4DBC-BD5D-6ED6B1772014@microsoft.com...>> > Hi
> >
> > I'm trying to access an xml document outside my site root to do some
> > manipulation and I'm getting an error (on the while statement):
> >
> > The remote server returned an error: (401) Unauthorized.
> >
> > I guess this is because I don't have permissions on the file but I've been
> > trying to set credentials before the file access. Can any one see what I'm
> > doing wrong - Heres my code:
> > ------------------------------------
> > WebClient oWebClient = new WebClient();
> > oWebClient.Credentials = CredentialCache.DefaultCredentials;
> >
> > string sResource = docRecord.Filepath + docRecord.Filename;
> > Stream oStream = oWebClient.OpenRead(sResource);
> >
> > StreamReader oSR = new StreamReader(oStream);
> >
> > // create an instance of the XmlDocument object
> > XmlTextReader oXmlRdr = new XmlTextReader(oSR.ReadToEnd());
> >
> > oXmlRdr.WhitespaceHandling = WhitespaceHandling.None;
> > while(oXmlRdr.Read()) {
> > // ... xml manipulation
> > }
> >
> > // close the object and free up memory
> > oXmlRdr.Close();
> > oStream.Close();
> > -----------------------------------
> > and corresponding web.config entry:
> >
> > <authentication mode = "Forms">
> > <forms>
> > <credentials passwordFormat = "Clear">
> > <user name ="ianb" password = "******"/>
> > </credentials>
> > </forms>
> > </authentication>
> > <authorization>
> > <deny users = "?"/>
> > </authorization>
> >
> > ===============================
> > I have also tried the following and got the same result:
> > WebClient oWebClient = new WebClient();
> > NetworkCredential oCred = new NetworkCredential("ianb", "******");
> > oWebClient.Credentials = oCred;
> > String strURL = "http://validURL/XMLPage.xml";
> > Stream oStream = oWebClient.OpenRead(strURL);
> > StreamReader oSR = new StreamReader(oStream);
> >
> > XmlTextReader oXmlRdr = new XmlTextReader(oSR.ReadToEnd());
> > oXmlRdr.WhitespaceHandling = WhitespaceHandling.None;
> >
> > while(oXmlRdr.Read()) {
> > // ... xml manipulation
> > }
> >
> > // close the object and free up memory
> > oXmlRdr.Close();
> > oStream.Close();
> > -------------------------------------
> > I would prefer to use the web.config option. Can anyone help me with this
> >
> > Thanks
> >
> > Ian B
>
>Ianb Guest
-
Joe Kaplan \(MVP - ADSI\) #6
Re: Access remote xml file using Credentials
Is the other site using Forms authentication as well? If so, you are going
to have to do some extra work to authenticate with it.
You will either need to screen scrape the logon screen to do the correct
Form post to get the logon cookie, or you will need to configure things so
that you can pass your ASP.NET forms authentication cookie to the other site
directly.
All this stuff having to do with DefaultCredentials and such only works with
Windows authentication.
Joe K.
"Ianb" <Ianb@discussions.microsoft.com> wrote in message
news:4031C246-928C-4932-8805-137D98986E0A@microsoft.com...> Hi Joe
>
> Only in the form I've shown you in the second coding attempt... ie:
> NetworkCredential oCred = new NetworkCredential("ianb", "******");
> oWebClient.Credentials = oCred;
>
> is there another way to do this?
>
> Ian
>
> "Joe Kaplan (MVP - ADSI)" wrote:
>>> Did you try supplying explicit credentials in the Credentials property
>> instead of DefaultCredentials?
>>
>> Joe K.
>>
>> "Ianb" <Ianb@discussions.microsoft.com> wrote in message
>> news:0F163CF2-74C9-4DBC-BD5D-6ED6B1772014@microsoft.com...>>>> > Hi
>> >
>> > I'm trying to access an xml document outside my site root to do some
>> > manipulation and I'm getting an error (on the while statement):
>> >
>> > The remote server returned an error: (401) Unauthorized.
>> >
>> > I guess this is because I don't have permissions on the file but I've
>> > been
>> > trying to set credentials before the file access. Can any one see what
>> > I'm
>> > doing wrong - Heres my code:
>> > ------------------------------------
>> > WebClient oWebClient = new WebClient();
>> > oWebClient.Credentials = CredentialCache.DefaultCredentials;
>> >
>> > string sResource = docRecord.Filepath + docRecord.Filename;
>> > Stream oStream = oWebClient.OpenRead(sResource);
>> >
>> > StreamReader oSR = new StreamReader(oStream);
>> >
>> > // create an instance of the XmlDocument object
>> > XmlTextReader oXmlRdr = new XmlTextReader(oSR.ReadToEnd());
>> >
>> > oXmlRdr.WhitespaceHandling = WhitespaceHandling.None;
>> > while(oXmlRdr.Read()) {
>> > // ... xml manipulation
>> > }
>> >
>> > // close the object and free up memory
>> > oXmlRdr.Close();
>> > oStream.Close();
>> > -----------------------------------
>> > and corresponding web.config entry:
>> >
>> > <authentication mode = "Forms">
>> > <forms>
>> > <credentials passwordFormat = "Clear">
>> > <user name ="ianb" password = "******"/>
>> > </credentials>
>> > </forms>
>> > </authentication>
>> > <authorization>
>> > <deny users = "?"/>
>> > </authorization>
>> >
>> > ===============================
>> > I have also tried the following and got the same result:
>> > WebClient oWebClient = new WebClient();
>> > NetworkCredential oCred = new NetworkCredential("ianb", "******");
>> > oWebClient.Credentials = oCred;
>> > String strURL = "http://validURL/XMLPage.xml";
>> > Stream oStream = oWebClient.OpenRead(strURL);
>> > StreamReader oSR = new StreamReader(oStream);
>> >
>> > XmlTextReader oXmlRdr = new XmlTextReader(oSR.ReadToEnd());
>> > oXmlRdr.WhitespaceHandling = WhitespaceHandling.None;
>> >
>> > while(oXmlRdr.Read()) {
>> > // ... xml manipulation
>> > }
>> >
>> > // close the object and free up memory
>> > oXmlRdr.Close();
>> > oStream.Close();
>> > -------------------------------------
>> > I would prefer to use the web.config option. Can anyone help me with
>> > this
>> >
>> > Thanks
>> >
>> > Ian B
>>
>>
Joe Kaplan \(MVP - ADSI\) Guest
-
Ianb #7
Re: Access remote xml file using Credentials
Hi Joe
To clarify, I am trying to access a Word XML format document in a sharepoint
library from a custom ASPX file in an excluded directory under the same
sharepoint site.
So I guess the sharepoint site is using the same web.config hense yes the
other site is using forms authentication.
The site uses windows authentication so (from what you are saying) I am
heading the right way but I have some errors in my code.
Ian
"Joe Kaplan (MVP - ADSI)" wrote:
> Is the other site using Forms authentication as well? If so, you are going
> to have to do some extra work to authenticate with it.
>
> You will either need to screen scrape the logon screen to do the correct
> Form post to get the logon cookie, or you will need to configure things so
> that you can pass your ASP.NET forms authentication cookie to the other site
> directly.
>
> All this stuff having to do with DefaultCredentials and such only works with
> Windows authentication.
>
> Joe K.
>
> "Ianb" <Ianb@discussions.microsoft.com> wrote in message
> news:4031C246-928C-4932-8805-137D98986E0A@microsoft.com...>> > Hi Joe
> >
> > Only in the form I've shown you in the second coding attempt... ie:
> > NetworkCredential oCred = new NetworkCredential("ianb", "******");
> > oWebClient.Credentials = oCred;
> >
> > is there another way to do this?
> >
> > Ian
> >
> > "Joe Kaplan (MVP - ADSI)" wrote:
> >> >> Did you try supplying explicit credentials in the Credentials property
> >> instead of DefaultCredentials?
> >>
> >> Joe K.
> >>
> >> "Ianb" <Ianb@discussions.microsoft.com> wrote in message
> >> news:0F163CF2-74C9-4DBC-BD5D-6ED6B1772014@microsoft.com...
> >> > Hi
> >> >
> >> > I'm trying to access an xml document outside my site root to do some
> >> > manipulation and I'm getting an error (on the while statement):
> >> >
> >> > The remote server returned an error: (401) Unauthorized.
> >> >
> >> > I guess this is because I don't have permissions on the file but I've
> >> > been
> >> > trying to set credentials before the file access. Can any one see what
> >> > I'm
> >> > doing wrong - Heres my code:
> >> > ------------------------------------
> >> > WebClient oWebClient = new WebClient();
> >> > oWebClient.Credentials = CredentialCache.DefaultCredentials;
> >> >
> >> > string sResource = docRecord.Filepath + docRecord.Filename;
> >> > Stream oStream = oWebClient.OpenRead(sResource);
> >> >
> >> > StreamReader oSR = new StreamReader(oStream);
> >> >
> >> > // create an instance of the XmlDocument object
> >> > XmlTextReader oXmlRdr = new XmlTextReader(oSR.ReadToEnd());
> >> >
> >> > oXmlRdr.WhitespaceHandling = WhitespaceHandling.None;
> >> > while(oXmlRdr.Read()) {
> >> > // ... xml manipulation
> >> > }
> >> >
> >> > // close the object and free up memory
> >> > oXmlRdr.Close();
> >> > oStream.Close();
> >> > -----------------------------------
> >> > and corresponding web.config entry:
> >> >
> >> > <authentication mode = "Forms">
> >> > <forms>
> >> > <credentials passwordFormat = "Clear">
> >> > <user name ="ianb" password = "******"/>
> >> > </credentials>
> >> > </forms>
> >> > </authentication>
> >> > <authorization>
> >> > <deny users = "?"/>
> >> > </authorization>
> >> >
> >> > ===============================
> >> > I have also tried the following and got the same result:
> >> > WebClient oWebClient = new WebClient();
> >> > NetworkCredential oCred = new NetworkCredential("ianb", "******");
> >> > oWebClient.Credentials = oCred;
> >> > String strURL = "http://validURL/XMLPage.xml";
> >> > Stream oStream = oWebClient.OpenRead(strURL);
> >> > StreamReader oSR = new StreamReader(oStream);
> >> >
> >> > XmlTextReader oXmlRdr = new XmlTextReader(oSR.ReadToEnd());
> >> > oXmlRdr.WhitespaceHandling = WhitespaceHandling.None;
> >> >
> >> > while(oXmlRdr.Read()) {
> >> > // ... xml manipulation
> >> > }
> >> >
> >> > // close the object and free up memory
> >> > oXmlRdr.Close();
> >> > oStream.Close();
> >> > -------------------------------------
> >> > I would prefer to use the web.config option. Can anyone help me with
> >> > this
> >> >
> >> > Thanks
> >> >
> >> > Ian B
> >>
> >>
> >>
>
>Ianb Guest
-
Joe Kaplan \(MVP - ADSI\) #8
Re: Access remote xml file using Credentials
Ok,
If the target file is on a SharePoint site, then it is almost certainly
using Windows authentication, not Forms authentication. You should be able
to tell by whether you are sent to a custom logon form when you first point
your browser to it or whether the browser prompts you or logs you on
automatically.
If it is Windows authentication (which it should be), then you should be
able to get the NetworkCredential approach to work. You might try adding a
valid domain to your constructor:
NetworkCredential oCred = new NetworkCredential("ianb", "******",
"iansdomain");
If that doesn't work, please provide more details and we'll see what we can
do.
Joe K.
"Ianb" <Ianb@discussions.microsoft.com> wrote in message
news:64AAB084-2574-48C9-9876-A41723760BB6@microsoft.com...> Hi Joe
>
> To clarify, I am trying to access a Word XML format document in a
> sharepoint
> library from a custom ASPX file in an excluded directory under the same
> sharepoint site.
>
> So I guess the sharepoint site is using the same web.config hense yes the
> other site is using forms authentication.
>
> The site uses windows authentication so (from what you are saying) I am
> heading the right way but I have some errors in my code.
>
> Ian
>
Joe Kaplan \(MVP - ADSI\) Guest
-
Ianb #9
Re: Access remote xml file using Credentials
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(IAsyncRes ult 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
"Joe Kaplan (MVP - ADSI)" wrote:
> Ok,
>
> If the target file is on a SharePoint site, then it is almost certainly
> using Windows authentication, not Forms authentication. You should be able
> to tell by whether you are sent to a custom logon form when you first point
> your browser to it or whether the browser prompts you or logs you on
> automatically.
>
> If it is Windows authentication (which it should be), then you should be
> able to get the NetworkCredential approach to work. You might try adding a
> valid domain to your constructor:
>
> NetworkCredential oCred = new NetworkCredential("ianb", "******",
> "iansdomain");
>
> If that doesn't work, please provide more details and we'll see what we can
> do.
>
> Joe K.
> "Ianb" <Ianb@discussions.microsoft.com> wrote in message
> news:64AAB084-2574-48C9-9876-A41723760BB6@microsoft.com...>> > Hi Joe
> >
> > To clarify, I am trying to access a Word XML format document in a
> > sharepoint
> > library from a custom ASPX file in an excluded directory under the same
> > sharepoint site.
> >
> > So I guess the sharepoint site is using the same web.config hense yes the
> > other site is using forms authentication.
> >
> > The site uses windows authentication so (from what you are saying) I am
> > heading the right way but I have some errors in my code.
> >
> > Ian
> >
>
>Ianb Guest
-
Joe Kaplan \(MVP - ADSI\) #10
Re: Access remote xml file using Credentials
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(IAsyncRes ult 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
Joe Kaplan \(MVP - ADSI\) Guest



Reply With Quote

