Merge files error

Merge files error

Forum member · Apr 23, 2007
When merge some pdf files, i got this error: Access to the path 'C:\MergePDFs.pdf' is denied. and heres' my code: For Each strFile In IO.Directory.GetFiles(strFolder) If intCount = 0 Then ctPDF = New MergeDocument(strFile) Else ctPDF.Append(strFile) End If intCount += 1 Next ctPDF.Draw("C:\MergePDFs.pdf") 'The error occure at this line (I have licensed Dynamic PDF Merger component installed in my develop server., and i'm an administrator in my develop pc, so i should have all access to my local machine) Please let me know what causes the problem. thanks Neil

Re: Merge files error

Support · Apr 23, 2007
Hello Neil, Can you please send over the full stack trace of the error to our [^a|mailto:support@cete.com|Support Team^] so that they can take a look at the error. Also can you please try saving the PDF in the Temp folder and see if you get the error. Thanks, ceTe Software Support Team.

Re: Merge files error

Forum member · Apr 23, 2007
Hello support team, I have tried saving at Temp folder, but it didnt help. Here's the stack trace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode) at ceTe.DynamicPDF.Document.Draw(String filePath) at TestPage.btnMergeFiles_Click(Object sender, EventArgs e) in C:\Globalpex Projects\Globalpex.com\Globalpex\TestPage.aspx.vb:line 759" thanks Neil

Re: Merge files error

Forum member · Apr 23, 2007
Finally i could save it to C:\Temp folder, last time I was accessing to that folder (c:temp) from Windows Explore, and I got access error while saving PDF files. I just try not to access to the saving folder from Windows Explore at the same time as saving PDF file, and it works fine. But the question is, why i cannot save to the root (i couuld save to this folder from other application, ie. Notepad), and it should allow me to save a folder while i'm accessing into from Windows Explore. thanks Neil

Re: Merge files error

Support · Apr 23, 2007
Hello Neil, It looks like the user account through which you are creating the PDF, in this case the Internet user account does not have permission to C: drive. Bydefault this Internet user accout will have permission to the C:\Temp folder and so you are able to save the PDF in Temp folder. In order to save the PDF in the C: drive you will have to give the neccesary permissions to the internet user (typically "IUSR_MACHINE" or "ASPNET") or save the PDF in a location where the user account has permission. Thanks, ceTe Software Support Team.