[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

vb.net application program will not launch remotely

Posted on 2011-10-11
11
Medium Priority
?
401 Views
Last Modified: 2012-05-12
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.
0
Comment
Question by:StoneCutter3
  • 4
  • 4
  • 3
11 Comments
 
LVL 6

Expert Comment

by:Molly Fagan
ID: 36949358
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
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 36949459
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
 

Author Comment

by:StoneCutter3
ID: 36952441
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 83

Expert Comment

by:CodeCruiser
ID: 36952457
>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
 
LVL 6

Expert Comment

by:Molly Fagan
ID: 36952560
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
 

Author Comment

by:StoneCutter3
ID: 36956015
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
 
LVL 6

Accepted Solution

by:
Molly Fagan earned 2000 total points
ID: 36956487
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
 

Author Closing Comment

by:StoneCutter3
ID: 37103707
Thanks for the help.  Sorry for the long delay in repsonding.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 37109586
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
 
LVL 6

Expert Comment

by:Molly Fagan
ID: 37109889
Perhaps he was factoring in the rest of my comment--about using Caspol.exe for .NET 2.0?  :-)
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 37109905
Which you had linked in your first comment so that should be selected if this was the case.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question