Click here to Skip to main content
14,216,325 members
Rate this:
Please Sign up or sign in to vote.
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

Rate this:
Please Sign up or sign in to vote.

Solution 1

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.
   

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



Advertise | Privacy | Cookies | Terms of Service
Web01 | 2.8.190619.2 | Last Updated 30 Mar 2015
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100