referenced dlls
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
referenced dlls

 
Post new topic   Reply to topic    Windows Server Forum Index -> Portal Server Development
Author Message
yufufi
Guest





Posted: Mon Jan 24, 2005 4:34 am    Post subject: referenced dlls Reply with quote

I'm writing a web part which has references to some other dlls. And these
dlls try to acces some web resources. So it seems I need to give them some
permission to accomplish it. But the problem is all the resource on the web
describes how to give permissions to webpart(cab) not to the dlss. So I
tried to put all the dlls into the gac for an easy solution. But it didn't
work out ? Is there a different policy for referenced dlls ?

Thanx in advance,
yufufi
Back to top
Noble Lesmana
Guest





Posted: Mon Jan 24, 2005 6:46 am    Post subject: RE: referenced dlls Reply with quote

What resources do your referenced DLLs access? You might have to give code
access security permission to the DLLs after you identify the resources they
need to have access to.

Noble Lesmana

"yufufi" wrote:

Quote:
I'm writing a web part which has references to some other dlls. And these
dlls try to acces some web resources. So it seems I need to give them some
permission to accomplish it. But the problem is all the resource on the web
describes how to give permissions to webpart(cab) not to the dlss. So I
tried to put all the dlls into the gac for an easy solution. But it didn't
work out ? Is there a different policy for referenced dlls ?

Thanx in advance,
yufufi


Back to top
DJA
Guest





Posted: Mon Jan 24, 2005 9:01 pm    Post subject: Re: referenced dlls Reply with quote

Indeed all assemblies in the "code calling chain" must have the
permissions needed. So if the assembly you call from your webpart
assembly needs to call a webservice, the called assembly as well as
your webpart assembly must have the WebPermission.

Strong name all your assemblies with the same public key and grant them
permissions using their common PublicKeyBlop.

What is also important is that if your webpart assembly is not granted
full trust it will only be able to call assemblies which have the
[assembly: AllowPartiallyTrustedCallers] attribute set. So you need to
set this attribute in the assemblyInfo file of the assmeblies your
webpart assembly calls.
Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> Portal Server Development All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB