Impersonate second session require restart of IIS
From: Curt Mc Gee (curt.mc.gee@lee.net)
Date: 07/14/02
- Next message: Dave: "<identity impersonate="true"> question"
- Previous message: Vladimir Maysuradze: "Re: Expire Page"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Curt Mc Gee" <curt.mc.gee@lee.net> Date: Sun, 14 Jul 2002 05:04:35 -0700
have written an asp.net application for each of out 32
enterprises (running under IIS5.0, .NET framework + sp1,
2000 Server with latest security pacx and service pacs)
that accesses a shared folder on the users PC (i.e.
10.1.1.10\mySharedFolder). I'm impersonating a profile
(i.e. myUser) that is setup on both the 2000 Server and
the users PC, with permissions to read, write, execute
etc. The myUser profile has been given full permission to
the files in WINNT\Microsoft.NET\Framwork\v1.0.3705\*.* .
In the Web.Config file I have the impersonate statement:
<system.web>
<identity impersonate="true" />
</system.web>
When I check for the
System.Security.Principal.WindowsIdentity.GetCurrent
().Name the correct myUser id is being processed.
On the first attempt to access the app I get the following
error:
Cannot execute a program. The command being executed
was "c:\winnt\microsoft.net\framework\v1.0.3705\vbc.exe"
@"C:\WINNT\Microsoft.NET\Framework\v1.0.3705\Temporary
ASP.NET Files\upload\4361bd69\e68dfd45\5vbc3jzp.cmdline".
Description: An unhandled exception occurred during
compilation using the
CodeDomProvider 'Microsoft.VisualBasic.VBCodeProvider'.
Please review the stack trace for more information about
the error and where it originated in the code.
Exception Details:
System.Runtime.InteropServices.ExternalException: Cannot
execute a program. The command being executed
was "c:\winnt\microsoft.net\framework\v1.0.3705\vbc.exe"
@"C:\WINNT\Microsoft.NET\Framework\v1.0.3705\Temporary
ASP.NET Files\upload\4361bd69\e68dfd45\5vbc3jzp.cmdline".
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.
Stack Trace:
[ExternalException (0x10b): Cannot execute a program. The
command being executed
was "c:\winnt\microsoft.net\framework\v1.0.3705\vbc.exe"
@"C:\WINNT\Microsoft.NET\Framework\v1.0.3705\Temporary
ASP.NET Files\upload\4361bd69\e68dfd45\5vbc3jzp.cmdline".]
System.CodeDom.Compiler.Executor.ExecWaitWithCapture
(IntPtr userToken, String cmd, String currentDir,
TempFileCollection tempFiles, String& outputName, String&
errorName, String trueCmdLine) +1594
System.CodeDom.Compiler.CodeCompiler.Compile
(CompilerParameters options, String compilerDirectory,
String compilerExe, String arguments, String& outputFile,
Int32& nativeReturnValue, String trueArgs) +383
System.CodeDom.Compiler.CodeCompiler.FromFileBatch
(CompilerParameters options, String[] fileNames) +461
System.CodeDom.Compiler.CodeCompiler.FromDomBatch
(CompilerParameters options, CodeCompileUnit[] ea) +429
System.CodeDom.Compiler.CodeCompiler.FromDom
(CompilerParameters options, CodeCompileUnit e) +90
System.CodeDom.Compiler.CodeCompiler.System.CodeDom.Compile
r.ICodeCompiler.CompileAssemblyFromDom(CompilerParameters
options, CodeCompileUnit e) +37
System.Web.Compilation.BaseCompiler.GetCompiledType()
+249
If I restart the IIS server the application runs like it
should, access is granted and the user can view files in
the shared folder and upload them t{w{}\dC-
o the server. Any other
asp.net page that is accessed under the same app the error
occurs again. Restarting IIS server the page compiles as
expected.
I have also tried to hard code the impersonation using the
code found at http://support.microsoft.com/default.aspx?
scid=
- Next message: Dave: "<identity impersonate="true"> question"
- Previous message: Vladimir Maysuradze: "Re: Expire Page"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|