Hi I have a site that generates a PDF based on a html template and it works great. but I want to allow users to change the template for the pdf so I added 1 button that when clicked with change the file path to another template but when I run the code i get this error:
UnauthorizedAccessException was unhandled by user code
Access to the path 'I:\#\PDF' is denied.
I have administrator access to the folder and files and added Everyone, network services, asp.net to the list of users that have full control over everything in the project files. And the file is not read only.
This is some example code
protected void Button1_Click(object sender, EventArgs e)
{
Template = "HTMLTemplate/pdf2.html";
Label1.Text = Template;
Button1.CssClass = "TemplateActive br5";
}
protected void btnCreatePDF_Click(object sender, EventArgs e)
{
// Create a Document obje ...
Go to the complete details ...