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

View all the Fabric Data Days sessions on demand. View schedule

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors