473,241 Members | 1,600 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,241 software developers and data experts.

Impersonate specific user in code with Windows 2008

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 article:

http://support.microsoft.com/?id=306158#4

This doesn't work in Windows 2008 Server, we receive the following exception:

Security Exception
Description: The application attempted to perform an operation not allowed
by the security policy. To grant this application the required permission
please contact your system administrator or change the application's trust
level in the configuration file.

Exception Details: System.Security.SecurityException: Access is denied.

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

[SecurityException: Access is denied.]
System.Security.Principal.WindowsImpersonationCont ext.Undo() +2787836
System.Security.Principal.WindowsImpersonationCont ext.Dispose(Boolean
disposing) +36
System.Security.Principal.WindowsImpersonationCont ext.Dispose() +9
System.Security.Principal.WindowsIdentity.GetName( ) +227
System.Security.Principal.WindowsIdentity.get_Name () +31
MyProject.MyLibrary.Library.Security.Impersonate.g et_CurrentIdentity() in
MyPath\Security\ImpersonateUser.cs:204
MyProject.MyLibrary.Library.Security.Impersonate.g et_Impersonating() in
MyPath\Security\ImpersonateUser.cs:214
MyProject.MyLibrary.Library.Security.Impersonate.U ndoImpersonation() in
MyPath\Security\ImpersonateUser.cs:262
MyProject.MyLibrary.Library.Event.Registration.MyF unction(String
directoryName, String accountNumber) in
MyPath\Event\Registration\WebPublisher.cs:41
EventEdit.MyFunction() +72
EventEdit.btnMyFunction_Click(Object sender, EventArgs e) +10
System.Web.UI.WebControls.LinkButton.OnClick(Event Args e) +90
System.Web.UI.WebControls.LinkButton.RaisePostBack Event(String
eventArgument) +76

System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +177
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7350
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint) +213
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.event_edit_aspx.ProcessRequest(HttpContext context) +4

System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication.IExecutionStep.Execute() +358
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +64

I did double check the policy and it is running on full trust. Full
(Internal).

If you look at the linked article, the impersonation code is calling
advapi32 and kernel32, I am guessing that is why it is failing. So my
question is, is there a code example / article out there for how to do this
on Windows 2008? Or is there an alternate method of impersonating a specific
account in code.

This is the exact code that I am using and is failing (i've removed all the
other functionality to isolate the problem).

Impersonate impersonate = new
Impersonate(LogonProvider.LOGON32_PROVIDER_WINNT50 );

try {
impersonate.ImpersonateUser(myusername, mydomain, mypassword);

}
finally {
impersonate.UndoImpersonation();
}

Thx.
Jul 9 '08 #1
4 5779
I forgot, this is the exact code that handles the impersonation. I can't find
the original article which had this....

using System;
using System.Web;
using System.Security.Principal;
using System.Security.Permissions;
using System.Runtime.InteropServices;
using System.ComponentModel;
using System.Threading;

