PC Review


Reply
Thread Tools Rate Thread

Accessing file structure using different credentials

 
 
riyaz.shaikh@gmail.com
Guest
Posts: n/a
 
      20th Sep 2006
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

 
Reply With Quote
 
 
 
 
=?Utf-8?B?RnJhbmtsaW4gTS4gR2F1ZXIgSUlJ?=
Guest
Posts: n/a
 
      20th Sep 2006

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.

--
Franklin M. Gauer III
Applications Development Manager
Integrated Companies, Inc.


"(E-Mail Removed)" wrote:

> 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
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing File Servers with other credentials djm0001 Windows XP Accessibility 0 15th Aug 2008 04:20 PM
Accessing UNC file share with credentials? Usenet User Microsoft Dot NET Framework 7 3rd Oct 2007 11:58 PM
Accessing UNC file share with credentials? Usenet User Microsoft Dot NET 7 3rd Oct 2007 11:58 PM
Accessing UNC file share with credentials? Usenet User Microsoft C# .NET 7 3rd Oct 2007 11:58 PM
Code for accessing remote file structure __Z__ Microsoft C# .NET 3 5th Dec 2003 08:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:22 PM.