|
-
Mar 2nd, 2006, 07:59 AM
#1
Thread Starter
Member
[RESOLVED] Installing vb.Net App on a Network Drive
Right I'ver finally finished my first app with a deployment package (using Visual Studio.Net 2003 and Crystal Reports) and it works fine as long as the app is installed on individual clients C drives.
I have taken a copy of the bin folder and copied it to a network drive and created a shortcut to the .exe
The application opens fine from the newtork but when I try to execute any code i get the following error message
************** Exception Text **************
System.Security.SecurityException: Security error.
at River_Reporting.Form1.LoadReport(String strReportName)
at River_Reporting.Form1.mnuContacts_Click(Object sender, EventArgs e)
at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
at System.Windows.Forms.MenuItemData.Execute()
at System.Windows.Forms.Command.Invoke()
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.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.929
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.947
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
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
----------------------------------------
River Reporting
Assembly Version: 1.0.2251.31225
Win32 Version: 1.0.2251.31225
CodeBase: file:///H:/Chesher/bin/River%20Reporting.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__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
CrystalDecisions.Windows.Forms
Assembly Version: 10.0.3300.0
Win32 Version: 10.0.9500.30
CodeBase: file:///c:/windows/assembly/gac/crystaldecisions.windows.forms/10.0.3300.0__692fbea5521e1304/crystaldecisions.windows.forms.dll
----------------------------------------
CrystalDecisions.Shared
Assembly Version: 10.0.3300.0
Win32 Version: 10.0.9500.31
CodeBase: file:///c:/windows/assembly/gac/crystaldecisions.shared/10.0.3300.0__692fbea5521e1304/crystaldecisions.shared.dll
----------------------------------------
CrystalDecisions.ReportSource
Assembly Version: 10.0.3300.0
Win32 Version: 10.0.9500.19
CodeBase: file:///c:/windows/assembly/gac/crystaldecisions.reportsource/10.0.3300.0__692fbea5521e1304/crystaldecisions.reportsource.dll
----------------------------------------
System.Web
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.947
CodeBase: file:///c:/windows/assembly/gac/system.web/1.0.5000.0__b03f5f7f11d50a3a/system.web.dll
----------------------------------------
CrystalDecisions.CrystalReports.Engine
Assembly Version: 10.0.3300.0
Win32 Version: 10.0.9500.30
CodeBase: file:///c:/windows/assembly/gac/crystaldecisions.crystalreports.engine/10.0.3300.0__692fbea5521e1304/crystaldecisions.crystalreports.engine.dll
----------------------------------------
Can anyone help me get round this issue as the app really needs to run on the network.
All clients will have the .Net framework installed.
Thanks
-
Mar 2nd, 2006, 08:14 AM
#2
Re: Installing vb.Net App on a Network Drive
this is definitely a security related issue. When you try to execute any assembly that is on a network, the default security settings will be that .NET Framework will not allow it to access the local system resources.
You will have to use CASPOL tool from the .NET Command Prompt to give your assembly full trust.
Also take a look at this similar thread Check the post #4.
Use [code] source code here[/code] tags when you post source code.
My Articles
-
Mar 2nd, 2006, 08:46 AM
#3
Thread Starter
Member
Re: Installing vb.Net App on a Network Drive
Thanks.
I have read that but I'm really not understanding it .
You couldn't explain in plain english could you
-
Mar 2nd, 2006, 08:55 AM
#4
Re: Installing vb.Net App on a Network Drive
I don't know plain english so couldn't write it in plain english. 
Anyways, follow these steps on the workstations where you want the application to run:
Open Control Panel.
Open Administrative Tools.
Double Click Microsoft .NET Framework 1.1 Wizards
In the resulting dialog box, click on Trust an Assembly
In the next Dialog, Select "Make Changes to this Computer" and press Next.
Select the Assembly in the Next Dialog and press Next.
In the next screen, select Full Trust and press Next.
Click Finish and you are ready to use your assembly.
Now some of my suggestions.
There is nothing wrong in trying out stuff yourself. It makes life easier in the long run. You could always refer MSDN and check how to use the CASPOL tool.
I tried my best to write it in Plain English, but if you think it is still not plain enough then blame Microsoft and Americans for teaching me not so plain english. 
Edit--
I forgot to mention that Assembly is the EXE file that you are trying to execute.
Last edited by Shuja Ali; Mar 2nd, 2006 at 09:00 AM.
Use [code] source code here[/code] tags when you post source code.
My Articles
-
Mar 2nd, 2006, 08:59 AM
#5
Thread Starter
Member
Re: Installing vb.Net App on a Network Drive
Thanks.
Is there anyway to do this from within my app as some of the users are in t he UK and some are in the US and I don't think work will pay the airfare
-
Mar 2nd, 2006, 09:04 AM
#6
Re: Installing vb.Net App on a Network Drive
 Originally Posted by Ginster
Thanks.
Is there anyway to do this from within my app as some of the users are in t he UK and some are in the US and I don't think work will pay the airfare 
You can write a document describing how to do it and ask the Users to do it themselves. Afterall it is not so difficult.
The document is already there in place. You just have to copy and paste it.
Use [code] source code here[/code] tags when you post source code.
My Articles
-
Mar 2nd, 2006, 09:05 AM
#7
Thread Starter
Member
Re: Installing vb.Net App on a Network Drive
Good Idea a ReadMe.txt file on the way me thinks
Thanks Again.
-
Mar 2nd, 2006, 10:19 AM
#8
Re: [RESOLVED] Installing vb.Net App on a Network Drive
I personally use INNO setup as the installer for my .NET apps. I have it run caspol.exe, which is the .NET utility for setting permissions (and part of the .net framework). I have it give my app full trust wherever its installed (network or local) so that the security issue of network drives never pops up
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|