Hello.
I use a web service that I created through a custom
control on a windows form and it works fine. However, if iput this control
on a
webform usinf the <object...classid..> label, i get an security error when i
call the web service
saying:
"The application attempted to perform an operation not
allowed by the security policy. The operation required the
SecurityException. To grant this application the required
permission please contact your system administrator, or
use the Microsoft .NET security policy administration tool.
Request for the permission of type
System,Net.WebPermission..."
What can i do?
I don't know how to explicitly trust the assembly.
ThanksYou'll need to use CASPOL.exe from the command line, or use the
framework configuration UI [1] under the Administrative Tools menu on
the computer.
What I would do is use these tools to grant the additional permissions
through a new code group [2] based on either a strong name or a URL
membership condition. Since URLs can be spoofed I'd suggest you string
name the assembly with your custom control and use the strong name
membership.
--
Scott
http://www.OdeToCode.com/blogs/scott/
[1]
http://msdn.microsoft.com/library/d...mscorcfgmsc.asp
[2]
http://msdn.microsoft.com/library/d...odegroups .asp
--
Scott
http://www.OdeToCode.com/blogs/scott/
On Tue, 30 Aug 2005 09:13:34 +0200, "Aurelio"
<corcharelliARROBAhotmail.com> wrote:
>Hello.
>Hello.
>I use a web service that I created through a custom
>control on a windows form and it works fine. However, if iput this control
>on a
>webform usinf the <object...classid..> label, i get an security error when i
>call the web service
>saying:
>"The application attempted to perform an operation not
>allowed by the security policy. The operation required the
>SecurityException. To grant this application the required
>permission please contact your system administrator, or
>use the Microsoft .NET security policy administration tool.
>Request for the permission of type
>System,Net.WebPermission..."
>What can i do?
>I don't know how to explicitly trust the assembly.
>Thanks