Groups | Blog | Home
all groups > dotnet security > september 2004 >

dotnet security : assign socket permission to NTD winform


zbcong
9/29/2004 3:17:36 PM
hello
i write a smtp client winform (using socket 25 connect to smtp server),and
deploy it to iis by NTD (no-touch deployment),i can launch the form from the
client machine,when i want connect to the smtp server,the security exception
is thrown,i know that i have not assigned the socket permission in the
client side to the downloaded assembly,but i don't know how to do that,who
can give me a step-by-step instruction.

any help will be appreciated.

Rob Teixeira [MVP]
9/30/2004 12:49:32 AM
You can -

1) wait for Visual Studio 2005, which has built-in tools to help you with
this, or
2) use evidence in your exe assembly and give more permission to it on the
client machine

On the client machine, you can go to Cotrol Panel -> Admin -> .NET Wizards
and Trust your assembly. You can give more trust (raise permissions) to an
assembly based on an identity. That identity can be the assembly location
(like the url you are launching it from) or a public key. I suggest a public
key, because then you can assign keys based on permission sets to your apps
and not have to configure for each one.

If you don't want to go to each client machine, you can generate a setup
program and programatically adjust the permissions. Your clients will just
have to run the setup once, and then you can update your program to your
hearts content without affecting this. The setup wouldn't really install the
EXE, but it would adjust the permission sets for your app, and can also do
things like add a shortcut for the URL.

More info here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnforms/html/winforms11122002.asp

-Rob Teixeira

[quoted text, click to view]

AddThis Social Bookmark Button