Forum Discussion
How do we call File server path along with service account during button click event.
- 5 years ago
I created website and used below code. Called website url in button event.
string folder = @"\\RMN\T001\PROC\MATERIALDB\";
string fileName="MAT01210821.png";
string filePath=Path.Combine(folder, fileName) ;
Response.ContentType = ("application/pdf");
Response.AddHeader("content-disposition", "attachment; filename=" + fileName);
Response.TransmitFile(filePath);create new app pool in IIS, and apply service account instead of using web config file.
Map that new pool in that website.
It's working perfect.
Thanks.
I created website and used below code. Called website url in button event.
string folder = @"\\RMN\T001\PROC\MATERIALDB\";
string fileName="MAT01210821.png";
string filePath=Path.Combine(folder, fileName) ;
Response.ContentType = ("application/pdf");
Response.AddHeader("content-disposition", "attachment; filename=" + fileName);
Response.TransmitFile(filePath);
create new app pool in IIS, and apply service account instead of using web config file.
Map that new pool in that website.
It's working perfect.
Thanks.
Thanks for your sharing.