Re: Strong-Name Assembly calling WebService

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


Date: Wed, 27 Apr 2005 15:59:35 -0700

Hi, Nicole

Yes, that is the issue.
I have added on W2K the ASP application to High Isolated and change from
Component Services
the Identity to be another local account without impersonation works just
fine.
But on Windows 2003 Standard Server have no success even if configuring a
separate pool with different account.

Thanks,
C.Dimitrov

"Nicole Calinoiu" wrote:

> Does http://support.microsoft.com/default.aspx?scid=kb;en-us;315904 seem
> relevant?
>
>
>
> "C.Dimitrov" <CDimitrov@discussions.microsoft.com> wrote in message
> news:0DF1158D-ACF7-4E5B-94F8-AAB62C44D967@microsoft.com...
> > 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

  • CodeDom Security / Permissions issues
    ... ASP.net web site and a Windows Service. ... I realize that CodeDom has to create temporary files even when doing ... Boolean useAsync, String msgPath, Boolean bFromProxy)at ... options, String source) at ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Strong-Name Assembly calling WebService
    ... The web service is generated by wsdl.exe and the class WebService is ... > userToken, String cmd, String currentDir, TempFileCollection tempFiles, ... > options, String source) ...
    (microsoft.public.dotnet.security)
  • CodeDom Security/Permission Issues
    ... The same code is used by both an ASP.net web site and a ... I realize that CodeDom has to create temporary files even when doing ... access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, ... options, String source) ...
    (microsoft.public.dotnet.framework)
  • Re: error in code that writes and compiles a dll on the fly help please
    ... > userToken, String cmd, String currentDir, TempFileCollection tempFiles, ... > String& outputName, String& errorName, String trueCmdLine) at ... > options, String source) at ...
    (microsoft.public.dotnet.framework.compactframework)
  • Timeout during XmlSerializer instantiation
    ... This works most of the time, but sometimes I get a timeout ... userToken, String cmd, String currentDir, TempFileCollection tempFiles, ... String cmd, String currentDir, TempFileCollection tempFiles, String& ... ompileAssemblyFromSource(CompilerParameters options, String source) ...
    (microsoft.public.dotnet.xml)