Ayende @ Rahien

It's a girl

The things that you have to do to protect your application

The following is NHProf’s Main method:

image

Each of the currently existing conditions (and I am pretty sure that they will grow) is there because of bug reports from the field.

It gets… interesting, sometimes, the things that user do to my poor app.

Comments

Mr_Commercial_vs_Corporate
05/17/2009 01:18 PM by
Mr_Commercial_vs_Corporate

Yeah it's a much different world than corporate clients that's for sure. The precautionary steps required are ten-fold in order to prevent an avalanche of false positive bug reports and associated problems.

I say, bind 'em up and lock 'em down. If your product still runs then your user will have a pleasant experience and be grateful to you, otherwise barf early and often otherwise the user will falsely cuss you like they do Microsoft.

Krzysztof Kozmic
05/17/2009 01:19 PM by
Krzysztof Kozmic

I don't think you should do that - simply close the app without any notification for the user.

You should output a message telling a user why you are closing.

Ayende Rahien
05/17/2009 01:49 PM by
Ayende Rahien

Krzysztof,

The Assert is also responsible for alerting the user

VirtualStaticVoid
05/17/2009 05:45 PM by
VirtualStaticVoid

Yip, I've done similar assertions, as well as doing permission assertions.

e.g. Try running NHProf under Intranet/Internet Zone policies.

Set
05/17/2009 06:01 PM by
Set

Hmm wouldn't reflector + deblector + reflexil make it trivial to bypass this? or i'm missing something?

Ayende Rahien
05/17/2009 06:06 PM by
Ayende Rahien

Set,

Please read it.

Then guess about why I need it

Set
05/17/2009 06:32 PM by
Set

Ahh nevermind i thought it was some kind of assert to "protect" your files in addition to your licensing scheme. I should go to sleep :x

Peter Morris
05/19/2009 09:06 AM by
Peter Morris

I wouldn't bother at all to be honest. If someone is going to delete files I would let the app crash.

Maybe the unhandled exception dialog could suggest re-installing the file and if the problem persists they should send the bug report on to you.

Ayende Rahien
05/19/2009 10:04 AM by
Ayende Rahien

Peter,

You do realize how many support calls a good error can save you?

Ayende Rahien
05/19/2009 01:22 PM by
Ayende Rahien

So you realize why it is important to try to reduce them :-)

Comments have been closed on this topic.