namespace EnterpriseUtilities
{
/// <summary>
/// used for connecting to other Logon Providers
/// </summary>
public enum LogonProvider
{
LOGON32_PROVIDER_DEFAULT = 0,
LOGON32_PROVIDER_WINNT40 = 2,
LOGON32_PROVIDER_WINNT50 = 3
}

/// <summary>
/// Used to change the level of impersonation on remote systems
/// </summary>
public enum ImpersonationLevel
{
SecurityAnonymous = 0,
SecurityIdentification,
SecurityImpersonation,
SecurityDelegation
}

public enum LogonTypes
{
//logon types
LOGON32_LOGON_INTERACTIVE = 2,
LOGON32_LOGON_NETWORK = 3,
LOGON32_LOGON_BATCH = 4,

// Windows2000
LOGON32_LOGON_NETWORK_CLEARPASSWORD = 8,
LOGON32_LOGON_NEW_CREDENTIALS = 9
}

/// <summary>
/// Impersonate a specific user in the domain.
/// Note that the user account on the calling process must have
/// the SE_TCB_NAME priviledge when running on W2k.
/// This can be given using Local Policy MMC and adding account to
/// "Act as Part of the Operationg System". For ASP.NET applications the
calling
/// user context is usually ASPNET user.
/// </summary>
public class Impersonate
{
#region Dll Imports
[DllImport("advapi32.dll", CharSet=CharSet.Auto, SetLastError=true)]
public static extern bool LogonUser(String lpszUsername, String
lpszDomain, String lpszPassword,
int dwLogonType, int dwLogonProvider, ref IntPtr phToken);

[DllImport("advapi32.dll", CharSet=CharSet.Auto, SetLastError=true)]
public extern static bool DuplicateToken(IntPtr hToken, int
impersonationLevel, ref IntPtr hNewToken);

[DllImport("kernel32.dll", CharSet=CharSet.Auto, SetLastError=true)]
public static extern bool CloseHandle(IntPtr handle);

[DllImport("advapi32.dll", SetLastError=true)]
public static extern int ImpersonateLoggedOnUser(IntPtr hToken);

[DllImport("advapi32.dll", SetLastError=true)]
static extern int RevertToSelf();
#endregion

#region MEMBER VARIABLES
private IntPtr token = IntPtr.Zero;
private IntPtr dupToken = IntPtr.Zero;
private LogonProvider _logonProvider;
private ImpersonationLevel _impersonationLevel;
private string _originalUser = Thread.CurrentPrincipal.Identity.Name;
private LogonTypes _logonType;
private bool impersonated = false;
#endregion

#region CONTRUCTORS
public Impersonate(LogonProvider logonProvider, ImpersonationLevel level,
LogonTypes logonType)
{
this._logonProvider = logonProvider;
this._impersonationLevel = level;
this._logonType = logonType;
}

public Impersonate(LogonProvider logonProvider, ImpersonationLevel level)
: this (logonProvider, level, LogonTypes.LOGON32_LOGON_NETWORK) {}

public Impersonate(LogonProvider logonProvider) : this (logonProvider,
ImpersonationLevel.SecurityImpersonation, LogonTypes.LOGON32_LOGON_NETWORK) {}

public Impersonate() : this(LogonProvider.LOGON32_PROVIDER_DEFAULT,
ImpersonationLevel.SecurityImpersonation, LogonTypes.LOGON32_LOGON_NETWORK) {}

#endregion

#region PUBLIC PROPERTIES

public ImpersonationLevel Level
{
get { return this._impersonationLevel; }
set { this._impersonationLevel = value; }
}

public LogonTypes LogonType
{
get { return this._logonType; }
set { this._logonType = value; }
}

public string CurrentIdentity
{
get
{
return Thread.CurrentPrincipal.Identity.Name;
}
}

/// <summary>
/// Property returns whether or not an impersonation is occurring
/// </summary>
public bool Impersonating
{
get
{
return this.CurrentIdentity != this._originalUser;
}
}

#endregion

#region PUBLIC METHODS
/// <summary>
/// Impersonates a specific user in the domain. This changes the process
/// identity to the impersonated user's security context.
/// </summary>
/// <param name="domain">Domain name</param>
/// <param name="username">Login ID</param>
/// <param name="password">Password</param>
public void ImpersonateUser(string domain, string username, string password)
{
ImpersonateUser(domain, username, password, false);
}
/// <summary>
/// Impersonates a specific user in the domain. This changes the process
/// identity to the impersonated user's security context.
/// </summary>
/// <param name="domain">Domain name</param>
/// <param name="username">Login ID</param>
/// <param name="password">Password</param>
/// <param name="justLogon">Do not process impersonisation.</param>
public void ImpersonateUser(string domain, string username, string
password, bool justLogon)
{
if (Impersonating) throw new System.Security.SecurityException("You are
already impersonating " + CurrentIdentity);

impersonated = LogonUser(username,
domain,
password,
(int)_logonType,
(int)_logonProvider,
ref token);

//check the error
if(!impersonated) throw new Win32Exception(Marshal.GetLastWin32Error());

if (!justLogon) ImpersonateLoggedOnUser(token);
}

/// <summary>
/// Reverts back to the original process identity.
/// </summary>
public void UndoImpersonation()
{
if (impersonated) RevertToSelf();
if (token != IntPtr.Zero) CloseHandle(token);
if (dupToken != IntPtr.Zero) CloseHandle(dupToken);
}
#endregion
}
}
"AvaDev" wrote:
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 article:

http://support.microsoft.com/?id=306158#4

This doesn't work in Windows 2008 Server, we receive the following exception:

Security Exception
Description: The application attempted to perform an operation not allowed
by the security policy. To grant this application the required permission
please contact your system administrator or change the application's trust
level in the configuration file.

Exception Details: System.Security.SecurityException: Access is denied.

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

[SecurityException: Access is denied.]
System.Security.Principal.WindowsImpersonationCont ext.Undo() +2787836
System.Security.Principal.WindowsImpersonationCont ext.Dispose(Boolean
disposing) +36
System.Security.Principal.WindowsImpersonationCont ext.Dispose() +9
System.Security.Principal.WindowsIdentity.GetName( ) +227
System.Security.Principal.WindowsIdentity.get_Name () +31
MyProject.MyLibrary.Library.Security.Impersonate.g et_CurrentIdentity() in
MyPath\Security\ImpersonateUser.cs:204
MyProject.MyLibrary.Library.Security.Impersonate.g et_Impersonating() in
MyPath\Security\ImpersonateUser.cs:214
MyProject.MyLibrary.Library.Security.Impersonate.U ndoImpersonation() in
MyPath\Security\ImpersonateUser.cs:262
MyProject.MyLibrary.Library.Event.Registration.MyF unction(String
directoryName, String accountNumber) in
MyPath\Event\Registration\WebPublisher.cs:41
EventEdit.MyFunction() +72
EventEdit.btnMyFunction_Click(Object sender, EventArgs e) +10
System.Web.UI.WebControls.LinkButton.OnClick(Event Args e) +90
System.Web.UI.WebControls.LinkButton.RaisePostBack Event(String
eventArgument) +76

System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +177
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7350
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint) +213
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.event_edit_aspx.ProcessRequest(HttpContext context) +4

