473,789 Members | 2,397 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Impersonation with forms authentication ?

Hello everyone,

[ Unfortunately I don't have Windows on my machine
at home to try it and unfortunately, don't have an
office anymore ( me == jobless ) and I couldn't find
the information on Google as well, so I hope you can
help me with this question. ]

Till now, I've always used IIS integrated authentication
and impersonation, such that the ASP.NET code on the server
is executed with the permissions of the user who is sitting
behind the web browser.

Now I am wondering if it's also possible to use
forms authentication and still do impersonation,
so that the ASP.NET code on the server is executed with
the permissions of the user who typed his username and
password in the login form ??

Best regards,

Eric
Nov 18 '05 #1
2 3590
I don't think that you can do a blanket impersonation,
but if you look at the following KB article
(http://support.microsoft.com/default.aspx?scid=kb;EN-
US;306158), it provides an example of how to use the
LoginUser API function to generate a security token for a
particular user that can be used to impersonate that user
for a block of code.

Hope this helps.

Bruce Johnson
http://www.ObjectSharp.com/Bruce
-----Original Message-----
Hello everyone,

[ Unfortunately I don't have Windows on my machine
at home to try it and unfortunately, don't have an
office anymore ( me == jobless ) and I couldn't find
the information on Google as well, so I hope you can
help me with this question. ]

Till now, I've always used IIS integrated authentication
and impersonation, such that the ASP.NET code on the serveris executed with the permissions of the user who is sittingbehind the web browser.

Now I am wondering if it's also possible to use
forms authentication and still do impersonation,
so that the ASP.NET code on the server is executed with
the permissions of the user who typed his username and
password in the login form ??

Best regards,

Eric
.

Nov 18 '05 #2
Bruce Johnson wrote:
I don't think that you can do a blanket impersonation,
but if you look at the following KB article
(http://support.microsoft.com/default.aspx?scid=kb;EN-
US;306158), it provides an example of how to use the
LoginUser API function to generate a security token for a
particular user that can be used to impersonate that user
for a block of code.

Hope this helps.

Bruce Johnson


Hello Bruce,

I almost forgot to say ... Thanks !

Best regards,

Eric
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1454
by: Bonj | last post by:
Hi I would like to know how to use impersonation, in order to write to a file on a network share. The user will be logging on to this web app, and will then click a button which will write to a file on the network share. Currently though, I am getting permissions errors. I don't want to set identity impersonate = "true" because I gather that exposes security weaknesses. Rather, I would like the user to have to actually enter their windows...
1
8035
by: srivalli chavali via DotNetMonster.com | last post by:
Hi, I have a question regd. Windows authentication and network file access. My asp.net application doesn't use any of the .NET's authentication schemes (Forms, Windows or Passport) yet. I have a login page where the users would supply their credentials and the business logic compares these credentials against SQLServer database and allows/denies access to the website.
1
3963
by: techfuzz | last post by:
I'm posting my problem experience and solution I found here for other ASP.NET developers. I have a web application that uses Forms Authentication with Active Directory to control access. In this web application, I have search page that utilizes the Windows Indexing Service (MSIDXS provider). For reasons I'm not aware of at this time, setting <identity impersonation="true" /> in the web.config causes an error whenever you try to search.
2
2560
by: Andy | last post by:
I am new to .NET so not sure if this is the right process... Any help will be greatly appreciated. I am trying to eliminate the grey login box that pops up when Windows Authentication is used by using Forms Authentication and using the details provided to impersonate that user and supply the credentials to the HTTPContext.Current.User I have tried to use the sample code supplied by Microsoft but realised that I get an error (listed...
2
1109
by: Andy | last post by:
I'm a newbie and would like some help with impersonation... I am trying to eliminate the grey box that pops up when using Windows Basic Authentication. My questions are as follows: 1. Is it advisable to use forms authentication and then use the details provided to impersonate that user? 2. In my tests, I manage to impersonate on the first page, but when it redirects to the next page, it reverts back to ASPNET Account. What is a good...
0
1063
by: cmay | last post by:
Problem: When impersonation is set in the web.config file, I cannot establish an OLEDB connection to the database from my ASP.NET v1.1 application. (Unspecified Error. Stack trace shows it happens on the ProcessResults method within the OleDB Provider) Cause: Both of these KB articles from MS describe the problem: http://support.microsoft.com/default.aspx?scid=kb;en-us;827190...
1
1897
by: Eric | last post by:
I trying to setup an intranet based on windows NT groups or roles. I have used windows integrated authentication with impersonation first but this include to use a user to access the database. I would prefer to use windows security based on groups or roles . If i set the impersonate attribute to false or simply remove the identity tag from my web.config file . how can i manage my security for database? I know i have first to setup...
1
1648
by: Rocky | last post by:
I have a problem. I have a webform, which uses impersonation. My iis is set to windows integrated authentication and anonymous is disabled. My webform connects to active directory and retrieves user information. This webform works great on the local machine. But if i run it from a remote machine, it has trouble connecting to AD. I've down some searching and it has to do with the impersonation. I use impersonation to authenticate myself...
3
1475
by: headware | last post by:
We have a web app that is running under Integrated Windows Authentication. It must consume to a web service we are publishing on another server, also running under Integrated Windows Authentication. In order to make this work, we have to impersonate a user account with access to the web service and set the Credential property on the web service proxy object to DefaultCredentials before we actually make the web service call. If we don't...
0
9661
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10193
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9978
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9015
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7524
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6755
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5546
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3695
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2904
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.