no permission to write to xml file.

G

Guest

greetings, i have no permission to save my xml value into the xml file how
can i over come all this. i've already right clickon the folder and file to
make sure that its not in read nly mode. any other alternatives?
 
D

Derek Harmon

Asha said:
i have no permission to save my xml value into the xml file how
can i over come all this. i've already right clickon the folder and file to
make sure that its not in read nly mode. any other alternatives?

Asha,

The identity under which the ASP.NET worker process runs is what
needs permission. Put the following render tag on an .aspx page in
your application,

<%=System.Security.Principal.WindowsIdentity.GetCurrent().Name%>

This will write out on the page the name of a user on your machine,
if you're running .NET 1.0 it'll probably be "ASPNET". This is the
name of the user that needs permissions to create, read and/or write
the file in question.

Now go into the Properties for that file again, select the Security tab,
and grant* the user named above Read, Write, Modify access privileges
to the XML file and the directory containing it.

*- being liberal here, of course if you're deploying to a real world web
site you'd have a much more deliberate security policy.


Derek Harmon
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top