System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication.IExecutionStep.Execute() +358
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +64

I did double check the policy and it is running on full trust. Full
(Internal).

If you look at the linked article, the impersonation code is calling
advapi32 and kernel32, I am guessing that is why it is failing. So my
question is, is there a code example / article out there for how to do this
on Windows 2008? Or is there an alternate method of impersonating a specific
account in code.

This is the exact code that I am using and is failing (i've removed all the
other functionality to isolate the problem).

Impersonate impersonate = new
Impersonate(LogonProvider.LOGON32_PROVIDER_WINNT50 );

try {
impersonate.ImpersonateUser(myusername, mydomain, mypassword);

}
finally {
impersonate.UndoImpersonation();
}

Thx.
Jul 9 '08 #2
One more update as I keep debugging. I am impersonating domain account for
the website, which seems to make a difference because if I add my the user to
the local admin group, I get no errors.

In web.config I impersonate like this:

<identity impersonate="true" userName="domain\myuser" password="mypwd" />

So now it seems like a security policy problem with this user. I found this
somewhat related post.

http://forums.asp.net/p/905562/1001414.aspx

Any help is appreciated. Thx.

"AvaDev" wrote:
I forgot, this is the exact code that handles the impersonation. I can't find
the original article which had this....

using System;
using System.Web;
using System.Security.Principal;
using System.Security.Permissions;
using System.Runtime.InteropServices;
using System.ComponentModel;
using System.Threading;

