PC Review


Reply
Thread Tools Rate Thread

Closing a App

 
 
MadCrazyNewbie
Guest
Posts: n/a
 
      31st Mar 2004
Hey group,

Im trying to close a app (This is on a different machine to where it was
compiled) but when i click on my Close button. I get the following
exception:

Im Using Application.Close in my code to end my App, it works ok if i use it
in the IDE.

Ta
MCN

************** Exception Text **************
System.Security.SecurityException: Request for the permission of type
System.Security.Permissions.SecurityPermission, mscorlib,
Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet
grantedSet, PermissionSet deniedSet, CodeAccessPermission demand,
PermissionToken permToken)
at System.Security.CodeAccessSecurityEngine.Check(PermissionToken
permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32
checkFrames, Int32 unrestrictedOverride)
at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission
cap, StackCrawlMark& stackMark)
at System.Security.CodeAccessPermission.Demand()
at System.Windows.Forms.Application.Exit()
at RixIPSite.frmMainMenu.btnExit_Click(Object sender, EventArgs e) in
D:\Live Projects\RixIPSite\MainMenu.vb:line 433
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase:
file:///c:/windows/microsoft.net/framework/v1.0.3705/mscorlib.dll
----------------------------------------
RixIPSite
Assembly Version: 1.0.1551.16627
Win32 Version: 1.0.1551.16627
CodeBase: file://appsrv/Apps/Rix%20Applications/RixIPSite%20V1.0.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase:
file:///c:/windows/assembly/gac/system.windows.forms/1.0.3300.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.3300.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase:
file:///c:/windows/assembly/gac/system.drawing/1.0.3300.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase:
file:///c:/windows/assembly/gac/system.xml/1.0.3300.0__b77a5c561934e089/system.xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.


 
Reply With Quote
 
 
 
 
Bernie Yaeger
Guest
Posts: n/a
 
      31st Mar 2004
Hi

Use application.exit.

Bernie
"MadCrazyNewbie" <(E-Mail Removed)> wrote in message
news:kaicna-(E-Mail Removed)...
> Hey group,
>
> Im trying to close a app (This is on a different machine to where it was
> compiled) but when i click on my Close button. I get the following
> exception:
>
> Im Using Application.Close in my code to end my App, it works ok if i use

it
> in the IDE.
>
> Ta
> MCN
>
> ************** Exception Text **************
> System.Security.SecurityException: Request for the permission of type
> System.Security.Permissions.SecurityPermission, mscorlib,
> Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

failed.
> at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet
> grantedSet, PermissionSet deniedSet, CodeAccessPermission demand,
> PermissionToken permToken)
> at System.Security.CodeAccessSecurityEngine.Check(PermissionToken
> permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32
> checkFrames, Int32 unrestrictedOverride)
> at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission
> cap, StackCrawlMark& stackMark)
> at System.Security.CodeAccessPermission.Demand()
> at System.Windows.Forms.Application.Exit()
> at RixIPSite.frmMainMenu.btnExit_Click(Object sender, EventArgs e) in
> D:\Live Projects\RixIPSite\MainMenu.vb:line 433
> at System.Windows.Forms.Control.OnClick(EventArgs e)
> at System.Windows.Forms.Button.OnClick(EventArgs e)
> at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
> at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
> button, Int32 clicks)
> at System.Windows.Forms.Control.WndProc(Message& m)
> at System.Windows.Forms.ButtonBase.WndProc(Message& m)
> at System.Windows.Forms.Button.WndProc(Message& m)
> at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
> at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
> at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
> IntPtr wparam, IntPtr lparam)
>
>
> ************** Loaded Assemblies **************
> mscorlib
> Assembly Version: 1.0.3300.0
> Win32 Version: 1.0.3705.288
> CodeBase:
> file:///c:/windows/microsoft.net/framework/v1.0.3705/mscorlib.dll
> ----------------------------------------
> RixIPSite
> Assembly Version: 1.0.1551.16627
> Win32 Version: 1.0.1551.16627
> CodeBase: file://appsrv/Apps/Rix%20Applications/RixIPSite%20V1.0.exe
> ----------------------------------------
> System.Windows.Forms
> Assembly Version: 1.0.3300.0
> Win32 Version: 1.0.3705.288
> CodeBase:
>

file:///c:/windows/assembly/gac/system.windows.forms/1.0.3300.0__b77a5c561934e089/system.windows.forms.dll
> ----------------------------------------
> System
> Assembly Version: 1.0.3300.0
> Win32 Version: 1.0.3705.288
> CodeBase:
>

file:///c:/windows/assembly/gac/system/1.0.3300.0__b77a5c561934e089/system.dll
> ----------------------------------------
> System.Drawing
> Assembly Version: 1.0.3300.0
> Win32 Version: 1.0.3705.288
> CodeBase:
>

file:///c:/windows/assembly/gac/system.drawing/1.0.3300.0__b03f5f7f11d50a3a/system.drawing.dll
> ----------------------------------------
> System.Xml
> Assembly Version: 1.0.3300.0
> Win32 Version: 1.0.3705.288
> CodeBase:
>

