Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
saivina2920
Post Prodigy
Post Prodigy

How do we call File server path along with service account during button click event.

I have one requirement and it is most important of my project.

 

I'm using multiple buttons used in my dashboard.

 

I have some files and kept it in file server path like \\RMN\T001\PROC\MATERIALDB\MAT01210821.png

 

 I have service account like "ZSANER\MENACT001"

 

The above service account has been mapped with the above file server path  ZSANER\MENACT001 ==> RMN (Parent folder Mapped)

 

my question is how do we call direct file path through this service account (like using impersonate).

 

This is most critical requirement in my industry and waiting to resolve this issue...

1 ACCEPTED SOLUTION

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.

View solution in original post

3 REPLIES 3
saivina2920
Post Prodigy
Post Prodigy

Any update on this query...? This is very urgent...

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.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors