TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mahmoud Hassan
NA
5
0
HELP!!! System.Security.SecurityException ERROR (C#)
Aug 27 2007 3:31 AM
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
Reply
Answers (
1
)
how to perform diffrent operation with gridview in C# windows application
Schdule process time