namespace EnterpriseUtilities
{
/// <summary>
/// used for connecting to other Logon Providers
/// </summary>
public enum LogonProvider
{
LOGON32_PROVIDER_DEFAULT = 0,
LOGON32_PROVIDER_WINNT40 = 2,
LOGON32_PROVIDER_WINNT50 = 3
}

/// <summary>
/// Used to change the level of impersonation on remote systems
/// </summary>
public enum ImpersonationLevel
{
SecurityAnonymous = 0,
SecurityIdentification,
SecurityImpersonation,
SecurityDelegation
}

public enum LogonTypes
{
//logon types
LOGON32_LOGON_INTERACTIVE = 2,
LOGON32_LOGON_NETWORK = 3,
LOGON32_LOGON_BATCH = 4,

// Windows2000
LOGON32_LOGON_NETWORK_CLEARPASSWORD = 8,
LOGON32_LOGON_NEW_CREDENTIALS = 9
}

/// <summary>
/// Impersonate a specific user in the domain.
/// Note that the user account on the calling process must have
/// the SE_TCB_NAME priviledge when running on W2k.
/// This can be given using Local Policy MMC and adding account to
/// "Act as Part of the Operationg System". For ASP.NET applications the
calling
/// user context is usually ASPNET user.
/// </summary>
public class Impersonate
{
#region Dll Imports
[DllImport("advapi32.dll", CharSet=CharSet.Auto, SetLastError=true)]
public static extern bool LogonUser(String lpszUsername, String
lpszDomain, String lpszPassword,
int dwLogonType, int dwLogonProvider, ref IntPtr phToken);

[DllImport("advapi32.dll", CharSet=CharSet.Auto, SetLastError=true)]
public extern static bool DuplicateToken(IntPtr hToken, int
impersonationLevel, ref IntPtr hNewToken);

[DllImport("kernel32.dll", CharSet=CharSet.Auto, SetLastError=true)]
public static extern bool CloseHandle(IntPtr handle);

[DllImport("advapi32.dll", SetLastError=true)]
public static extern int ImpersonateLoggedOnUser(IntPtr hToken);

[DllImport("advapi32.dll", SetLastError=true)]
static extern int RevertToSelf();
#endregion

#region MEMBER VARIABLES
private IntPtr token = IntPtr.Zero;
private IntPtr dupToken = IntPtr.Zero;
private LogonProvider _logonProvider;
private ImpersonationLevel _impersonationLevel;
private string _originalUser = Thread.CurrentPrincipal.Identity.Name;
private LogonTypes _logonType;
private bool impersonated = false;
#endregion

#region CONTRUCTORS
public Impersonate(LogonProvider logonProvider, ImpersonationLevel level,
LogonTypes logonType)
{
this._logonProvider = logonProvider;
this._impersonationLevel = level;
this._logonType = logonType;
}

public Impersonate(LogonProvider logonProvider, ImpersonationLevel level)
: this (logonProvider, level, LogonTypes.LOGON32_LOGON_NETWORK) {}

public Impersonate(LogonProvider logonProvider) : this (logonProvider,
ImpersonationLevel.SecurityImpersonation, LogonTypes.LOGON32_LOGON_NETWORK) {}

public Impersonate() : this(LogonProvider.LOGON32_PROVIDER_DEFAULT,
ImpersonationLevel.SecurityImpersonation, LogonTypes.LOGON32_LOGON_NETWORK) {}

#endregion

#region PUBLIC PROPERTIES

public ImpersonationLevel Level
{
get { return this._impersonationLevel; }
set { this._impersonationLevel = value; }
}

public LogonTypes LogonType
{
get { return this._logonType; }
set { this._logonType = value; }
}

public string CurrentIdentity
{
get
{
return Thread.CurrentPrincipal.Identity.Name;
}
}

/// <summary>
/// Property returns whether or not an impersonation is occurring
/// </summary>
public bool Impersonating
{
get
{
return this.CurrentIdentity != this._originalUser;
}
}

#endregion

#region PUBLIC METHODS
/// <summary>
/// Impersonates a specific user in the domain. This changes the process
/// identity to the impersonated user's security context.
/// </summary>
/// <param name="domain">Domain name</param>
/// <param name="username">Login ID</param>
/// <param name="password">Password</param>
public void ImpersonateUser(string domain, string username, string password)
{
ImpersonateUser(domain, username, password, false);
}
/// <summary>
/// Impersonates a specific user in the domain. This changes the process
/// identity to the impersonated user's security context.
/// </summary>
/// <param name="domain">Domain name</param>
/// <param name="username">Login ID</param>
/// <param name="password">Password</param>
/// <param name="justLogon">Do not process impersonisation.</param>
public void ImpersonateUser(string domain, string username, string
password, bool justLogon)
{
if (Impersonating) throw new System.Security.SecurityException("You are
already impersonating " + CurrentIdentity);

impersonated = LogonUser(username,
domain,
password,
(int)_logonType,
(int)_logonProvider,
ref token);

//check the error
if(!impersonated) throw new Win32Exception(Marshal.GetLastWin32Error());

if (!justLogon) ImpersonateLoggedOnUser(token);
}

/// <summary>
/// Reverts back to the original process identity.
/// </summary>
public void UndoImpersonation()
{
if (impersonated) RevertToSelf();
if (token != IntPtr.Zero) CloseHandle(token);
if (dupToken != IntPtr.Zero) CloseHandle(dupToken);
}
#endregion
}
}
"AvaDev" wrote:
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 article:

http://support.microsoft.com/?id=306158#4

This doesn't work in Windows 2008 Server, we receive the following exception:

Security Exception
Description: The application attempted to perform an operation not allowed
by the security policy. To grant this application the required permission
please contact your system administrator or change the application's trust
level in the configuration file.

Exception Details: System.Security.SecurityException: Access is denied.

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

[SecurityException: Access is denied.]
System.Security.Principal.WindowsImpersonationCont ext.Undo() +2787836
System.Security.Principal.WindowsImpersonationCont ext.Dispose(Boolean
disposing) +36
System.Security.Principal.WindowsImpersonationCont ext.Dispose() +9
System.Security.Principal.WindowsIdentity.GetName( ) +227
System.Security.Principal.WindowsIdentity.get_Name () +31
MyProject.MyLibrary.Library.Security.Impersonate.g et_CurrentIdentity() in
MyPath\Security\ImpersonateUser.cs:204
MyProject.MyLibrary.Library.Security.Impersonate.g et_Impersonating() in
MyPath\Security\ImpersonateUser.cs:214
MyProject.MyLibrary.Library.Security.Impersonate.U ndoImpersonation() in
MyPath\Security\ImpersonateUser.cs:262
MyProject.MyLibrary.Library.Event.Registration.MyF unction(String
directoryName, String accountNumber) in
MyPath\Event\Registration\WebPublisher.cs:41
EventEdit.MyFunction() +72
EventEdit.btnMyFunction_Click(Object sender, EventArgs e) +10
System.Web.UI.WebControls.LinkButton.OnClick(Event Args e) +90
System.Web.UI.WebControls.LinkButton.RaisePostBack Event(String
eventArgument) +76

System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +177
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7350
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint) +213
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.event_edit_aspx.ProcessRequest(HttpContext context) +4

