vb.net application program will not launch remotely

I have a vb.net application.  It resides on our Windows 2008 Server R2.  I have created a shortcut to this executable on each of our desktop computers (approximately 20) connected to the server.  These desktops are running Windows XP, Windows Vista, and Windows 7.  On each of the desktops I had to be sure that .net Framework 3.5 was installed.  It's possible that I had made another setting (a local group policy entry?) but I don't have any notes on doing this, only a vague recollection.  All the desktop computers are working without a problem.  This past week I set up another computer (Windows XP) with the shortcut, loaded on .net Framework 3.5 and I get the following error.

vvvvvvvvvvvvvvvvvvvvvvvBeginning of Error Messagevvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
   at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
   at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
   at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction action, Boolean throwException)
   at System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs, PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Assembly asm, SecurityAction action)
   at BDP_Applications.BDP_Main_Form.BDP_Main_Form_Load(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(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.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
The action that failed was:
LinkDemand
The type of the first permission that failed was:
System.Security.Permissions.SecurityPermission
The Zone of the assembly that failed was:
Intranet


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
BDP Applications
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file://Bdp-server/Open%20Share/Brittany%20Operations/Programs/BDP%20Applications.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (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 computer
rather than be handled by this dialog box.

^^^^^^^^^^^^^^^^^^^^^^^^^^End of Error Message^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I've looked a all the postings when I google the "PublicKeyToken=b77a5c561934e089" part of the message.  None of the solutions look like anything I had done with all the other computers with the exeception of some references to local group policy entries.

Any thoughts?

Thanks.
StoneCutter3Asked:
Who is Participating?
 
Molly FaganConnect With a Mentor Applications Team SupervisorCommented:
Go and look at the links the other guy put.  I've never had to do that myself for .NET Framework 3.5 and higher but for those computers, they already had the .NET Framework 2.0 installed and I had used Caspol.exe at the command line to give full trust.
0
 
Molly FaganApplications Team SupervisorCommented:
You have to give the app FullTrust to run on a network share.  Check out these links.

http://www.experts-exchange.com/Programming/Languages/.NET/Q_23011290.html

http://www.vbforums.com/showthread.php?t=640628
0
 
CodeCruiserCommented:
Download the .NET configuration tool from here

http://www.technowise.in/2009/03/net-framework-20-configuration-tool.html

Set the Intranet zone trust level

http://msdn.microsoft.com/en-us/library/2bc0cxhc.aspx
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
StoneCutter3Author Commented:
Thanks for the responses.

I don't think the problem is related to mscorcfg.msc because that program does not exist on the desktop computers that are sucessfully running the application (I used Start -> Run -> mscorcfg.msc).

Also, I don't think it's related to caspol.exe that seems to affect the actual executable.  Again, because the executable is running sucessfully.

I don't run off a network share.  My shortcut is directly to my \\Sever\Folder 1\Folder 2\App.exe.

Any other thoughts?

Thanks.
0
 
CodeCruiserCommented:
>I don't run off a network share.  My shortcut is directly to my \\Sever\Folder 1\Folder 2\App.exe.

That looks like a network share to me

>Also, I don't think it's related to caspol.exe that seems to affect the actual executable.  Again, because the executable is running sucessfully.

What's not running then?
0
 
Molly FaganApplications Team SupervisorCommented:
Looks like a network share to me.  When you're running a .NET app on a network share, it's the .NET framework that needs to have the trust changed (I give mine FullTrust).
0
 
StoneCutter3Author Commented:
I'm sorry, you're both right.  I was thinking of a mapped network drive.
Let's focus on the trust setting.  Is this where I have to get mscorcfg.msc and set the trust level on the .NET framework?  I will do this but I don't understand why I didn't have to do this on my other computers, unless there is another what to invoke mscorcfg.msc other than the "Run" command.
Let me know.
Thanks.
0
 
StoneCutter3Author Commented:
Thanks for the help.  Sorry for the long delay in repsonding.
0
 
CodeCruiserCommented:
I am a bit confused on your selection of answer. Is that comment really the solution? The comment says

Go and look at the links the other guy put.  

I've never had to do that myself
0
 
Molly FaganApplications Team SupervisorCommented:
Perhaps he was factoring in the rest of my comment--about using Caspol.exe for .NET 2.0?  :-)
0
 
CodeCruiserCommented:
Which you had linked in your first comment so that should be selected if this was the case.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.