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
Peter
NA
3
0
Code Access Security and UAC
Dec 11 2009 3:49 AM
I create a console application (app.exe), with one line:
StreamWriter writer = File.CreateText(@"c:\file.txt");
Then, using caspol, I create a permissionset that states that the members of the permissionset cannot write to the c:\file.txt file, and apply it to a code group. This codegroup is then applied to the console application I just created.
Using mscorcfg.msc to evaluate the assembly, I made sure that app.exe is only affected by this new codegroup - and it is.
If I run this in Win7, with UAC at default - the app crashes, stating that the app didn't have the security permission to write to the file, which is what is to be expected.
However, if I run the app with UAC turned off - the app writes perfectly to the file. No crash, no warning, no nothing.
It's as if turning UAC off completes disables CAS. That can't possibly be right in any way, shape or form
Reply
Answers (
3
)
email should be sent automatically to the user upon his registration in the website using asp.net,C#
how to run a wpf standalone application without a .net framework on target machine?