SecurityExcepion inside DLL linked in an HTML tag OBJECT

L

Lambuz

Hi there,
I've got this strange problem.

I've created a library of some assemblies and one of these
(webclient.dll) is linked inside an html tag object by using this
sintax:

<OBJECT id="myID" classid="http:WebClient.dll#namespace.WebClientClass"
/>

The assembly is correctly loaded inside IE, in fact if a try to invoke
a sample methods I've got back the correct return value.

The problem is that this assembly must use some remoting object.

All remoting confs are inside a config file put in the same virtual
directory of assembly and html file.

I always obtain an exception when I try to use this code:

RemotingConfiguration.Configure("CPRSWebClient.config");

The exception is the following:

System.Security.SecurityException: Request for the permission of type
'System.Security.Permissions.SecurityPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
failed.
at System.Runtime.Remoting.RemotingConfiguration.Configure(String
filename)
at IBM.Cipros.Refinery.CPRSWebClient.Check()
The action that failed was: Demand The type of the first permission
that failed was: System.Security.Permissions.SecurityPermission
The Zone of the assembly that failed was: Trusted

Anyone can help me ?
 
G

Guest

Hi there,
I've got this strange problem.

I've created a library of some assemblies and one of these
(webclient.dll) is linked inside an html tag object by using this
sintax:

<OBJECT id="myID" classid="http:WebClient.dll#namespace.WebClientClass"
/>

You need full trust to make this setup work :(
 
L

Lambuz

You need full trust to make this setup work :(

Can you explain to me how I can do it ?

I've given full trust permissione to my assembly using .NET
Configuration 1.1 panel but I obtain the same SecurityException...why ?



I'm using a strong name with my assembly and for giving full trust
permission I've tried to ways:
- In runtime security policy\Machine\Code Groups\LocalIntranet_Zone
I've added a new Code Group for my assembly and I've assigned to it the

Full Trust permission set
- I've used the Wizard "Trust an assembly"


Please help me
 
L

Lambuz

I can't solve this problem in no way, so I've changed how configure
remoting on client side.

Before I used configuration file, but RemotingConfiguration.Configure
method doesn't support URI string for file location and my
configuration file is available on a web site, the same site of
assembly.

Now I'm trying to use code configuration for remoting but I've got
another problem.

At the first C# istruction TcpClientChannel _channel = new
TcpClientChannel(); the IE gives me the following error:

that assembly does not allow partially trusted callers

The problem is that my assembly is strong named and I'm using the
istruction [assembly:AllowPartiallyTrustedCallers()].

How can I solve this new problem ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top