Deployment Question

M

MadCrazyNewbie

Hey group,

Could somebody possibly help? I know i`ve asked this before but ended up
getting so confused.

If I take my .exe from my bin directory and move it to another PC, i keep
getting loads of security exceptions.(See Below)

Anybody got a simple how to on builing a deployment package or script to
sort this.

Many Thanks
MCN

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** 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.CheckTokenBasedSetHelper(Boolean
ignoreGrants, TokenBasedSet grants, TokenBasedSet denied, TokenBasedSet
demands)
at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet
grants, PermissionSet denied, PermissionSet demands)
at System.AppDomain.SetPrincipalPolicy(PrincipalPolicy policy)
at Excellence.NET.Users.IsAdministrator() in D:\Live
Projects\Excellence.Net\Users.vb:line 68
at Excellence.NET.frmLogin.btnOK_Click(Object sender, EventArgs e) in
D:\Live Projects\Excellence.Net\Login.vb:line 183
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
----------------------------------------
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
----------------------------------------
Excellence.NET
Assembly Version: 1.0.1566.19725
Win32 Version: 1.0.1566.19725
CodeBase: file:///L:/Excellence.NET.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.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
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 7.0.3300.0
Win32 Version: 7.00.9502
CodeBase:
file:///c:/windows/assembly/gac/microsoft.visualbasic/7.0.3300.0__b03f5f7f11d50a3a/microsoft.visualbasic.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.
 
D

DraguVaso

Add a new project to your solution: instead of choosing a "Visual Basic
Project" chose a "Setup and deployment project" and use there the "Setup
wizard".
You can find more info when you search for "Setup Project" in the Help of
Visual Studio.

Hope this is enough info?

Another thing I use with my setups is the dotNetInstaller: It makes sure
that the framework and other dependencies are installed. Really usefull!
You can find it on:
http://www.devage.com/dotNetInstaller/dotNetInstaller.html

Pieter
 
H

Herfried K. Wagner [MVP]

* "MadCrazyNewbie said:
Could somebody possibly help? I know i`ve asked this before but ended up
getting so confused.

If I take my .exe from my bin directory and move it to another PC, i keep
getting loads of security exceptions.(See Below)

Anybody got a simple how to on builing a deployment package or script to
sort this.

Is the application installed to a network drive?
 
M

MadCrazyNewbie

Herfried K,

Yes My application is running from a shared Network Drive, to about 4 users.

Ya
MCN
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top