Last post Sep 10, 2014 10:46 PM by Summer - MSFT
Sep 10, 2014 01:18 AM|lavanyadeepak|LINK
My Web Applicaiton is running in Windows Authentication mode. My Web Server is running in domain LDSelfCare.
There is a file server in domain LDCustomerCare and I want to read a file from my web application like \\machineinldcustomercaredomain\sharename\hello.txt
I am able to open the file in Notepad but through FileInfo in C#/ASP.NET, getting an access denied. What is the issue?
Sep 10, 2014 04:31 AM|adeelehsan|LINK
Are u using proper credentials while accessing file using FileInfo? Please post you code that uses FileInfo.
Sep 10, 2014 10:46 PM|Summer - MSFT|LINK
According to your description, you’d like to access a network file by using FileInfo.
Maybe you could have to impersonate user to access network share.
You can set it in web.config looking at
identity Element (ASP.NET Settings Schema)
If there’s anything you’d like to know, don’t hesitate to ask.