"Partially Trusted Context"

J

john bailo

I wrote a c# program that does some file manipulation on
a remote server. Testing it from my workstation, it ran
fine.

When I copied it to another server, and ran it from
there, on load, it threw a balloon message:

"This application is running in a partially
trusted context. Some functionality in
the application may be disabled due to
security restrictions."

What is the answer to this?
 
E

Eddie

Use the Framework configuration wizard to modify the
trust level for the Program/assembly..
Just assign it a higher trust level..

HTH
Eddie de bear
 
J

john bailo

perfect, thanks.

i got to the point of adding my .exe to the framework in the .NET
Configuration Tool, but when I right clicked on it, I didn't see
a 'security' property.

then used "Runtime Security Policy" and selected my *.exe and
increased it's security.

i guess i never thought of my little exe as an 'assembly' :D
 
N

Nicholas Paldino [.NET/C# MVP]

John,

The reason for this is that .NET doesn't fully trust assemblies that are
located on another machine. In order to get around this, you will have to
go to the .NET framework configuration tool and set up the assemblies so
that they are given the appropriate rights. You will have to strong-name
the assemblies, so that you can identify them in the configuration tool.

Hope this helps.
 

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

Top