473,472 Members | 2,038 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Authentication problem with using advapi32.dll

hi,
I want to forms authentication with windows password. So that I import
advapi32.dll. Import code like this[DllImport ("advapi32.dll")]
public static extern bool LogonUser(String lpszUsername,String
lpszDomain,String lpszPassword,int dwLogonType,int dwLogonProvider,out int
phToken);

then using forms value
int token1;

bool loggedOn=LogonUser(username.Text,domainname,passwo rd.Text,2,0,out
token1);

This code is work in my Windows2003 server computer. But this code should
run in a web server which has Windows 2000. This code doesn't work properly.
Error message is "Invalid token; it cannot be duplicated" What is the
problem for this code. and how can I solve this problem.
Thanks for helps.
Nov 19 '05 #1
0 1497

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

Similar topics

3
by: kathyk | last post by:
Hi All, I am using Access 2003 on machines with windows 2000 and XP. The problem I'm having started only after we got a new image for our PC's. This database app has been around for awhile and...
2
by: cmrchs | last post by:
Hi, I am trying to create a site that will be used by both employees AND external users, so both types of users are trying to access the same pages. In the case of an employee on the intranet,...
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...
3
by: Sharat Koya | last post by:
Please can you help with a problem I am having. My web config is set to... <authorization><deny users="?"/> <authentication mode="Forms"> <forms name=".COOKIE" loginUrl="login.aspx"...
11
by: Eric | last post by:
Hello, I have a web app that uploads files to a file server (different box than the web server). The application uses NT integrated authentication, but no users should have permissions to the...
1
by: method | last post by:
I am trying to delete registery key encluding all its subkeys . I want to delete the bold part HKEY_CURRENT_USER, "Software\xyz\foldername\" using an api that i found on the net but i keep...
1
by: David | last post by:
Hi all, Using C# .NET 1.1 Forms Authentication. I have my site set up to be anonymous access, almost all the way through. I have a login page, that when someone logs in, the site now has...
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...
5
by: CraigWU | last post by:
I know there have been some similar posts, but I cannot determine if this is truly impossible, or just difficult. We have a site that uses Windows Integrated Authentication, and so it pops up the...
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.