B
Bruce W...1
Running Windows 2000 Server here. My ASP.NET app reads an XML file (in
the virtual root on the local machine) like this just fine:
DataSet ds = new DataSet();
ds.ReadXml(Server.MapPath("feeds.xml"),XmlReadMode.InferSchema);
The problem is when I upload it to my host I get a
System.Security.SecurityException when trying to read the XML file. But
you've heard this all before. So I thought I'd try replacing the
dataset reader with a FileStream like this:
DataSet ds = new DataSet();
FileStream fs = new FileStream(Server.MapPath("feeds.xml"),
FileMode.Open);
ds.ReadXml(fs, XmlReadMode.InferSchema);
So now it gives me, on my local machine, an "Access to the path...is
denied" error?!
Same directory, same XML file, one has access and the other does not.
Can you explain this???
I am not impersonating in web.config.
Many people might suggest changing folder and file permissions. That's
fine, except when it comes to my hosting company. I can't access these
things there.
There's just gotta be a way to change security setting in the
web.config, but I can't figure how.
Does anyone know how to fix any of these errors?
Thanks for your help.
the virtual root on the local machine) like this just fine:
DataSet ds = new DataSet();
ds.ReadXml(Server.MapPath("feeds.xml"),XmlReadMode.InferSchema);
The problem is when I upload it to my host I get a
System.Security.SecurityException when trying to read the XML file. But
you've heard this all before. So I thought I'd try replacing the
dataset reader with a FileStream like this:
DataSet ds = new DataSet();
FileStream fs = new FileStream(Server.MapPath("feeds.xml"),
FileMode.Open);
ds.ReadXml(fs, XmlReadMode.InferSchema);
So now it gives me, on my local machine, an "Access to the path...is
denied" error?!
Same directory, same XML file, one has access and the other does not.
Can you explain this???
I am not impersonating in web.config.
Many people might suggest changing folder and file permissions. That's
fine, except when it comes to my hosting company. I can't access these
things there.
There's just gotta be a way to change security setting in the
web.config, but I can't figure how.
Does anyone know how to fix any of these errors?
Thanks for your help.