Configuration for to grant WebPermission to an ASP.Net 2.0 WebPart?

M

Martin

Hi,

I'm writning an ASP.Net 2.0 WebPart, which needs WebPermission.

I've read http://msdn2.microsoft.com/en-us/library/ms916855.aspx, but still
get the error

"Request for the permission of type 'System.Net.WebPermission, System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. "

Where can I find documentation on what attributes an I Permission element
can take?
I even put in a deliberately bad config
<IPermission class="WebPermission"
version="1" >
<ConnectxxAccess>
<URI uri=".*" />
</ConnectxxAccess>
</IPermission>
but still get my original error, so perhaps my config is being ignored??

Any tips appreciated

Thanks
Martin
 
D

Dominick Baier

the easiest way to figure out the correct syntax is to programmatically create
a WebPermission class - populate all properties and call ToXml() on it...

HTH
 
M

Martin

Hi Dominick,

Thanks for your reply
I'm bypassing this problem at present.

Martin
 

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,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top