Strong-Name Assembly calling WebService

From: C.Dimitrov (CDimitrov_at_discussions.microsoft.com)
Date: 04/27/05


Date: Wed, 27 Apr 2005 01:24:02 -0700

Hi,

I have the following scenario:
1. ASP application within the WEB share D:\WEBS\ASP calls
Server.CreateObject("A.A")
the server object A.A is .NET CCW with strong name assembly
registered with
regasm A.dll /codebase /tlb:A.tlb
2. Inside A initializing method another assembly A.B.dll is loaded
3. Inside A.B initializing part calling a Write to Eventlog and call a Web
Service
both A.dll and A.B.dll are located on D:\Install folder lets say and they
use a common A.config file.
4. The web service is generated by wsdl.exe and the class WebService is
added to the A.B assembly which is Strong named as well.

There are ASPNET/IUSR and IWAM permissions to D:\WINNT\Temp and the folder
Now it is able to write to the event log but when it reach the web service
call
WebService s = new WebService();
I got exception:
Cannot execute a program. The command being executed was
"d:\winnt\microsoft.net\framework\v1.1.4322\csc.exe" /noconfig
@"D:\WINNT\TEMP\yudj51u5.cmdline".

   at
System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated(IntPtr
userToken, String cmd, String currentDir, TempFileCollection tempFiles,
String& outputName, String& errorName, String trueCmdLine)
   at System.CodeDom.Compiler.Executor.ExecWaitWithCapture(IntPtr userToken,
String cmd, String currentDir, TempFileCollection tempFiles, String&
outputName, String& errorName, String trueCmdLine)
   at System.CodeDom.Compiler.CodeCompiler.Compile(CompilerParameters
options, String compilerDirectory, String compilerExe, String arguments,
String& outputFile, Int32& nativeReturnValue, String trueArgs)
   at System.CodeDom.Compiler.CodeCompiler.FromFileBatch(CompilerParameters
options, String[] fileNames)
   at
System.CodeDom.Compiler.CodeCompiler.FromSourceBatch(CompilerParameters
options, String[] sources)
   at System.CodeDom.Compiler.CodeCompiler.FromSource(CompilerParameters
options, String source)
   at
System.CodeDom.Compiler.CodeCompiler.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSource(CompilerParameters options, String source)
   at System.Xml.Serialization.Compiler.Compile()
   at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings)
   at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[]
mappings)
   at System.Web.Services.Protocols.SoapClientType..ctor(Type type)
   at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()
   at APIProxy.Service.Security.SecurityService..ctor() in
d:\work\.net\apiproxy\apiproxy.service\securityservice.cs:line 39
   at APIProxy.Service.Service.Login() in
d:\work\.net\apiproxy\apiproxy.service\service.cs:line 207

I tried with Asserts and these code in the assembly, but still no success:
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("..\\..\\Common.snk")]
[assembly: AssemblyKeyName("")]
//[assembly: AllowPartiallyTrustedCallers]
//[assembly: SecurityPermissionAttribute(SecurityAction.RequestMinimum,
Assertion=true)]
//[assembly:
EventLogPermissionAttribute(SecurityAction.RequestMinimum,PermissionAccess=EventLogPermissionAccess.Instrument)]
//[assembly:
FileIOPermissionAttribute(SecurityAction.RequestMinimum,Unrestricted=true)]

What I'm doing wrong? Any articles or recommendations I'm missing?

Thanks & Regards,
C.Dimitrov



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: Backup and Restore... a new twist to a tired question.
    ... Kristofer Gafvert - IIS MVP ... An unhandled exception occurred during compilation using the ... userToken, String cmd, String currentDir, TempFileCollection tempFiles, ... String cmd, String currentDir, TempFileCollection tempFiles, String& ...
    (microsoft.public.inetserver.iis)
  • Re: Error running a ASP.NET app using VB.NET on domain controller HELP!!!
    ... An unhandled exception occurred during compilation using the ... > userToken, String cmd, String currentDir, TempFileCollection tempFiles, ... > String& outputName, String& errorName, String trueCmdLine) ...
    (microsoft.public.dotnet.framework.aspnet)
  • Error running a ASP.NET app using VB.NET on domain controller HELP!!!
    ... I have a Windows 2003 server at home that is set up as a domain controller ... Exception Details: System.Runtime.InteropServices.ExternalException: Failed ... userToken, String cmd, String currentDir, TempFileCollection tempFiles, ... String cmd, String currentDir, TempFileCollection tempFiles, String& ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Error running a ASP.NET app using VB.NET on domain controller HELP!!!
    ... An unhandled exception occurred during compilation using the ... > userToken, String cmd, String currentDir, TempFileCollection tempFiles, ... > String& outputName, String& errorName, String trueCmdLine) ...
    (microsoft.public.dotnet.framework.aspnet)