D2006 WinForm
.exe runs fine locally on any machine, but from the web server via the net
the following error occurs:
System.Security.SecurityException: Request for the permission of type
System.Security.Permissions.ReflectionPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
Can someone point me in the Delphi direction of how to set Reflection
Permissions to be public?
Regards,
Bernard
> System.Security.SecurityException: Request for the permission of type
> System.Security.Permissions.ReflectionPermission, mscorlib,
> Version=1.0.5000.0
I think you may not have installed the 1.1 .NET framework on this
machine.
--
Craig Stuntz [TeamB] · Vertex Systems Corp. · Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
IB 6 versions prior to 6.0.1.6 are pre-release and may corrupt
your DBs! Open Edition users, get 6.0.1.6 from http://mers.com
Before 2.0 the winform would load from the internet (with associated dll's)
and execute with no user intervention warning that you are downloading a
.exe,
(then when I clicked a button I got the System.Security.SecurityException)
After installing 2.0 it does warn you your downloading a .exe!!..... you get
to choose RUN or SAVE!!! and if you choose run and click the button it says
the dll's didn't download!!!!!!! I don't want this at all!!! 1.1 was
great..... and correct.
I've tested it on another client that still only has 1.1 installed and it
works like it should.... before 2.0....
and again on another client that only has 2.0 installed and it doesn't work.
has got me stumped, searching for answers if anyone can help.
regards,
Bernard
"Craig Stuntz [TeamB]" <craig_...@nospam.please [a.k.a. acm.org]> wrote
in message news:43e8cc4a$1...@newsgroups.borland.com...
> Had 1.1 .NET framework installed....... so now I installed 2.0 .NET
> framework..... now things are worse!!!!!.....
The version of mscorlib you showed in your error message was *not*
from 1.1. Something is wrong with your 1.1 installation. Adding 2.0
won't fix that problem.
Try reinstalling 1.1.
--
Craig Stuntz [TeamB] · Vertex Systems Corp. · Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Borland newsgroup denizen Sergio González has a new CD of
Irish music out, and it's good: http://tinyurl.com/7hgfr
Installed 1.1 and the mscorlib file is the same, the file version in its
properties is 1.1.4322.573 but
the version in the error and in the BDE add reference is 1.0.5000.0, which
may be the assembly version?
if so, i'm back to where i was.... else something may not be right with
microsoft's 1.1 mscorlib <gasp!>
.NET is a whole new world for me and so far i'm not very impressed, writing
low level code can be complex but getting a Winform to run from a server
should be simple. Even the chatdemo that is supplied with BDE runs locally
but wont run from the server on a 1.1 client or a 2.0 client. A blank form
with one button runs with a security warning?, and version 2.0 asks if the
.exe should be RUN or SAVED. I have 4 computers setup differently to test
which do work as expected and which dont, so far none do.
<scratching my head now>
Regards,
Bernard
"Craig Stuntz [TeamB]" <craig_...@nospam.please [a.k.a. acm.org]> wrote
in message news:43e9f4e9$1...@newsgroups.borland.com...
<snip>
Assemblies with a 1.0.5000.0 version are .NET 1.0 assemblies.
--
Marc Rohloff [TeamB]
marc rohloff -at- myrealbox -dot- com
version 1.0.5000.0 of mscorlib *IS* what is installed during the .NET 1.1
install.
I can send you a screen shot if you like
Regards,
Bernard
"Marc Rohloff [TeamB]" <"on request"> wrote in message
news:1vnsmk17sb0pa$.dlg@marcrohloff.com...
> you say version 1.0.5000.0 of mscorlib is .NET 1.0 and not .NET 1.1
>
> version 1.0.5000.0 of mscorlib IS what is installed during the .NET
> 1.1 install.
Yes, you're right; that's what I have, too.
--
Craig Stuntz [TeamB] · Vertex Systems Corp. · Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Useful articles about InterBase development:
http://blogs.teamb.com/craigstuntz/category/21.aspx
> Can someone point me in the Delphi direction of how to set Reflection
> Permissions to be public?
Start, Control Panel, Administrative Tools, Microsoft .NET Framework
1.1 Configuration, Runtime Security Policy.
From there, well, there are *lots* of different ways you can do this.
You can increase trust for the assembly in question, change the
permission sets, and more.
But does that get you going in the right direction?
here is the scenario:
----------------------------
When the .exe is downloaded via the internet it first displays the main form
with the following message bubble:
"This application is running in a partially trusted context... some
functionality in the application maybe be disabled due to security
restrictions"
click a button which fires some directx functions and this happens:
System.Security.SecurityException: Request for the permission of type
System.Security.Permissions.ReflectionPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
---------------------------
Does it mean it wont work unless each clients permission policies are
changed to allow it?
I can understand because its downloaded from the internet it isn't allowed
by default but
can a user be asked if they allow it? and then set the permissions
accordingly?
I also note that a blank form with one button and "hello world" message also
shows the
"This application is running in a partially trusted context... some
functionality in the application maybe be disabled due to security
restrictions"
regards,
Bernard
"Craig Stuntz [TeamB]" <craig_...@nospam.please [a.k.a. acm.org]> wrote
in message news:43eb646d$2...@newsgroups.borland.com...
> Does it mean it wont work unless each clients permission policies are
> changed to allow it?
As it stands now, yes, but you may be able to change what you are
doing so that the extra trust is not required.
> I also note that a blank form with one button and "hello world"
> message also shows the "This application is running in a partially
> trusted context... some functionality in the application maybe be
> disabled due to security restrictions"
If you're not already statically linking in the VCL assemblies, do
that.
--
Craig Stuntz [TeamB] · Vertex Systems Corp. · Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Please read and follow Borland's rules for the user of their
server: http://support.borland.com/entry.jspa?externalID=293
> If you're not already statically linking in the VCL assemblies, do
> that.
I was trying to keep the file size down.
Just ran FxCop on my "hello world" .NET app and it found 134 issues, <gasp>
i'm now considering retreating to win32 :)
Regards,
Bernard.
"Craig Stuntz [TeamB]" <craig_...@nospam.please [a.k.a. acm.org]> wrote
in message news:43eb...@newsgroups.borland.com...
> i'm now considering retreating to win32 :)
Oh, and, yes, that will remove any chance that you might be able to
run FxCop. :) I'm not sure that's a good thing, though....
--
Craig Stuntz [TeamB] · Vertex Systems Corp. · Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
> > If you're not already statically linking in the VCL assemblies, do
> > that.
>
> I was trying to keep the file size down.
Not statically linking the VCL assemblies means that your
administrator will have to increase the trust of those assemblies when
the app runs in a partial trust context, otherwise the VCL won't be
allowed to call WinAPI routines.
--
Craig Stuntz [TeamB] · Vertex Systems Corp. · Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
How to ask questions the smart way:
http://www.catb.org/~esr/faqs/smart-questions.html
> means that your
> administrator will have to increase the trust of those assemblies
I was looking at the public using .NET apps, so mums and dads would be the
administrators.
I've worked out the security issues, .NET has its merits but it's security
hinders what i wanted to do...
it's a pity its so strict..... but.... we dont live in a perfect world. :)
Thanks for your help.
Regards
Bernard
"Craig Stuntz [TeamB]" <craig_...@nospam.please [a.k.a. acm.org]> wrote
in message news:43ec9303$1...@newsgroups.borland.com...