Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
when i have developed exe format and install, the error comes like Access to the path is denied.I want to save the file in local.So i gave the like
Code sample

var path = Environment.CurrentDirectory;
string filename=path+"Xyz"+Datetime.now+".pdf";
string pdffile="Xyz"+Datetime.Now+".pdf";
pdf.save(pdffile);


The error show Access to the path is denied.Here i'm developing pdf file.when i click it saves in local file..
Posted

1 solution

Don't. In production, your EXE is installed under the "Program Files" folder, and that's not normally writable.
See here: Where should I store my data?[^] for better places.
 
Share this answer
 

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