Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Problem using ASP.Net Impersonation to access UNC share

Reply
 
Old 08-28-2008   #1 (permalink)
JoeyNic


 
 

Problem using ASP.Net Impersonation to access UNC share

I am working on an application where a web service (on the web tier)
calls another web/gateway service (on the app tier). This then needs
to save a file to a UNC share on a file server in our internal
network.

The issue that I'm having is that as our app tier is not on a domain,
I am unable to impersonate a domain account to access the share. I am
able to map a network drive to the share from the app tier by
connecting as a domain account but I have been unable to do the same
using ASP.Net. I have tried impersonating a domain account via the
web.config and also via the code.

I have managed to get a POC working by creating a local account on the
app tier and then creating the same account on the file server. If I
set my app to impersonate this local user I am able to save the file
successfully but when I try to impersonate a domain account the
authentication fails.

Has anybody else experienced a similar issue? Is there a way I can
impersonate a domain account on the app tier even though it is not on
the domain?

My System SpecsSystem Spec
Old 08-29-2008   #2 (permalink)
Anthony Jones


 
 

Re: Problem using ASP.Net Impersonation to access UNC share

"JoeyNic" <joe.nicholas1@xxxxxx> wrote in message
news:dc150126-6d07-45af-a629-b370256db8b2@xxxxxx
Quote:

> I am working on an application where a web service (on the web tier)
> calls another web/gateway service (on the app tier). This then needs
> to save a file to a UNC share on a file server in our internal
> network.
>
> The issue that I'm having is that as our app tier is not on a domain,
> I am unable to impersonate a domain account to access the share. I am
> able to map a network drive to the share from the app tier by
> connecting as a domain account but I have been unable to do the same
> using ASP.Net. I have tried impersonating a domain account via the
> web.config and also via the code.
>
> I have managed to get a POC working by creating a local account on the
> app tier and then creating the same account on the file server. If I
> set my app to impersonate this local user I am able to save the file
> successfully but when I try to impersonate a domain account the
> authentication fails.
>
> Has anybody else experienced a similar issue? Is there a way I can
> impersonate a domain account on the app tier even though it is not on
> the domain?
You can't impersonate a domain account unless you have created a trust
relationship between the off domain machine and the domain (in which case
you may as well place the machine on the domain). Unless the local machine
trusts the domain controller on the domain it isn't going to authenticate an
account on that domain.

The 'twin' accounts approach would seem to be your best bet.


--
Anthony Jones - MVP ASP/ASP.NET


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
about Vista & xp access & share problem Vista networking & sharing
Cannot access share on XP PC Vista networking & sharing
Vista "Access Is Denied" Trying to Access Network Share Vista networking & sharing
Workgroup shares problem - Can see computers but cant access share Vista networking & sharing
Workgroup shares problem - Can see computers but cant access share Vista networking & sharing


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46