Click here to Skip to main content
15,884,537 members
Please Sign up or sign in to vote.
4.20/5 (2 votes)
See more:
hi

i am creating a directory in my pc using CreateDirectory method &
it is creating also
but when i am using Streamwriter to write some file inside that folder it is saying that that
access is denied.
Posted
Updated 24-Dec-13 23:12pm
v3
Comments
An@nd Rajan10 24-Dec-13 5:47am    
provide your code!!
Peter Leow 24-Dec-13 5:49am    
Please show code.

Quote:
access is denied.
It is quite clear that there is insufficient permission to that File or Directory.

Please provide appropriate permission by Right Click on that Folder-> Properties -> Security Tab.
 
Share this answer
 
Comments
agent_kruger 25-Dec-13 5:30am    
he already has the right so the directory was created , my friend
Create permission is different than Write permission. So, he needs to provide Write permission.

Thanks,
Tadit
agent_kruger 25-Dec-13 5:33am    
then what does write means?
That means it should provide you the permission to write any text into that file.
agent_kruger 25-Dec-13 6:11am    
i think so that comes in modify tag.
Instead of Streamwriter use File.WriteAllText() to write file.
 
Share this answer
 
please provide us with code without code we cannot help you my friend.
 
Share this answer
 
Comments
This is not an answer. Please delete this and if you want to reply to Question, then click on "Have a Question or Comment" below the Question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900