Re: Error executing .NET app from a network folder
From: Bill Nguyen (billn_at_jaco.com)
Date: 08/25/03
- Next message: Bill Nguyen: "Re: Error executing .NET app from a network folder"
- Previous message: Ivan Medvedev [MS]: "Re: MD5CryptoServiceProvider.ComputeHash throws CryptographicException"
- In reply to: Michel Gallant: "Re: Error executing .NET app from a network folder"
- Next in thread: Bill Nguyen: "Re: Error executing .NET app from a network folder"
- Reply: Bill Nguyen: "Re: Error executing .NET app from a network folder"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 25 Aug 2003 13:47:43 -0700
Michel;
I went thru the steps in your walk thru to create a strong key
"strongpair.snk" in my development machine. I also added a child code
"StrongNameDev" using .NET framework 1.1 config tool in the development
machine.
Then I copy the whole application folder (including the subfolder "bin" to a
network folder (In tranet folder). When I tried to run the .EXE file in the
netowork folder from either the development machine or the host server
(where the netork folder was created), I got the following error message:
Application has generated an exception that could not be handled.
Process id=0x960 (2400), Thread id=0xe9c (3740)
Click OK to terminate the application
Click Cancel to debug the application
I went on and created the same child code group on the host server and ran
the EXE file again but the results were just the same.
Am I missing anything ?
Thanks a million.
Bill
"Michel Gallant" <neutron@istar.ca> wrote in message
news:%23Bvbv$0YDHA.2032@TK2MSFTNGP10.phx.gbl...
> This is the only recommended safe way to deploy a network-shared .net
> assembly that needs extra permissions for execution on clients. Don't
> forget CAS is all about protecting users from mobile, potentially
> hostile code, and removing the "on the fly" trust decision from the
> end user to a trusted administrator who, presumably understands the
> issues/risks with code-group policy configuration.
>
> For deployment to several clients simultaneously, the .NET Framework
> Configuration tool allows you to deploy an msi, which is a copy of the
> local policy file (under "Runtime Security Policy" and "Creat Deployment
Package").
>
> - Mitch
>
> "Bill Nguyen" <billn@jaco.com> wrote in message
news:OHw$vNuYDHA.1900@TK2MSFTNGP10.phx.gbl...
> > Michel;
> > Is there another way to run the application from a network share without
> > having to configure the group code on every machine that will access the
> > program??
> > Thanks
> > Bill
> >
> > "Michel Gallant" <neutron@istar.ca> wrote in message
> > news:OMAubpEXDHA.1580@tk2msftngp13.phx.gbl...
> > > The keys are generated, and strong-name signing is performed
> > > on the dev. machine. The custom code group must be configured
> > > on every machine that accesses and executes the assembly via
> > > the network share protocol.
> > >
> > > - Mitch
> > >
> > > "Bill Nguyen" <billn@jaco.com> wrote in message
> > news:OmsrafEXDHA.2444@tk2msftngp13.phx.gbl...
> > > > Thanks Michel;
> > > > Quick question:
> > > > Where should I create all these strong name/Key/ code group? In the
> > machine
> > > > I use for application development or in the server where the
application
> > > > folder resides?
> > > > Thanks again.
> > > > Bill
> > > >
> > > >
> > > > "Michel Gallant" <neutron@istar.ca> wrote in message
> > > > news:el6uYn8WDHA.3232@tk2msftngp13.phx.gbl...
> > > > > The safest way to enable permissions for your code deployed from a
> > network
> > > > > share is to configure a child code-group, strong-name sign your
> > assembly,
> > > > and
> > > > > grant your required permission set based on your strong-name
> > membership
> > > > > condition.
> > > > > Here is a walkthrough:
> > > > > http://www3.sympatico.ca/mitchg/dotnet/networkshare.html
> > > > >
> > > > > - Michel Gallant
> > > > > MVP Security
> > > > >
> > > > > "Bill Nguyen" <billn@jaco.com> wrote in message
> > > > news:%23NX0kf8WDHA.1872@TK2MSFTNGP12.phx.gbl...
> > > > > > Please show me the steps to get to run the app from a network
folder
> > > > > > (Intranet).
> > > > > >
> > > > > > I copied the app from my local drive and get the following error
> > when
> > > > trying
> > > > > > to execute it.
> > > > > > Thanks a million.
> > > > > > Bill
> > > > > >
> > > > > >
> > > > > > .....
> > > > > > The application attempted to perform an operation not allowed by
the
> > > > > > security policy....
> > > > > >
> > > > > >
> > > > > > ************** Exception Text **************
> > > > > > System.Security.SecurityException: Request for the permission of
> > type
> > > > > > System.Security.Permissions.SecurityPermission, mscorlib,
> > > > > > Version=1.0.5000.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 WindowsApplication5.BOL.btnQuit_Click(Object sender,
EventArgs
> > e)
> > > > in
> > > > > > C:\Documents and Settings\billn\My Documents\Visual Studio
> > > > Projects\VBNET\My
> > > > > > Stuff\WindowsApplication5\BOL.vb:line 274
> > > > > > 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.5000.0
> > > > > > Win32 Version: 1.1.4322.573
> > > > > > CodeBase:
> > > > > >
file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
> > > > > > ----------------------------------------
> > > > > > System
> > > > > > Assembly Version: 1.0.5000.0
> > > > > > Win32 Version: 1.1.4322.573
> > > > > > CodeBase:
> > > > > >
> > > >
> >
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.d
> > > > > > ll
> > > > > > ----------------------------------------
> > > > > > System.Drawing
> > > > > > Assembly Version: 1.0.5000.0
> > > > > > Win32 Version: 1.1.4322.573
> > > > > > CodeBase:
> > > > > >
> > > >
> >
file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/
> > > > > > system.drawing.dll
> > > > > > ----------------------------------------
> > > > > > WindowsApplication5
> > > > > > Assembly Version: 1.0.1312.24133
> > > > > > Win32 Version: 1.0.1312.24133
> > > > > > CodeBase:
> > file:///N:/GS/DotNet/IF_BOL/bin/WindowsApplication5.exe
> > > > > > ----------------------------------------
> > > > > > System.Windows.Forms
> > > > > > Assembly Version: 1.0.5000.0
> > > > > > Win32 Version: 1.1.4322.573
> > > > > > CodeBase:
> > > > > >
> > > >
> >
file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c56193
> > > > > > 4e089/system.windows.forms.dll
> > > > > > ----------------------------------------
> > > > > > Microsoft.VisualBasic
> > > > > > Assembly Version: 7.0.5000.0
> > > > > > Win32 Version: 7.10.3052.4
> > > > > > CodeBase:
> > > > > >
> > > >
> >
file:///c:/windows/assembly/gac/microsoft.visualbasic/7.0.5000.0__b03f5f7f11
> > > > > > d50a3a/microsoft.visualbasic.dll
> > > > > > ----------------------------------------
> > > > > > System.Xml
> > > > > > Assembly Version: 1.0.5000.0
> > > > > > Win32 Version: 1.1.4322.573
> > > > > > CodeBase:
> > > > > >
> > > >
> >
file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/syst
> > > > > > em.xml.dll
> > > > > > ----------------------------------------
> > > > > > System.Data
> > > > > > Assembly Version: 1.0.5000.0
> > > > > > Win32 Version: 1.1.4322.573
> > > > > > CodeBase:
> > > > > >
> > > >
> >
file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/sys
> > > > > > tem.data.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.
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
- Next message: Bill Nguyen: "Re: Error executing .NET app from a network folder"
- Previous message: Ivan Medvedev [MS]: "Re: MD5CryptoServiceProvider.ComputeHash throws CryptographicException"
- In reply to: Michel Gallant: "Re: Error executing .NET app from a network folder"
- Next in thread: Bill Nguyen: "Re: Error executing .NET app from a network folder"
- Reply: Bill Nguyen: "Re: Error executing .NET app from a network folder"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]