jasonngteck
Contributor
Contributor

Microsoft .NET Framework "Access is Denied"

I am having trouble getting a component of a ThinApp application working. A bit of background information:

The virtual desktop does not include a native browser.

This is a custom application that basically uses presents two IE Frames within the application.

The application is packaged and linked to IE9 and .NET Framework 3.5.1 packages (Via AppLink)

The application contains a button that opens an external application (ThinApp and Linked via AppLink)

When I click on the button that opens the application, I am getting an "Access is Denied" message from Microsoft .NET Framework.

"Unhandled exception has occurred in a component in your application" Some further error message below.

See the end of this message for details on invoking

just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.ComponentModel.Win32Exception: Access is denied
   at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start(String fileName)
   at Daxti.LinkOne.Launcher.LinkOneLaunchControl.linkOneLaunchButton_Click(Object sender, EventArgs e)
   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.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)
************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
Daxti.LinkOne.Launcher
    Assembly Version: 2.4.0.0
    Win32 Version: n/a
    CodeBase: http://<SERVER>/APPLICATION.Launcher.DLL
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    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.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.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.

I am a bit stuck on a workaround for this. I guess if I cannot get the packages to work nicely together, I might just have to install .NET Framework in the gold image? I am assuming that there are some conflicts between the .NET on the virtual bubble vs. the virtual desktop? Anyone have any ideas?

Thanks!

Reply
0 Kudos
Lakshman
Champion
Champion

What is your deployment OS? XP or Win 7?

Reply
0 Kudos
jasonngteck
Contributor
Contributor

The deployment OS is Windows 7 Enterprise (64bit).

I've attempted staging the application and .NET in XP, Windows 7 32bit and Windows 7 64bit.

Thanks.

Reply
0 Kudos
Lakshman
Champion
Champion

Could you try enabling the below parameters in the package.ini by removing the semicolon (;) at the beginning. Rebuild by executing the build.bat file.  

LoadDotNetFromSystem=Win7 
wow64=0

Reply
0 Kudos
jasonngteck
Contributor
Contributor

Hi There,

I have tried the suggested settings and got the attached error message.

I've also tested the following scenarios:

Just WoW64 - same .net access denied message

Just LoadDotNet - attached error

WoW64 & LoadDotNet - attached error

I have included the .net framework in a new test package also to see if that makes a difference, and it does not seem to help. (vs. AppLink in orginal package)

Thanks.

Reply
0 Kudos
Lakshman
Champion
Champion

Have you removed NET package from Applink before trying those?

Reply
0 Kudos
jasonngteck
Contributor
Contributor

I did leave out the .NET AppLink and still getting the same access is denied message.

This application requires some caspol settings to allow the button on the webpage to open a "linked" application. Without the caspol settings, I am getting the attached error message.

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 failed.
   at Daxti.LinkOne.Launcher.LinkOneLaunchControl.linkOneLaunchButton_Click(Object sender, EventArgs e)
   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.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.PermissionSet
The Zone of the assembly that failed was:
Intranet
************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5448 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5453 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
Daxti.LinkOne.Launcher
    Assembly Version: 2.4.0.0
    Win32 Version: n/a
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5446 (Win7SP1GDR.050727-5400)
    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.5458 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.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.
Reply
0 Kudos
oliAH
Enthusiast
Enthusiast

Have you tried capturing everything into one single package, your app and the external app? Does it run?

Can you try after that to execute this virtual package on a machine with a native IE9 and .NET Framework 3.5.1 installed?

Blog: http://oliah.net >> Twitter: @olivier_ahson
Reply
0 Kudos
jasonngteck
Contributor
Contributor

I've captured the applicaiton in a single package and I am still getting the same error message. I am currently testing this on a machine with .NET 3.5.1 installed but that doesn't seem to make a difference. When packaging it into a single application, I did lauch the application and ensured that it was working prior to postscan. But just doesn't seem to want to work once it is packaged.

Reply
0 Kudos
Lakshman
Champion
Champion

As Windows 7 has .NET 3.5 preinstalled, can you try removing the .NET Applink, enable the two package.ini parameters and check?

Reply
0 Kudos
jasonngteck
Contributor
Contributor

During my testing, I did remove the .NET applink to test the parameters. The staging workstation has .NET 3.5 installed while the base image for the linked clones do not. I have confirmed that package is using either the AppLinked .NET or the one with the desktop outside of the virtual bubble. Both does not seem to work.

Reply
0 Kudos
Lakshman
Champion
Champion

As your deployment OS is Win7 64, can you try packaging the application on Win7 64 without bundling .NET and enabling the two package.ini parameters discussed above?

Reply
0 Kudos
jasonngteck
Contributor
Contributor

I've engaged VMware support and have an open ticket now on this issue. We were able to determine the issue to be cause be an applicaiton rather than the .NET Framework. In short, an AppLink applicaiton is running in the x86 program files folder, but by the nature of ThinApp, it is putting a link to the program files folder as well. When the executable is ran from the program files folder (64bit), it is giving an access denied. When the applicaiton is ran from the x86 program files folder, it launches. Due to the nature of our custom application, we are looking at options to ensure that we run the x86 command instead.

Reply
0 Kudos