Sharepoint Forum

 
Home » Forum » Sharepoint       Ask a questionRSS Feeds

webpart deployment - custom policy file

  Asked By: Bob Bolton         Date: Apr 21, 2009      Category: Sharepoint      Views: 336
 

I am trying to deploy custom web part using custom policy file. For
this I created a new policy file same as wss_medium security, and added
codegroup for my web part. I derived the PublicKeyBlob using secutil.exe

When I try to drag and place my custom web part on portal page, it
shows me error stating
A Web Part or Web Form Control on this Web Part Page cannot be
displayed or imported because it is not registered on this site as safe.

In my event log it logs an error stating
Failure in loading assembly: webpart, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=de247a751ebccaad

The web part works fine if I place the dll in GAC. In the web part is
accessing an web service which is not hosted on my system.
The IPermission block for it looks like this
<IPermission
class="WebPermission"
version="1">
<ConnectAccess>
<URI uri="$OriginHost$"/>
</ConnectAccess>
</IPermission>

What is that am doing wrong?

Tagged:          

 

2 Answers Found

 
Answer #1       Answered By: Shayla Mcbride          Answered On: Apr 21, 2009       

There must be something in your code which is throwing "security exception".
That's the only reason it s not working from the bin and running from the GAC.

 
Answer #2       Answered By: Jarvis Rowe          Answered On: Apr 21, 2009       

Error i get on my portal  page is "Execution permission cannot be
acquired".

 
Didn't find what you were looking for? Find more on webpart deployment - custom policy file Or get search suggestion and latest updates.


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].