Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XslTransform The remote server returned an error (401) Unauthorized

Status
Not open for further replies.

sianmace

Programmer
Jun 8, 2004
14
GB
Hi,

I have a c# asp.net solution.
Im trying to xml from a string, xsl from a file, and transform them and get the output.

My website is running under windows intergrated security.

This is where im falling down.

XslTransform xsl = new XslTransform();
xsl.Load(("
it returns Error Message: The remote server returned an error: (401) Unauthorized.

If i browse the URL its fine.

I know i have a permissions problem and i know i have to give it some authentication details, (god knows why), but i just cant find the example code to get me through this one.

If i turn on annon access in iis it works, but i need to use windows authenticated.

i do have intergrated=true in the web.config file

Please Please can someone help.
Im desperate
 
Have you tried using a relative path for the load (such as xsl.Load("/Transforms/Amazon.xslt"); ) I've also seen it used like xsl.Load(Server.MapPath("/Transforms/Amazon.xslt")); There may be an issue with security and the domain name being used.
 
I tried relative paths, but this only comes up and says, it couldnt find the file i wanted in C:/Windows.....Transforms/Amazon.xslt.

Its trying to map to the file system. god knows why.

Any more ideas, i think i am meant to use some sort of authentication with the transform method. but i dont know how to implement it

please help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top