473,382 Members | 1,665 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Impersonate a user form ASP


Hi ASP/Windows experts out there

I really need help with this Impersonate function.

I have machine A and B. A hosts my ASP page which is to create a user
account on the machine B. The machine are not on Domain and not in AD
environment.

I userstand the the web page from A is to create a user account on B
should use Impersonate function to log in as the user from the machine
B which has the Admin rights. So I did that.. But It does not seems to
be working. I got this famous 80004005 error. I know it's something to
do with permissions rights but I couldn't think of anymore. I have
tried so many options.

I'd be much appreciated if you could at least help me out with my
problem.

Thanks and Regards
Moe

--
moemeelaung
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Jul 22 '05 #1
1 4371
moemeelaung wrote:
Hi ASP/Windows experts out there

I really need help with this Impersonate function.

I have machine A and B. A hosts my ASP page which is to create a user
account on the machine B. The machine are not on Domain and not in AD
environment.

I userstand the the web page from A is to create a user account on B
should use Impersonate function to log in as the user from the machine
B which has the Admin rights. So I did that.. But It does not seems to
be working. I got this famous 80004005 error. I know it's something to
do with permissions rights but I couldn't think of anymore. I have
tried so many options.

I'd be much appreciated if you could at least help me out with my
problem.

Thanks and Regards
Moe

--
moemeelaung
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------


Hi moemeelaung,

AFAIK, the Impersonate - Function runs the ASP files on the current
machine with the new user context.
If you are not working in a domain / AD environment, machine A does not
allow a user from machine B to be logged onto machine A

For example:
machine A: Users: IUSR_A,foo
machine B: Users: bar
--> You cannot impersonate user "bar" onto machine A, he is unknown to
machine A
In this situation it will be easiest to create two identical users (same
username AND password) on both machines, this should allow you to
impersonate as user on machine A that then has the appropriate rights on
machine B. (to enumerate or create new users).

Example:
machine A: Users: IUSR_A,foo
machine B: Users: foo
--> You can impersonate user "foo" onto machine A, this user has rights
on machine B (same username/password).
I have not tried this in an ASP environment, but with "normal" = logged
on Users, this works perfectly.

HTH
Gottfried
Jul 22 '05 #2

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

Similar topics

8
by: Michelle | last post by:
Hello! I have an ASP.NET application (1.1 framework) that needs to be able to read/write files on a network share. The access to this file share will be fairly restricted, so I need to...
14
by: Ian Frawley | last post by:
Anyone used the WindowsIdentity class with success? I find if I try to change the current identity to one that exists on another machine and then try to perform and action on that machine i.e....
8
by: BLiTZWiNG | last post by:
After playing with the code shown and utilising Willy Denyottes' help, I have come to the conclusion that there is some form of difference between the managed WindowsIdentity.Impersonate() over the...
6
by: Erez Shor | last post by:
Hi, I need to build and asp page which access a remote windows server's registry and create a registry key. In order for the ASP page to be able to access the registry on the remote server I need...
1
by: Svein Terje Gaup | last post by:
I have a website running on Windows 2000 Server, that should be able to retrieve data from a datawarehouse on another machine running Windows 2000 Server, SQL Server 2000 and SQL Server 2000...
6
by: Meena Desai | last post by:
Hi, What are the effects of using <identity impersonate="true"/> in web.config on windows auhtentication? Does it affect windows security? Thanx in advance, Meena.
8
by: RTT | last post by:
i'm writing a windows form but codebased a iwant to run the code as a different user. like in a webapplication you can impersonate a user so the website does not run on the standard ASP.NET...
2
by: rockdale | last post by:
Hi, all: My asp.net application calles MS speech 5.1 and generate a wav file on server's path. Everything runs perfectly on my development machine. But when I move the appl to production server,...
4
by: =?Utf-8?B?QXZhRGV2?= | last post by:
ASP.Net 2. We are migrating to Windows 2008 64 bit Server with IIS 7 from Windows 2003 32 Bit with IIS 6. A few library classes we wrote uses impersonation in code like explained in this...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.