473,387 Members | 1,585 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Urgent Help!! System.Security.SecurityExecption ( C#) -- PLZ HELP ME

HI ALL

PLEASE HELP ME. I am stuck on this point and can't do any progress in my project.

Currently, I am using Domain Environment. I have Active directory and I want every users when they login to the domain, a program (.exe) file will run on there machines.

This as you know, can be done by configuring logon script through GROUP POLICY ( from active directoty).

Any how, when I run the (.exe) file generated when compiling the code in my local machine ( THE server that host the active directory), it works well.

BUT, when the users try to login and run (.exe) file the follwing error generated:

************************************************** **********************************

System.Security.SecurityException: Request for the permission of type'System.Security.Permissions.SeurityPermission ,
mscorlib, Version=2.0.0., Culture=neural, PublicToken=b77a5c561934e089' failed


at System.Security.Principal.WindwosIdentity.GetCurre nt()

at TestConnection.Program.Main(Straing []args)

The action that failed was:

Demand

The type of the first permission failed was:

System.Security.Permissions.SecurityPermission


The zone of the assembly that failed was:

Internet


************************************************** *********************************

As you can see from the execption. when I use the method WindowsIdentity.getCurrent()


it fails why? Howover, when I use any symbol method only let's say " Console.WriteLine() >> this will work.


I found something intersting about changing the security of the project by browsing to the solution explorer then open the PROJECT PROPERTIES

THEN YOU GO TO SECURITY.

But I couldn't understand how to change the security of my code to make it run in any PCs requesting it from the Server.

I think the whole problem is a permission problem?? SO PLZ HOW TO SOLVE IT

I Will blow up
Aug 27 '07 #1
1 1524
Plater
7,872 Expert 4TB
From my experiance if I an application sitting on a server, then try and run it from another computer through network sharing, I get all kinds of security violations.
BUT, if I have the computer COPY the file from the server to it's local computer, it runs fine without the security errors.

Not sure why, but something is certainly fighting it out when you try and remotely run a .NET application.
Aug 27 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Tarren | last post by:
Hi, I am getting the following error: Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the...
0
by: paul | last post by:
I just installed Windows XP SP2 on my web server. Now when I run one of the web applications I get the following error: ArgumentException: Illegal characters in path.] ...
8
by: Tim::.. | last post by:
Can someone please tell me why I keep getting the following error for some of my web application users but not others??? Even though the application runs from a central webserver??? Thanks for...
6
by: varkey.mathew | last post by:
Dear all, Bear with me, a poor newbie(atleast in AD).. I have to authenticate a user ID and password for a user as a valid Active Directory user or not. I have created the IsAuthenticated...
3
by: Carl | last post by:
Hi. I have my program written as a console application in C# .NET 2005. I run it from a server on the local intranet and I got this message: An unhandled exception of type...
6
by: alex | last post by:
Hi, this always works: private ConsoleToTextbox myConsole; Console.SetOut(myConsole); But now (a few weeks later i started this project again) i get a non handeld security exception from...
0
by: Siberwulf | last post by:
I'm trying to fetch an XML document from a website through an assembly i built and attached to SQL 2005. Here is my code for the SPROC assembly: public static void fetch_FeedData(string...
5
by: koonda | last post by:
Hi all, I am a student and I have a project due 20th of this month, I mean May 20, 2007 after 8 days. The project is about creating a Connect Four Game. I have found some code examples on the...
3
by: Mike | last post by:
Hi I have problem as folow: Caught Exception: System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Request for the permission of type...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.