System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication.IExecutionStep.Execute() +358
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +64

I did double check the policy and it is running on full trust. Full
(Internal).

If you look at the linked article, the impersonation code is calling
advapi32 and kernel32, I am guessing that is why it is failing. So my
question is, is there a code example / article out there for how to do this
on Windows 2008? Or is there an alternate method of impersonating a specific
account in code.

This is the exact code that I am using and is failing (i've removed all the
other functionality to isolate the problem).

Impersonate impersonate = new
Impersonate(LogonProvider.LOGON32_PROVIDER_WINNT50 );

try {
impersonate.ImpersonateUser(myusername, mydomain, mypassword);

}
finally {
impersonate.UndoImpersonation();
}

Thx.
Jul 9 '08 #3
So now it seems like a security policy problem with this user.

If I remember you have to allow impersonation for this user. Try
http://support.microsoft.com/kb/821546/en-us

--
Patrice
Jul 10 '08 #4
Patrice,

The IIS_USRS is already part of "Impersonate a Client After Authentication",
I did add the domain user as well just in case.

I added the domain user to "Create Global Objects", but still get the same
error.

I issued gpupdate /force after making these changes.

Is there a way to debug/log what user is requesting / failing the specific
permission?

Thx.

"Patrice" wrote:
So now it seems like a security policy problem with this user.

If I remember you have to allow impersonation for this user. Try
http://support.microsoft.com/kb/821546/en-us

--
Patrice
Jul 10 '08 #5

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

Similar topics

1
by: moemeelaung | last post by:
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...
4
by: Dave | last post by:
Greetings, I have a web application that will be hosted on our intranet. I would like to determine, via code the user's windows login name and domain in the following format: DOMAIN\loginname...
6
by: Greg | last post by:
Here's the situation. I have an asp.net application that calls a console application which copies files between servers. I have the console application because the copying of files takes a...
3
by: T. Beneke | last post by:
I need in a Windowsapplication the access to a file that is on a Fileserver. Only the administrator has access to the directory of the file. My App needs to open this file. In ASP.net I can...
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...
1
by: Marco | last post by:
>From a ASP.Net application, I need to access to a remote shared directory of a file server. Unfortunately, I must access to this file server with a different user, not the user impersonated by the...
3
by: ebbflow | last post by:
I've seen explainations on how to impersonate a non aspnet user when a web page is called within an web application, but I have a different impersonation issue. I have a windows desktop...
6
by: billiejoex | last post by:
Hi there. I'm writing a modification for a FTP server library I'm maintaining. Depending on the system I'd want to temporarily impersonate the logged user to perform actions on filesystem....
5
by: Just_a_fan | last post by:
I can get a dump. I can send it in to M$. I can inspect it but cannot get it in my hands so I can not post it here and get comments and/or answers. Can I get hold of that dump somewhere? Is it...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.