Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File Access on remote share - ASP.NET

Status
Not open for further replies.

csutton

Programmer
Dec 27, 2000
213
US
Hey everyone,

Okay, here we go with another one. Server1 hosts my ASP.NET app (in C#) and Server2 has a shared folder that I connect to from Server1.

I have NT Authentication enabled for my web app. However, when the program tries to access a file on the share, I have to open up anonymous rights to the file(s), otherwise it cannot be opened.

Is there a way that I can pass the user's authorization to the file? I want to be able to protect the word documents in this shared folder so only those people with proper permissions can access them.

Thanks,
Chris

P.S. I've only made it to the File.Exists function so far, that if the user does not have permission, it returns false. I haven't tried doing any opens or anything yet.
 
Also, I did try using the impersonate directive in web.config but that did not help any.

Chris
 
I asked a co-worker on teh networking/server side of work about this and your other questions about getting a user from teh web server to access the active directory on the other server, and his first thought was that if you set the server holding the files to trust your webserver, it *should* solve your problem. You shouldn't be prompted with a new username/password dialog or anything, cause the server trusts anyone coming over from the web side of things.

now, I'm NOT a networking guy, so although I kinda understand what he's saying, I have no clue how to set it up.

maybe something to look into anyway though
:)

Jack
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top