Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / April 2005

Tip: Looking for answers? Try searching our database.

impersonation

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ohad Young - 13 Apr 2005 15:08 GMT
Hi,

I need to connect to a remote SQL server from a webservice.  The webservice
(IIS) and SQL server are running on different machines.  I'd like to use
windows authentication rather than SQL one.
How can I achieve this? through impersonation? what are the implications of
using  impersonation? is there a better way?

Thanks, Ohad

Signature

Ohad Young
Medical Informatics Research Center
Ben Gurion University
Information System Eng
Office Phone:     972-8-6477160
Cellular Phone:   972-54-518301
E-Mail:                ohadyn@bgumail.bgu.ac.il

Salvador - 18 Apr 2005 11:01 GMT
Hi,

There are several ways:

1)if you are using IIS5.1 you can change the user that is impersonate on the
webservice, you can go to the machine.config file and remove the default
ASPNET user, this has some implications related to security, because it will
change the default user for all your sites on the server. (This is not the
account that the client will use, that is a different layer and will still
use IUSR_MachineName). If you want to do it per website you can paste that
code on your web.config file (note: I haven't tried this, I know that some
properties can be set on the web.config but others are ignored and read it
from machine.config, check the help for this)

2)If you are using IIS6 you can easily change that on the website
properties, so its per website, same behaviour as above.

3)If you are going to impersonate remember that only works on Wind2K3 and
XP, for Win2K you need to change the policy settings in order to do this
opening a whole on the security environment.

I prefer the option 1 cause I have more control, but check your requirements
and choose your best approach.

Best regards
Salva

> Hi,
>
[quoted text clipped - 5 lines]
>
> Thanks, Ohad
Ohad Young - 18 Apr 2005 13:37 GMT
Hi Salvador,

Thanks for the reply.
Actually I managed to overcome it by adding the "<identity
impersonate="true" userName= ..." to the <system.web> section of the
web.config file of the webservice it self.
It works fine :)

Thanks anyway, Ohad

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.