Accessing file structure using different credentials

R

riyaz.shaikh

Hi All....

I am having a web site which runs under Windows Authentication. the
requirement is this application should write files to a folder share.
but the problem is this folder share is accessible by only one User say
(Domain/User1). where as the we application will be used by all other
users. So whenever I try accessing the folder using the current users
identity it gives an UnAuthorized exception...

How can I impersonate in a web application to make use of Domain\user1
credentials to access the file/folder share ????

please help...

RRS
 
G

Guest

You can use the xml tag as follows in the web.config file:

<identity impersonate="true" userName="your_domain\some_user"
password="whatever the password is"/>

However please analyze this carefully and read the documentation to make
sure it fits your application's security requirements. Because when you use
this tag, all requests inherit this user's permissions. Without knowing much
more about your application this may not be what you want (or it could be
just fine). This is for you to decide after your own thoughtful analysis and
consideration.

We employ this technique to do a similar thing as you are describing...

....best of luck.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top