hi, i'm doing a custom membership provider, starting from odbc microsoft demo, to link a firebird da...
By drcrck
Question:Can/Should I use anything other than web.config for checking access to a page?Here is the s...
By robertkgaudet
Hi All,I am trying to use DirectorySearch and it is just not working for me. Ihave the following Act...
By cathie
Hi,Under .net 1.1 we used the following for doing impersonation. This allowed us to test out differ...
By ehanig
Why is the httpcookie expires value when read back always shows the minvalue of 1/1/0001 12:00:00AM?...
By aka, 3 Comments
I'm now well beyond frustration.I created an ASP.NET app for our intranet that only certain ind...
By cathleen_c_via_webservertalk, 8 Comments
I'm developing an e-commerce website .. the security issue is a big problemfor me...because it is th...
By mxmxm, 1 Comments
Pop quiz hotshots;What affect does https have on files sizes/ amount of data being passed accross th...
By russelluk, 2 Comments
Hello. I am trying to use forms authentication with sql membership provider. I have a page register...
By luisevalencia, 1 Comments
Hi Matt,
You would need to demand for an identity permission here, either Zone or
Url. But this on its own is easy to fake so you should think of additional
security checks such as strong name or/and the use of an intermediate caller
assembly which will have your security checks built-in (and properly
obfuscated if necessary).
Have a look at UrlIdentityPermission and ZoneIdentityPermission.
Thanks,
Fernando
"Matt Budd" <whoami2001ca...yahoo.ca> wrote in message
news:evhclEIWEHA.2520...TK2MSFTNGP12.phx.gbl...
> Hello all,
> I've looked through this newsgroup and saw lots of questions about running
> an application from a network drive or a local network. I know that when
> you
> do this, it puts the assembly into a different "zone" of trust which is
> more
> restrictive.
> In my situation this is a good thing. We don't want to allow our
> application
> to be run over the network and want to force them to install it (and buy
> it)
> on each local machine. The problem I'm having is that when you attempt to
> run it off the network drive, it dies on you and you get a
> System.Security.SecurityException unhandled exception. What I want to do
> is
> basically catch this exception and then display a readable error message
> explaining that it has to be run locally.
> I've tried the following code at the very start of my Main() function:
> [STAThread]
> static void Main(string[] pasArgs)
> {
> try {
> if
> (System.Security.SecurityManager.ResolvePolicy(typ eof(frmMain).Assembly.Evid
> ence).IsUnrestricted() == false) {
> MessageBox.Show("Must run locally!");
> return;
> }
> } catch (System.Security.SecurityException e) {
> MessageBox.Show(e.ToString());
> return;
> }
>
> But I still get the exception and neither of my messageboxes show. Any
> ideas
> how to catch this exception?
> - Matt
>
fernandovicariamsft | Mon, 26 May 2008 21:47:00 GMT |