Running Windows Forms App From Network Share

J

Jeremy S.

We're in the process of writing a new Windows Forms app and the desktop
support folks want for it to be run from a network share. I know it's
possible (i.e., just have the framework on the clients and a desktop
shortcut to the exe out on the network)... but is it really a good idea?

What are some arguments for and against running a .NET Windows Forms client
from a network share? Here is my initial list... I'd appreciate any
additions, corrections, perspective, or opinions:

FOR (running app from network share):
--- smaller footprint on the client (only need a shortcut); no need to have
an application folder.
--- easy deployment - just update the copy on the share (of course this
point is mitigated by ClickOnce or similar home grown updator logic)

AGAINST (running app from network share):
--- slower initial application startup time (as the exe and all supporting
..dll files must travel across the wire to the client before everything can
get started)
--- fewer .config options because App.config won't be there (i.e., won't be
able to make use of Trace Switches on a client-by-client basis, etc).
--- fewer options for logging information locally [in an expected location,
at least] because there will be no application folder in which to write
various local log files.
--- cannot make use of the GAC on clients, and therefore cannot share
components (.NET dlls) amongst apps on the client.

Any additional important points?

Thanks!
 
L

Ludwig

We're in the process of writing a new Windows Forms app and the desktop
support folks want for it to be run from a network share. I know it's
possible (i.e., just have the framework on the clients and a desktop
shortcut to the exe out on the network)... but is it really a good idea?

What are some arguments for and against running a .NET Windows Forms client
from a network share? Here is my initial list... I'd appreciate any
additions, corrections, perspective, or opinions:

FOR (running app from network share):
--- smaller footprint on the client (only need a shortcut); no need to have
an application folder.
--- easy deployment - just update the copy on the share (of course this
point is mitigated by ClickOnce or similar home grown updator logic)

AGAINST (running app from network share):
--- slower initial application startup time (as the exe and all supporting
.dll files must travel across the wire to the client before everything can
get started)
--- fewer .config options because App.config won't be there (i.e., won't be
able to make use of Trace Switches on a client-by-client basis, etc).
--- fewer options for logging information locally [in an expected location,
at least] because there will be no application folder in which to write
various local log files.
--- cannot make use of the GAC on clients, and therefore cannot share
components (.NET dlls) amongst apps on the client.

Any additional important points?

Thanks!

What about security? A program that is started from a share is not
trusted, right?
 
S

SP

Jeremy S. said:
We're in the process of writing a new Windows Forms app and the desktop
support folks want for it to be run from a network share. I know it's
possible (i.e., just have the framework on the clients and a desktop
shortcut to the exe out on the network)... but is it really a good idea?

What are some arguments for and against running a .NET Windows Forms
client from a network share? Here is my initial list... I'd appreciate any
additions, corrections, perspective, or opinions:
FOR (running app from network share):
--- smaller footprint on the client (only need a shortcut); no need to
have an application folder.
--- easy deployment - just update the copy on the share (of course this
point is mitigated by ClickOnce or similar home grown updator logic)

I have a "home grown" updater assembly. It creates an XML file based on the
files contained in the distribution folder and then performs a comparison
and transfers new files to the local drive. Occasionally issues arise where
files are locked or are in some inconsistent state (transferred over a WAN
and are corrupted) and the user needs to delete their local folder. Perhaps
you can have similar issues with Click Once? Personally I felt I was playing
with potential installation / deployment problems with Click Once and it
seemed like overkill but others hopefully will share their experiences.
Also, figuring out how to obfuscate the assemblies as part of the Click Once
procedure seemed to require some investment of time that I was not willing
to make at the time.

If the application creates files that need to be accessible in a common
place then you can use the path of the executable as a reference point to
the network. This can also be a bad thing if there are folders that could be
accessed by other users to see sensitive information. (As a side note if you
start an "updater" executable from the network that then spawns the locally
based executable you can get to both the network location and the local
folder location programatically).

You can tell if users are using the software quite easily by using file lock
information. This can be handy in some cases.

You can easily take the application offline with an entry in the app.config
that prevents users from starting and remaining in the software.
AGAINST (running app from network share):
--- slower initial application startup time (as the exe and all supporting
.dll files must travel across the wire to the client before everything can
get started)
--- fewer .config options because App.config won't be there (i.e., won't
be able to make use of Trace Switches on a client-by-client basis, etc).
--- fewer options for logging information locally [in an expected
location, at least] because there will be no application folder in which
to write various local log files.
--- cannot make use of the GAC on clients, and therefore cannot share
components (.NET dlls) amongst apps on the client.

If it is a WAN based application then the startup time can be totally
unacceptable.

Users can remain in the software and prevent updates so you need to have a
mechanism to deal with this.

Security needs to be adjusted for the "Local Intranet" zone to execute off
the server (although a home grown updater would also require this as it
would be on the network as well).

I have software deployed both ways and even customers that use it both ways
(LAN from network, WAN from updater). I would say network for small user
base and local deployment for large user base. Just be sure that your
deployment model is rock solid, i.e. when testing do things like interrupt
the deployment, power off the computer, delete files, log on as a different
user etc to make sure that the deployment always works correctly.

SP
 
P

Phil Wilson

Why are the desktop support folks asking you to do this? It seems to me that
if they're not just exercising their authority they probably see some
perceived benefit, so then you could evaluiate whether this benefit is real.
 
J

Jeremy S.

Thanks Phil,

RE:
<< so then you could evaluiate whether this benefit is real>>

Agreed. And that's what I will be doing later this week when I meet with
them. I came to this group with the OP as part of my efforts to better
understand both sides of the issue (run from network share vs local machine)
prior to entering the discussion with them. AFAIK they want to run from the
share to minimize the footprint on the client. That said, they are
apparently unfamiliar with the fact that .NET apps don't have to touch the
Registry.... so a bit of education may be in order. So whatever I can bring
in that respect will likely be helpful. So far they have responded well to
reason (it's a new client for me).

-J



Phil Wilson said:
Why are the desktop support folks asking you to do this? It seems to me
that if they're not just exercising their authority they probably see some
perceived benefit, so then you could evaluiate whether this benefit is
real.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

Jeremy S. said:
We're in the process of writing a new Windows Forms app and the desktop
support folks want for it to be run from a network share. I know it's
possible (i.e., just have the framework on the clients and a desktop
shortcut to the exe out on the network)... but is it really a good idea?

What are some arguments for and against running a .NET Windows Forms
client from a network share? Here is my initial list... I'd appreciate
any additions, corrections, perspective, or opinions:

FOR (running app from network share):
--- smaller footprint on the client (only need a shortcut); no need to
have an application folder.
--- easy deployment - just update the copy on the share (of course this
point is mitigated by ClickOnce or similar home grown updator logic)

AGAINST (running app from network share):
--- slower initial application startup time (as the exe and all
supporting .dll files must travel across the wire to the client before
everything can get started)
--- fewer .config options because App.config won't be there (i.e., won't
be able to make use of Trace Switches on a client-by-client basis, etc).
--- fewer options for logging information locally [in an expected
location, at least] because there will be no application folder in which
to write various local log files.
--- cannot make use of the GAC on clients, and therefore cannot share
components (.NET dlls) amongst apps on the client.

Any additional important points?

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top