RE: deploying app with existing COM

From: Peter Huang (v-phuang_at_online.microsoft.com)
Date: 11/05/04


Date: Fri, 05 Nov 2004 07:02:04 GMT

Hi

>From you description, do you mean you have a .net application which will
use a SCRUN.DLL(a common com dll) to do some job, and on target machine you
get exception. If I have any misunderstanding, please feel free to post
here.

Also what is the exact error message? And which code line cause the
exception?

To isolate if the problem is caused by the CLR security check or underlying
win32 check, we can try to use the caspol tool to shut down the clr
security check.
caspol -s[ecurity] { on | off }
    Turn security on or off

We can turn off the security check by running the code below.
caspol -s off

NOTE: this is for test purpose please enable the security check after test.
caspol -s on

For detailed information about caspol, please refer to the link below.
Code Access Security Policy Tool (Caspol.exe)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/htm
l/cpgrfcodeaccesssecuritypolicyutilitycaspolexe.asp

If this works after call(caspol -s off), we will know that the problem is
caused by clr security check.
You may try to run the application under same account and run on the local
machine, both the interop dll the managed app and the com dll will be on
the same machine.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.



Relevant Pages

  • asp.net + unmanaged dll security issues
    ... When I tried to access a function in that dll, application threw an exception ... The same dll function works fine if the dll is impoted in a Windows ... Is there any security issues in Web application? ...
    (microsoft.public.dotnet.framework.aspnet)
  • asp.net + unmanaged dll security issues
    ... When I tried to access a function in that dll, application threw an exception ... The same dll function works fine if the dll is impoted in a Windows ... Is there any security issues in Web application? ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: .NET Security
    ... start caspol -s off ... then I can run the EXE/DLL without the security from a remove drive. ... Do I need to sign the DLL and will that cover the sub-assemblies it ... service pack changes the security rules for all 2.0 and higher apps to ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Winsock in C#
    ... everything works fine with the dll and web until my ... reaches tcpListener.Start, it produces an exception.. ... Maybe your problem is of security, most probably the user under which the ... web app is running does not have access to open TCP connections. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: StrongNameIdentity check only works on my developmemt machine
    ... I found out why the program wouldn't throw exception. ... machine configured as "caspol -s off" ... Now I need to figure out a way to programatically turn on the ... security. ...
    (microsoft.public.dotnet.security)