file:///c:/windows/assembly/gac/system.xml/1.0.3300.0__b77a5c561934e089/system.xml.dll
> ----------------------------------------
>
> ************** JIT Debugging **************
> To enable just in time (JIT) debugging, the config file for this
> application or machine (machine.config) must have the
> jitDebugging value set in the system.windows.forms section.
> The application must also be compiled with debugging
> enabled.
>
> For example:
>
> <configuration>
> <system.windows.forms jitDebugging="true" />
> </configuration>
>
> When JIT debugging is enabled, any unhandled exception
> will be sent to the JIT debugger registered on the machine
> rather than being handled by this dialog.
>
>



 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      31st Mar 2004
* "MadCrazyNewbie" <(E-Mail Removed)> scripsit:
> Im Using Application.Close in my code to end my App, it works ok if i use it
> in the IDE.


What's 'Application.Close'?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
 
Reply With Quote
 
MadCrazyNewbie
Guest
Posts: n/a
 
      31st Mar 2004
Sorry I made a typo, i am actually using Application.Exit

Ta
MCN

"Bernie Yaeger" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi
>
> Use application.exit.
>
> Bernie
> "MadCrazyNewbie" <(E-Mail Removed)> wrote in message
> news:kaicna-(E-Mail Removed)...
> > Hey group,
> >
> > Im trying to close a app (This is on a different machine to where it was
> > compiled) but when i click on my Close button. I get the following
> > exception:
> >
> > Im Using Application.Close in my code to end my App, it works ok if i

use
> it
> > in the IDE.
> >
> > Ta
> > MCN
> >
> > ************** Exception Text **************
> > System.Security.SecurityException: Request for the permission of type
> > System.Security.Permissions.SecurityPermission, mscorlib,
> > Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

> failed.
> > at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet
> > grantedSet, PermissionSet deniedSet, CodeAccessPermission demand,
> > PermissionToken permToken)
> > at System.Security.CodeAccessSecurityEngine.Check(PermissionToken
> > permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32
> > checkFrames, Int32 unrestrictedOverride)
> > at

System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission
> > cap, StackCrawlMark& stackMark)
> > at System.Security.CodeAccessPermission.Demand()
> > at System.Windows.Forms.Application.Exit()
> > at RixIPSite.frmMainMenu.btnExit_Click(Object sender, EventArgs e) in
> > D:\Live Projects\RixIPSite\MainMenu.vb:line 433
> > at System.Windows.Forms.Control.OnClick(EventArgs e)
> > at System.Windows.Forms.Button.OnClick(EventArgs e)
> > at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
> > at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
> > button, Int32 clicks)
> > at System.Windows.Forms.Control.WndProc(Message& m)
> > at System.Windows.Forms.ButtonBase.WndProc(Message& m)
> > at System.Windows.Forms.Button.WndProc(Message& m)
> > at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
> > at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
> > at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
> > IntPtr wparam, IntPtr lparam)
> >
> >
> > ************** Loaded Assemblies **************
> > mscorlib
> > Assembly Version: 1.0.3300.0
> > Win32 Version: 1.0.3705.288
> > CodeBase:
> > file:///c:/windows/microsoft.net/framework/v1.0.3705/mscorlib.dll
> > ----------------------------------------
> > RixIPSite
> > Assembly Version: 1.0.1551.16627
> > Win32 Version: 1.0.1551.16627
> > CodeBase: file://appsrv/Apps/Rix%20Applications/RixIPSite%20V1.0.exe
> > ----------------------------------------
> > System.Windows.Forms
> > Assembly Version: 1.0.3300.0
> > Win32 Version: 1.0.3705.288
> > CodeBase:
> >

>

file:///c:/windows/assembly/gac/system.windows.forms/1.0.3300.0__b77a5c561934e089/system.windows.forms.dll
> > ----------------------------------------
> > System
> > Assembly Version: 1.0.3300.0
> > Win32 Version: 1.0.3705.288
> > CodeBase:
> >

>

file:///c:/windows/assembly/gac/system/1.0.3300.0__b77a5c561934e089/system.dll
> > ----------------------------------------
> > System.Drawing
> > Assembly Version: 1.0.3300.0
> > Win32 Version: 1.0.3705.288
> > CodeBase:
> >

>

file:///c:/windows/assembly/gac/system.drawing/1.0.3300.0__b03f5f7f11d50a3a/system.drawing.dll
> > ----------------------------------------
> > System.Xml
> > Assembly Version: 1.0.3300.0
> > Win32 Version: 1.0.3705.288
> > CodeBase:
> >

>

file:///c:/windows/assembly/gac/system.xml/1.0.3300.0__b77a5c561934e089/system.xml.dll
> > ----------------------------------------
> >
> > ************** JIT Debugging **************
> > To enable just in time (JIT) debugging, the config file for this
> > application or machine (machine.config) must have the
> > jitDebugging value set in the system.windows.forms section.
> > The application must also be compiled with debugging
> > enabled.
> >
> > For example:
> >
> > <configuration>
> > <system.windows.forms jitDebugging="true" />
> > </configuration>
> >
> > When JIT debugging is enabled, any unhandled exception
> > will be sent to the JIT debugger registered on the machine
> > rather than being handled by this dialog.
> >
> >

