farshad Posted May 7, 2003 Posted May 7, 2003 Do you know why I am getting this error please? Access to the path "c:\inetpub\wwwroot\Farshad\ASP.NET\DSL\ctcUsers.xml" is denied. It happens when running doc.Save(strPath & "\ctcUsers.xml") Thanks Quote Farshad
bungpeng Posted May 8, 2003 Posted May 8, 2003 Check the directory permission, whether you got 'write' permission in this directory or not? Quote
*Experts* Bucky Posted May 8, 2003 *Experts* Posted May 8, 2003 Ah yes, I've had a lot of trouble with this error. If messing with the user permissions doesn't help, there is another (more awkward) way that works. It seems that permissions won't let you overwrite the file if the ASP.NET didn't create it to begin with. To overcome this, set a breakpoint on the doc.Save line. When this is reached, delete the original file, then continue the code. The new file will be saved, and then it can be overwritten by the app. Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
bungpeng Posted May 8, 2003 Posted May 8, 2003 Sorry, I just need to clarify. Do you mean in ASP.NET we cannot overwrite existing file? Every time before save, we need to delete the original file? Quote
*Experts* Bucky Posted May 8, 2003 *Experts* Posted May 8, 2003 No, you only need to do this once for the file. After that, the ASP.NET app will have the proper permissions to overwrite the file, since it created the file in the first place. Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
vincentnl Posted May 11, 2003 Posted May 11, 2003 I have the same problem, and I tried it. It doesn't work. When trying to create a new file it keeps coming back with : Additional information: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.UnauthorizedAccessException: Access to the path "c:\inetpub\wwwroot\WitteEzel\xml files\test.xml" is denied. Quote
farshad Posted May 11, 2003 Author Posted May 11, 2003 I am running xp pro. Go to windows explorer. Tools, folder options. At the very buttom of the list in the view tab make sure the item which says something like simple sharing (recommended) is unchecked. Quote Farshad
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.