Web Service

A

Aurelio

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
 
S

Scott Allen

You'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...netframeworkadministrationtoolmscorcfgmsc.asp

[2]
http://msdn.microsoft.com/library/d...gnetconfigurationtooltoworkwithcodegroups.asp
 

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

Similar Threads

Web Service Security Problem 0
Security exception 0
Security Problem 1
Debug Session on localhost 5
Security Exception 0
Security issue on Windows7 1
trust level problem 1
Signing my .NET Custom Control 3

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top