I am working an EPR where I need to create and download the crystal report as pdf in share folder "\\org\erp_tst" .But it is working fine in local(IIS) .But when I migrate the whole development to dev it comes up with exception .
I checked the erp_tst folder security and it says only 4-6 get the access to write here.
I want to use shareusername ,sharepassword for the specific operation. Tried some of it but didn't work in dev. It you have any idea please share .
Error on Dev:-
rror downloading the fileSystem.UnauthorizedAccessException: Access to the path '\\org\erp_tst\mypay.pdf' is denied. 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, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode) at CrystalDecisions.CrystalReports.Engine.FormatEngine.WriteStreamToFile(Stream stream, String filename) at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportStreamToFile(Stream stream, DiskFileDestinationOptions options) at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext) at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToDisk(ExportFormatType formatType, String fileName) at EFS.arbitration.b_printpdf_click(Object sender, EventArgs e)
What I have tried:
string shareuser = "user1"; // share user name
string sharepass = "My444"; //share password
rptArb1.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, @"share path" + OutputFileName);