Restrictions, partially trusted context, what and why?

  • Thread starter Thread starter Dmitri Shvetsov
  • Start date Start date
D

Dmitri Shvetsov

Hi,

Maybe somebody knows why it's happening?

I wrote a C# Windows Application working with the remote database through a
DataSet. It works cool from my computer but when I gave this application to
my friend who (and only him) has to work with the database tables to edit
them he began receiving the following message every time when a new window
opens:

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

How can I correct/change this situation? Maybe I need to change some
settings and what exactly?

P.S. When I stored this C# Windows application at my Internet web site on
the provider's server I could start it from there but I was getting the same
message and even more, I wasn't able to open any database table at all even
when I entered the correct login information.

Dmitri
 
Dmitri,

The reason this is happening is that when the runtime detects that an
executable is running from a website, it restricts the rights of that
assembly, because you do not know where it came from. To get around this,
you either have to download the code and save it, or you have to set the
security on the local machine so that it will grant permissions to
assemblies downloaded from the site in question.

Hope this helps.
 
I get the same message Dmitri mentioned but only for one user profile
on my PC. I'm using VB .NET with a Windows application. This happens
with both .NET Studio 2002 and 2003.

To create the condition I only need to start a new Windows solution
and project. I get the message just by starting the application with
the standard "Form1" and no coding.

If I run the same application when logged on to my computer as another
user I do not get the message. Both users are administrators on the
PC and have full control NTFS permissions.

My question is what I need to do specifically to set the security. I
would not need to "download" anything because it was developed and is
running on my local box.

If anyone can shed some light on this for me I would appreciate it.
 
Sorry ScubaDude... My newsreader says that there are over 6,500 recent
messages in this forum. I'm having a hard time finding "Dmitri's" message
which contains, apparently, the error message and another description of the
problem. Can you please post the error message you are getting. Also, are
you getting any messages logged to the Event viewer?

--- Nick

ScubaDude said:
I get the same message Dmitri mentioned but only for one user profile
on my PC. I'm using VB .NET with a Windows application. This happens
with both .NET Studio 2002 and 2003.

To create the condition I only need to start a new Windows solution
and project. I get the message just by starting the application with
the standard "Form1" and no coding.

If I run the same application when logged on to my computer as another
user I do not get the message. Both users are administrators on the
PC and have full control NTFS permissions.

My question is what I need to do specifically to set the security. I
would not need to "download" anything because it was developed and is
running on my local box.

If anyone can shed some light on this for me I would appreciate it.
 
Back
Top