security Exception

D

Doug

Hi

I am using vs2005 on xp pro machines and i have a variable that is declared
as:
public string user = SystemInformation.UserName.ToString();

On one of my computers this works well and allows the variable 'user' to be
set the the user login name., this then allows another method to use the
variable to map to a dataset.

However on my notebook computer, i get the following error:

Request for the permission of type
'System.Security.Permissions.EnvironmentPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

I have googled the error but only find references to webpages.

When i compile the app on the other machine and run it on the notebook it
works - but I need to debug on the notebook while I am travelling.

Any help to resolve this would be appreciated.



Doug
 
R

RobinS

Hi Doug,

What operating system are you running on your notebook computer?

Do you have Visual Studio 2005 installed on the notebook computer?

I'm assuming you have .Net 2.0 installed on the notebook computer?
(I think VS installs it, but I thought I'd ask anyway).

Are you using an account with administrative access on the
notebook computer?

Robin S.
 
D

Doug

Thanks Robin

I resolved the issue - it was due to my notebook trying to debug the
applicaiton that is on the other computer when the notebook user doesnt have
rights on the other computer.

Doug
 

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