Click here to Skip to main content
15,896,207 members
Home / Discussions / C#
   

C#

 
AnswerRe: Assigning DataView to DataTable Pin
andreumv15-Jul-07 23:53
andreumv15-Jul-07 23:53 
QuestionMDI Pin
tonato84815-Jul-07 21:34
tonato84815-Jul-07 21:34 
QuestionGet Data from another gridview selected row Pin
Edwin Syarief15-Jul-07 21:17
Edwin Syarief15-Jul-07 21:17 
QuestionSmart client Pin
tarunbounthiyal15-Jul-07 20:50
tarunbounthiyal15-Jul-07 20:50 
QuestionErrors happened when I tried to access a toolbar control from other thread. Please show me your all solutions. Pin
goldenchance15-Jul-07 20:45
goldenchance15-Jul-07 20:45 
QuestionDataBase to XML Pin
pavya_Cool15-Jul-07 20:28
pavya_Cool15-Jul-07 20:28 
AnswerRe: DataBase to XML Pin
Eduard Keilholz15-Jul-07 22:54
Eduard Keilholz15-Jul-07 22:54 
QuestionSecurity Exception Unhandled Pin
Sallu174915-Jul-07 20:14
Sallu174915-Jul-07 20:14 
Hi,
I am new to Reflection. I have written the following code...


using System;
using System.Reflection;
using System.Security.Permissions;

namespace reflection
{
class Program
{
[STAThread]

static void Main(string[] args)
{
Assembly myassembly = Assembly.LoadFrom("ReflectionDLL.dll");

Type [] mytypes = myassembly.GetTypes();

foreach (Type type in mytypes)
{
Console.WriteLine(type.FullName);
}


}
}
}

and I am getting the following exception.

System.Security.SecurityException was unhandled
Message="Request for the permission of type 'System.Security.Permissions.UIPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
Source="mscorlib"
GrantedSet="<permissionset class="\"System.Security.PermissionSet\"\r\nversion=\"1\"">\r\n<ipermission class="\"System.Security.Permissions.FileDialogPermission," mscorlib,="" version="2.0.0.0," culture="neutral," publickeytoken="b77a5c561934e089\"\r\nversion=\"1\"\r\nAccess=\"Open\"/">\r\n<ipermission class="\"System.Security.Permissions.IsolatedStorageFilePermission," mscorlib,="" version="2.0.0.0," culture="neutral," publickeytoken="b77a5c561934e089\"\r\nversion=\"1\"\r\nAllowed=\"ApplicationIsolationByUser\"\r\nUserQuota=\"512000\"/">\r\n<ipermission class="\"System.Security.Permissions.SecurityPermission," mscorlib,="" version="2.0.0.0," culture="neutral," publickeytoken="b77a5c561934e089\"\r\nversion=\"1\"\r\nFlags=\"Execution\"/">\r\n<ipermission class="\"System.Security.Permissions.UIPermission," mscorlib,="" version="2.0.0.0," culture="neutral," publickeytoken="b77a5c561934e089\"\r\nversion=\"1\"\r\nWindow=\"SafeTopLevelWindows\"\r\nClipboard=\"OwnClipboard\"/">\r\n<ipermission class="\"System.Security.Permissions.UrlIdentityPermission," mscorlib,="" version="2.0.0.0," culture="neutral," publickeytoken="b77a5c561934e089\"\r\nversion=\"1\"\r\nUrl=\"file:///H:/dot" net="" practice="" projects="" reflection="" bin="" debug="" reflection.exe\"="">\r\n<ipermission class="\"System.Security.Permissions.ZoneIdentityPermission," mscorlib,="" version="2.0.0.0," culture="neutral," publickeytoken="b77a5c561934e089\"\r\nversion=\"1\"\r\nZone=\"Internet\"/">\r\n<ipermission class="\"System.Drawing.Printing.PrintingPermission," system.drawing,="" version="2.0.0.0," culture="neutral," publickeytoken="b03f5f7f11d50a3a\"\r\nversion=\"1\"\r\nLevel=\"SafePrinting\"/">\r\n\r\n"
PermissionState="<ipermission class="\"System.Security.Permissions.UIPermission," mscorlib,="" version="2.0.0.0," culture="neutral," publickeytoken="b77a5c561934e089\"\r\nversion=\"1\"\r\nUnrestricted=\"true\"/">\r\n"
RefusedSet=""
Url="file:///H:/dot net practice projects/reflection/reflection/bin/Debug/reflection.EXE"
StackTrace:
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()



can anyone help me out plez...
GeneralRe: Security Exception Unhandled Pin
Sallu174915-Jul-07 22:16
Sallu174915-Jul-07 22:16 
GeneralRe: Security Exception Unhandled Pin
Malcolm Smart16-Jul-07 2:21
Malcolm Smart16-Jul-07 2:21 
AnswerRe: Security Exception Unhandled Pin
mav.northwind16-Jul-07 4:14
mav.northwind16-Jul-07 4:14 
QuestionGet value from other form variable Pin
Edwin Syarief15-Jul-07 18:24
Edwin Syarief15-Jul-07 18:24 
AnswerRe: Get value from other form variable Pin
I.explore.code15-Jul-07 18:53
I.explore.code15-Jul-07 18:53 
GeneralRe: Get value from other form variable Pin
Edwin Syarief15-Jul-07 19:22
Edwin Syarief15-Jul-07 19:22 
AnswerRe: Get value from other form variable Pin
Ravi Bhavnani15-Jul-07 18:54
professionalRavi Bhavnani15-Jul-07 18:54 
GeneralRe: Get value from other form variable Pin
Edwin Syarief15-Jul-07 19:23
Edwin Syarief15-Jul-07 19:23 
AnswerRe: Get value from other form variable Pin
T.EDY15-Jul-07 19:23
T.EDY15-Jul-07 19:23 
GeneralRe: Get value from other form variable Pin
Edwin Syarief15-Jul-07 19:25
Edwin Syarief15-Jul-07 19:25 
GeneralRe: Get value from other form variable Pin
T.EDY15-Jul-07 19:34
T.EDY15-Jul-07 19:34 
QuestionCustomizing the drag-over cursor Pin
jozsurf15-Jul-07 16:51
jozsurf15-Jul-07 16:51 
AnswerRe: Customizing the drag-over cursor Pin
Eduard Keilholz15-Jul-07 22:51
Eduard Keilholz15-Jul-07 22:51 
GeneralRe: Customizing the drag-over cursor Pin
jozsurf15-Jul-07 23:09
jozsurf15-Jul-07 23:09 
GeneralRe: Customizing the drag-over cursor Pin
Eduard Keilholz15-Jul-07 23:14
Eduard Keilholz15-Jul-07 23:14 
GeneralRe: Customizing the drag-over cursor Pin
jozsurf16-Jul-07 15:29
jozsurf16-Jul-07 15:29 
QuestionCapture Video from Webcam Pin
Le Hoang Viet15-Jul-07 16:39
Le Hoang Viet15-Jul-07 16:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.