.NET app on a shared directory.

L

Lloyd Dupont

I have written a .NET application which does heavy use of interop (through
ManagedC++).
It works allright.
Now someone askedme if it works when installed in a shared directory.
So I'm testing, installed the application on a remote computer, in a shared
folder and trying to run it from this remote folder.

I have SecurityException all over the places, which doesn't surprise me.
But how do I fix them?

Also I have a problem with licencing. Currently I write something in the
registry.
But I need some kind of network licensing in such case.
But Windows networking is a kind of mystery to me.. What could I do?
I also know that some people might suggest active directory, but it's an
optional component, is it not?

--
Regards,
Lloyd Dupont

NovaMind development team
NovaMind Software
Mind Mapping Software
<www.nova-mind.com>
 
N

Nicole Calinoiu

Lloyd Dupont said:
I have written a .NET application which does heavy use of interop (through
ManagedC++).
It works allright.
Now someone askedme if it works when installed in a shared directory.
So I'm testing, installed the application on a remote computer, in a
shared folder and trying to run it from this remote folder.

I have SecurityException all over the places, which doesn't surprise me.
But how do I fix them?

You'll need to grant additional CAS permissions to your application on the
client machines on which it will run. If you're using fx 2.0, then
deploying as a ClickOnce application is generally the simplest solution for
this. Otherwise, you'll need to modify the CAS policy on the client
machines, which can be done via network deployment tools. Your network
administrators may already have something in place for this; if not,
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/entsecpoladmin.asp
is a good place to start looking into your options.

Before granting additional permissions to your application, you'll also need
to figure out which ones are missing. Permcalc can help with this if you're
targeting fx 2.0. Otherwise, you'll need to decipher the missing permission
information based on the exception details. If you need help with this,
please post the full exception details (as returned from its ToString
method) of a sample exception.

Also I have a problem with licencing. Currently I write something in the
registry.
But I need some kind of network licensing in such case.
But Windows networking is a kind of mystery to me.. What could I do?
I also know that some people might suggest active directory, but it's an
optional component, is it not?

Exactly what sort of "network licensing" do you need? Are you trying to
limit access to some server resources or simply to limit the number or
identity of clients that can use a purely client-side application? If the
latter, how would you expect the licensing scheme to behave when the
licensing server is unavailable (for example, because the client cannot
connect to the network)?
 
L

Lloyd Dupont

You'll need to grant additional CAS permissions to your application on the
client machines on which it will run. If you're using fx 2.0, then
deploying as a ClickOnce application is generally the simplest solution
for this. Otherwise, you'll need to modify the CAS policy on the client
machines, which can be done via network deployment tools. Your network
administrators may already have something in place for this; if not,
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/entsecpoladmin.asp
is a good place to start looking into your options.

thanks for that.
Exactly what sort of "network licensing" do you need? Are you trying to
limit access to some server resources or simply to limit the number or
identity of clients that can use a purely client-side application? If the
latter, how would you expect the licensing scheme to behave when the
licensing server is unavailable (for example, because the client cannot
connect to the network)?
By network licensing I mean something like "a licence for 50 instances of
the application at one time in the enterprise"
IF somehow the licence application comes from the same computer on which the
executable is (in a shared folder), there is no issue of licensing server
unavailable.
I'm thinking, perhaps I could write the newtork licence in the App.config
file?
 
N

Nicole Calinoiu

Lloyd Dupont said:
By network licensing I mean something like "a licence for 50 instances of
the application at one time in the enterprise"
IF somehow the licence application comes from the same computer on which
the executable is (in a shared folder), there is no issue of licensing
server unavailable.
I'm thinking, perhaps I could write the newtork licence in the App.config
file?

How would you enforce this? What would stop a user from simply making a
local copy of the application in this scenario, thereby bypassing any
license counting mechanism?
 
L

Lloyd Dupont

By network licensing I mean something like "a licence for 50 instances of
How would you enforce this? What would stop a user from simply making a
local copy of the application in this scenario, thereby bypassing any
license counting mechanism?
Very simple, in such case I would revert to current licensing mechanism,
which check the licence key in the registry.
But I would like to provide a way to avoid to have to enter the licence key
on every single computer the software is used.
 
N

Nicole Calinoiu

How would you know to apply the licensing logic switch? Also, in the
scenario where the application is launched from the network location as
planned, how would you count instances unless you're running a licensing
server? Simply having a config file available won't expose the information
that 50 instances are already running, so you won't be able to tell that the
51st instance has been launched. Or were you planning for the application
instances to edit the config file to maintain the running instance count?
 
L

Lloyd Dupont

For counting the number of license runnning I would just use a lawyer so
far...
Any better ideas? I'm looking to answers more than questions in this topic!

Otherwise when to apply network license or not.. mhh... I will have to have
a special installer as the current installer just replace all files
anyway...

--
Regards,
Lloyd Dupont

NovaMind development team
NovaMind Software
Mind Mapping Software
<www.nova-mind.com>
 
Z

Zhou Peng

I have written a .NET application which does heavy use of interop
(through
ManagedC++).
It works allright.
Now someone askedme if it works when installed in a shared directory.
So I'm testing, installed the application on a remote computer, in a
shared
folder and trying to run it from this remote folder.

I have SecurityException all over the places, which doesn't surprise me.
But how do I fix them?

For SecurityException thrown by .NET CLR, you can get rid of it by
adjusting the security setting using .NET Framework Configuration
Tools,which can be found in Administrative Tools if you have your .NET
Framework installed.
Also I have a problem with licencing. Currently I write something in the
registry.

Why not carry out an alternative method to save information other than
registry?
But I need some kind of network licensing in such case.
But Windows networking is a kind of mystery to me.. What could I do?
I also know that some people might suggest active directory, but it's an
optional component, is it not?

Good luck!
 
N

Nicole Calinoiu

Unfortunately, design guidance for the licensing scheme of a commercial
software product isn't the sort of help you're likely to find for free on a
newsgroup since pretty much anyone who is qualified to provide such guidance
will expect to be paid for their efforts. Have you considered trying to
find someone with appropriate expertise to consult on this project?
 
L

Lloyd Dupont

will expect to be paid for their efforts. Have you considered trying to
find someone with appropriate expertise to consult on this project?
Not really.
In fact I'm not sure there are sure (efficient, simple and reliable) way of
doing that.

--
Regards,
Lloyd Dupont

NovaMind development team
NovaMind Software
Mind Mapping Software
<www.nova-mind.com>
 

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