Access denied.

D

Daniel Groh

Hi Sirs,
When I try to generate a XML File from my application i get the following
error:
Access to the path "c:\inetpub\wwwroot\VirtualBooks\xmlErrors.xml" is
denied.

What should i do ?

I tryed to give full access in this folder but didn't work!

The code:


{
sqlConn.ConnectionString = ConfigurationSettings.AppSettings["SQLServer"];
sqlConn.Open();
SqlCommand cmdXML = new SqlCommand();

cmdXML.CommandText = "Select cdErro, Erro From Erro";
cmdXML.Connection = sqlConn;

SqlDataAdapter daXML = new
SqlDataAdapter(cmdXML.CommandText,cmdXML.Connection);

DataSet dsXML = new DataSet();
daXML.Fill(dsXML);
dsXML.WriteXml(Server.MapPath("xmlErrors.xml"),XmlWriteMode.WriteSchema);
//Here the error!
}
 
D

Daniel Groh

I was checking now and the folder came back to read only! =/
How do i do to give full permission in my folder ?
with the right click > poperties - I can not see any options "Security" and
the option Read only is checked =(
 
B

Brendan Green

You need to give write access to the account that runs the ASP.NET worker
process, which I *think* is ASPNET (but I have a feeling that may have
changed).

You're not trying to change the security permissions via a share?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top