Accessing files and folders on remote server - SERVER ERROR



Hi,

I've currently setup a local user as described in:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT01.asp

This users has been created on the remote server, and locally on our
web farm servers. All access to NTFS file system has been setup and the
users local privileges. However, when I add the

<identity impersonate="true" userName="YourAccount"
password="YourStrongPassword" />

Code in the web.config file, the website starts behaving in an
unpredictable manner - mainly blowing up with the following error:

Server Error in '/admin' Application.
--------------------------------------------------------------------------------

Cannot execute a program. The command being executed was
"c:\windows\microsoft.net\framework\v1.1.4322\csc.exe" /noconfig
@"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\admin\1afb246b\8ae84806\pu6rzxdn.cmdline".
Description: An unhandled exception occurred during compilation using
the CodeDomProvider 'Microsoft.CSharp.CSharpCodeProvider'. 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:\windows\microsoft.net\framework\v1.1.4322\csc.exe" /noconfig
@"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\admin\1afb246b\8ae84806\pu6rzxdn.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:\windows\microsoft.net\framework\v1.1.4322\csc.exe"
/noconfig @"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary
ASP.NET Files\admin\1afb246b\8ae84806\pu6rzxdn.cmdline".]

System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated(IntPtr
userToken, String cmd, String currentDir, TempFileCollection tempFiles,
String& outputName, String& errorName, String trueCmdLine) +2054
System.CodeDom.Compiler.Executor.ExecWaitWithCapture(IntPtr
userToken, String cmd, String currentDir, TempFileCollection tempFiles,
String& outputName, String& errorName, String trueCmdLine) +260
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) +548
System.CodeDom.Compiler.CodeCompiler.FromDomBatch(CompilerParameters
options, CodeCompileUnit[] ea) +428
System.CodeDom.Compiler.CodeCompiler.FromDom(CompilerParameters
options, CodeCompileUnit e) +90

System.CodeDom.Compiler.CodeCompiler.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromDom(CompilerParameters
options, CodeCompileUnit e) +37
System.Web.Compilation.BaseCompiler.GetCompiledType() +227




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2300;
ASP.NET Version:1.1.4322.2300


If I remove the impersonation - the site works fine, apart from the
fact I can't read/write to the remote server. I have googled till I'm
blind, anyone any ideas?

.



Relevant Pages

  • Re: timeout of the vbc.exe when updating application files
    ... > Timed out waiting for a program to execute. ... An unhandled exception occurred during compilation using ... > userToken, String cmd, String currentDir, TempFileCollection tempFiles, ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: SQL stored procedure executing twice
    ... I wasn't aware that DLookupwould execute the "domain" more than once. ... caused the stored procedure to execute twice. ... Dim stDocName As String ... My pass-thru query properties ...
    (microsoft.public.access.modulesdaovba)
  • Re: Cannot execute DTS package
    ... > "Hermit Dave" wrote in message ... >> Whats happening is that it is trying to execute the Query with context ... >>> executing DTS packages from the ASP.NET: ... >>> String ServerPassword, DTSSQLServerStorageFlags Flags, String ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Cannot execute DTS package
    ... > "Hermit Dave" wrote in message ... >> Whats happening is that it is trying to execute the Query with context ... >>> executing DTS packages from the ASP.NET: ... >>> String ServerPassword, DTSSQLServerStorageFlags Flags, String ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Code wont execute Main Macro Calls - non breaking spaces
    ... I have separated each find string and each replace ... Sub ReplaceList() ... My MAIN MACRO does not execute the first 2 options DO FIND AND ... Sub DoFindReplace(FindText As String, ReplaceText As String, _ ...
    (microsoft.public.word.vba.general)

Quantcast