Shared Assembly

G

Guest

Hello Everyone,

I have created a shared assembly and I installed it in GAC -- now I want to
use this shared assembly in my Web project. Can anyone help me with this --
i tried adding a reference to my project and specifying it in web.config as
follows:

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm:v1">
<dependentAssembly>
<assemblyIdentity name="WebSecurityBusinessObjects"
publicKeyToken="04a21a904cc5af93" culture="neutral" />
<probing privatePath="bin"/>
</dependentAssembly>
</assemblyBinding>
</runtime>

I am still getting security exception.

Thanks for all the help in advance.

Yatin Patel
 
G

Guest

Hi,

Try to include it under Referenece in your solution explorer using add
referenece.

Cheers,

Jerome. M
 
P

Patrick Olurotimi Ige

Yatin what u can also do is to put the DLL files under ur BIN folder in
the wwwroot folder.
Hope it helps
Patrick
 
G

Guest

Hi,

Thanks for the reply but I have tried both ways:

1. by adding as a reference
2. by copying the dll under bin folder

no matter what i do, it still gives me the same error.

Yatin Patel
 
G

Guest

Hi,

Sorry for the delay -- here is the exact error:

Security Exception
Description: The application attempted to perform an operation not allowed
by the security policy. To grant this application the required permission
please contact your system administrator or change the application's trust
level in the configuration file.

Exception Details: System.Security.SecurityException: Security error.

Regards,
Yatin Patel
 
P

Patrick Olurotimi Ige

Yatin,
But ur Error seems to be a Security issue!!
Do u have access to the right folder and the BIN folder ur application
is trying to use?
Try checking if your ASPNET acct has the necesary permissions.
Patrick
 
G

Guest

Patrick,

Yes, I tried giving the rights also but still its giving me the same error.

Regards,
Yatin Patel
 
G

Guest

Hi Patrick,

I just found out that if I change the <trust> level to "Full" -- i am able
to access the assembly but if I change the <trust> level to "Medium" -- i get
the Securityexception error. As far as I know its not advisable to give Full
trust to the assemblies -- can you please let me know if I am doing anything
wrong here.

Regards,
Yatin Patel
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top