Unauthorized Access to txt file by .Net or COM

Posted by Ampo under WCF on 12/13/2010 | Points: 10 | Views : 2764 | Status : [Member] | Replies : 1
Hello.

I'm trying to write to text file from WCF application, using stream writer and text writer.
I have 2 consumers to the WCF: console application and classic ASP.
Using WCF from console app - the txt file is created and all OK.
Using WCF from classic ASP - I get:
"System.UnauthorizedAccessException: Access to the path 'c:\AAA.txt' is denied."
Why is this?

Thanks.




Responses

Posted by: SheoNarayan on: 12/14/2010 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
As written in the error, it is to do with the security permission you have on your IIS user that is running your service. You will need to allow write permission to your IIS user as well. Go to IIS and look at the user that is handing your request for the service and allow write permission.

Hope this will help.
Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Ampo, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response