Viscosity crashes when started by Task Scheduler

Got a problem with Viscosity or need help? Ask here!

ap0llo

Posts: 3
Joined: Mon Sep 30, 2013 2:14 am

Post by ap0llo » Mon Dec 09, 2013 4:46 am
Hi,
I'm using Viscosity on a server and need it connect to the vpn on startup even when no user is logged on.
To achive this, I created a Scheduled Task stat starts Viscosity when the server starts (Viscosity is configured to connect to the vpn when the application starts) and selected the option to run the task even when no user is logged on.


Unfortunately Viscosity crashes after being started by the scheduled task and no user is logged on. If a user is logged on everything works as expected.

In the Event Viewer, I found the following entries:
Code: Select all
Application: Viscosity.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidOperationException
Stack:
   at System.Windows.Forms.Form.ShowDialog(System.Windows.Forms.IWin32Window)
   at  .(System.String, System.String, Boolean, System.Object, System.Object, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean)
   at  . ()
   at  . ()
   at  .()
   at  ..ctor()
   at  .()
and
Code: Select all
Faulting application name: Viscosity.exe, version: 1.4.6.1212, time stamp: 0x524a8ccb
Faulting module name: KERNELBASE.dll, version: 6.3.9600.16384, time stamp: 0x5215fa76
Exception code: 0xe0434352
Fault offset: 0x0000000000008384
Faulting process id: 0x450
Faulting application start time: 0x01cef2a5d3aa012e
Faulting application path: C:\Program Files\Viscosity\Viscosity.exe
Faulting module path: C:\Windows\system32\KERNELBASE.dll
Report Id: 621fa508-5e9a-11e3-80fc-00155d0bd207
Faulting package full name: 
Faulting package-relative application ID: 
The server is running Windows Server 2012 R2

Eric

User avatar
Posts: 1146
Joined: Sun Jan 03, 2010 3:27 am

Post by Eric » Mon Dec 09, 2013 12:53 pm
Hi ap0llo,

Unfortunately Viscosity cannot make a connection before a user has logged in. Viscosity is a client application and requires that a user and their desktop be present or it cannot run. Viscosity would need to be completely redesigned to achieve being able to run without a user logged in and I'm afraid this isn't within our feature list at the moment.

Regards,

Eric
Eric Thorpe
Viscosity Developer

Web: http://www.sparklabs.com
Support: http://www.sparklabs.com/support
Twitter: http://twitter.com/sparklabs

ap0llo

Posts: 3
Joined: Mon Sep 30, 2013 2:14 am

Post by ap0llo » Tue Dec 10, 2013 3:38 am
Hi,
thanks for your response. I remember I once had a similar setup using an older version of Windows Server and it worked. I had hoped this wasn't just by accident.

Eric

User avatar
Posts: 1146
Joined: Sun Jan 03, 2010 3:27 am

Post by Eric » Tue Dec 10, 2013 11:12 am
Hi ap0llo,

The only way to have a VPN connected is with a user already logged in. Once a user logs in and a VPN is connected, this VPN Connection will be persistent for all users.

Regards,

Eric
Eric Thorpe
Viscosity Developer

Web: http://www.sparklabs.com
Support: http://www.sparklabs.com/support
Twitter: http://twitter.com/sparklabs
4 posts Page 1 of 1