>
>



 
Reply With Quote
 
Bill McCarthy
Guest
Posts: n/a
 
      31st Mar 2004
Hi MCN,

Looks like a security permission exception I would check that your app is
running with full trust on the client machine.

Also, you may wish to instead of use Application.Exit, just close the actual
root form, and the app will exit.

Bill


"MadCrazyNewbie" <(E-Mail Removed)> wrote in message
news:kaicna-(E-Mail Removed)...
> Hey group,
>
> Im trying to close a app (This is on a different machine to where it was
> compiled) but when i click on my Close button. I get the following
> exception:
>
> Im Using Application.Close in my code to end my App, it works ok if i use it
> in the IDE.
>
> Ta
> MCN
>
> ************** Exception Text **************
> System.Security.SecurityException: Request for the permission of type
> System.Security.Permissions.SecurityPermission, mscorlib,
> Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
> at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet
> grantedSet, PermissionSet deniedSet, CodeAccessPermission demand,
> PermissionToken permToken)
> at System.Security.CodeAccessSecurityEngine.Check(PermissionToken
> permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32
> checkFrames, Int32 unrestrictedOverride)
> at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission
> cap, StackCrawlMark& stackMark)
> at System.Security.CodeAccessPermission.Demand()
> at System.Windows.Forms.Application.Exit()
> at RixIPSite.frmMainMenu.btnExit_Click(Object sender, EventArgs e) in
> D:\Live Projects\RixIPSite\MainMenu.vb:line 433
> at System.Windows.Forms.Control.OnClick(EventArgs e)
> at System.Windows.Forms.Button.OnClick(EventArgs e)
> at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
> at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
> button, Int32 clicks)
> at System.Windows.Forms.Control.WndProc(Message& m)
> at System.Windows.Forms.ButtonBase.WndProc(Message& m)
> at System.Windows.Forms.Button.WndProc(Message& m)
> at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
> at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
> at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
> IntPtr wparam, IntPtr lparam)
>
>
> ************** Loaded Assemblies **************
> mscorlib
> Assembly Version: 1.0.3300.0
> Win32 Version: 1.0.3705.288
> CodeBase:
> file:///c:/windows/microsoft.net/framework/v1.0.3705/mscorlib.dll
> ----------------------------------------
> RixIPSite
> Assembly Version: 1.0.1551.16627
> Win32 Version: 1.0.1551.16627
> CodeBase: file://appsrv/Apps/Rix%20Applications/RixIPSite%20V1.0.exe
> ----------------------------------------
> System.Windows.Forms
> Assembly Version: 1.0.3300.0
> Win32 Version: 1.0.3705.288
> CodeBase:
>

file:///c:/windows/assembly/gac/system.windows.forms/1.0.3300.0__b77a5c561934e089/system.windows.forms.dll
> ----------------------------------------
> System
> Assembly Version: 1.0.3300.0
> Win32 Version: 1.0.3705.288
> CodeBase:
> file:///c:/windows/assembly/gac/system/1.0.3300.0__b77a5c561934e089/system.dll
> ----------------------------------------
> System.Drawing
> Assembly Version: 1.0.3300.0
> Win32 Version: 1.0.3705.288
> CodeBase:
>

file:///c:/windows/assembly/gac/system.drawing/1.0.3300.0__b03f5f7f11d50a3a/system.drawing.dll
> ----------------------------------------
> System.Xml
> Assembly Version: 1.0.3300.0
> Win32 Version: 1.0.3705.288
> CodeBase:
>

file:///c:/windows/assembly/gac/system.xml/1.0.3300.0__b77a5c561934e089/system.xml.dll
> ----------------------------------------
>
> ************** JIT Debugging **************
> To enable just in time (JIT) debugging, the config file for this
> application or machine (machine.config) must have the
> jitDebugging value set in the system.windows.forms section.
> The application must also be compiled with debugging
> enabled.
>
> For example:
>
> <configuration>
> <system.windows.forms jitDebugging="true" />
> </configuration>
>
> When JIT debugging is enabled, any unhandled exception
> will be sent to the JIT debugger registered on the machine
> rather than being handled by this dialog.
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Mail keeps closing because DEP is closing for security =?Utf-8?B?V2luZG93IE1haWwgREVQIG1lc3NhZ2U=?= Windows Vista Mail 8 17th Jun 2009 08:56 PM
Why is my Outlook closing when I am simply closing a mail message WendyG Microsoft Outlook Discussion 1 9th Dec 2008 03:14 AM
Closing a Doc versus Closing the Program in Word 2007 =?Utf-8?B?RGVsbGE=?= Microsoft Word Document Management 4 6th Jun 2007 04:16 PM
closing subfolder after closing parental folder causes crash Jim Windows XP General 0 29th Mar 2006 01:47 AM
Multiple OutputTo (Called on Closing Form) Fails on Closing Database John Andrews Microsoft Access Macros 3 21st May 2004 08:54 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:39 PM.