Home All Groups Group Topic Archive Search About

FullTrust on network drive

Author
7 Nov 2006 5:25 PM
Martin Hart
Hi:

I am trying to run a .NET 2.0 app from a network drive, but I'm getting
an error on startup.

I have configured the .NET security as follows:
My Computer / Runtime Security Policy / Machine / Code Groups / All_Code
/ LocalIntranet_Zone = FullTrust

I think the problem is that I'm using 2 IP addresses on my machine
(192.168.0.1 and 10.124.0.1) and when I access machines in the
10.124.0.?? range, I have to access them by IP rather than machine name.
I believe when I execute my program on this network, it is *not*
regarded as Intranet, but Internet and I don't have FullTrust set on that.

My question is: Can I configure a particular app to have FullTrust over
this sort of connection? If so, how?

TIA,
Martin.

Author
7 Nov 2006 10:19 PM
Claus Konrad [MCSD]
If you are creating the app. yourself, the easier way to overcome this issue
is sign the assembly (sn.exe) and grant the nesseceary trust to this
particular strongname.

Regardless the app is in networkdrive or locally, it still presents the
"appropriate" strongname and hence is given your trust level.
--
rgds.
/Claus Konrad
MCSD.NET (C#)


Show quoteHide quote
"Martin Hart" <"martin dot hartturner at" wrote:

> Hi:
>
> I am trying to run a .NET 2.0 app from a network drive, but I'm getting
> an error on startup.
>
> I have configured the .NET security as follows:
> My Computer / Runtime Security Policy / Machine / Code Groups / All_Code
> / LocalIntranet_Zone = FullTrust
>
> I think the problem is that I'm using 2 IP addresses on my machine
> (192.168.0.1 and 10.124.0.1) and when I access machines in the
> 10.124.0.?? range, I have to access them by IP rather than machine name.
> I believe when I execute my program on this network, it is *not*
> regarded as Intranet, but Internet and I don't have FullTrust set on that.
>
> My question is: Can I configure a particular app to have FullTrust over
> this sort of connection? If so, how?
>
> TIA,
> Martin.
>
Author
8 Nov 2006 4:59 PM
Martin Hart
Claus:

Thanks for the feedback.
> If you are creating the app. yourself, the easier way to overcome this issue
> is sign the assembly (sn.exe) and grant the nesseceary trust to this
> particular strongname.

Yes, it is an app developed by us, and it is signed with a strong name.

> Regardless the app is in networkdrive or locally, it still presents the
> "appropriate" strongname and hence is given your trust level.

How do I set FullTrust for a strongname app?

TIA,
Martin.
Author
8 Nov 2006 8:49 PM
Claus Konrad [MCSD]
You simply use the wizard from the .NET 2.0 Configuration Tool
(Administrative Tools).

It is quite self explainatory. Go to the Code Group called 'All_Code' and
add a new Code Group called "myGroup". This group will contain a policy for
strongname of choice.

--
rgds.
/Claus Konrad
MCSD.NET (C#)


Show quoteHide quote
"Martin Hart" <"martin dot hartturner at" wrote:

> Claus:
>
> Thanks for the feedback.
> > If you are creating the app. yourself, the easier way to overcome this issue
> > is sign the assembly (sn.exe) and grant the nesseceary trust to this
> > particular strongname.
>
> Yes, it is an app developed by us, and it is signed with a strong name.
>
> > Regardless the app is in networkdrive or locally, it still presents the
> > "appropriate" strongname and hence is given your trust level.
>
> How do I set FullTrust for a strongname app?
>
> TIA,
> Martin.
>
Author
9 Nov 2006 12:19 PM
Martin Hart
Claus:

Damm, that was well hidden ;-)

Sorry for such a basic question, I've got it now and the app is working.

Thanks,
Martin.


Claus Konrad [MCSD] escribió:
Show quoteHide quote
> You simply use the wizard from the .NET 2.0 Configuration Tool
> (Administrative Tools).
>
> It is quite self explainatory. Go to the Code Group called 'All_Code' and
> add a new Code Group called "myGroup". This group will contain a policy for
> strongname of choice.
>
Author
8 Nov 2006 2:09 PM
mtv
Martin,

Try this script (for .Net framework 2.0 only). Make sure you change the
drive's name (file://M to yours).

C:\WINNT\Microsoft.NET\Framework\v2.0.50727\caspol -q -m -ag 1.2 -url
file://M: FullTrust -n M_Drive -d "FullTrust granted to:  M_Drive"


--
Your 2 cents are worth $milion$. Thanks.


Show quoteHide quote
"Martin Hart" <"martin dot hartturner at" wrote:

> Hi:
>
> I am trying to run a .NET 2.0 app from a network drive, but I'm getting
> an error on startup.
>
> I have configured the .NET security as follows:
> My Computer / Runtime Security Policy / Machine / Code Groups / All_Code
> / LocalIntranet_Zone = FullTrust
>
> I think the problem is that I'm using 2 IP addresses on my machine
> (192.168.0.1 and 10.124.0.1) and when I access machines in the
> 10.124.0.?? range, I have to access them by IP rather than machine name.
> I believe when I execute my program on this network, it is *not*
> regarded as Intranet, but Internet and I don't have FullTrust set on that.
>
> My question is: Can I configure a particular app to have FullTrust over
> this sort of connection? If so, how?
>
> TIA,
> Martin.
>
Author
8 Nov 2006 5:03 PM
Martin Hart
mtv:

Thanks for the script. It seems to run fine, and the new item is added
to the group, but I still can't get it to run. As I mentioned in my
original post, could it be that the network drive is not considered
'Intranet' and therefore the '1.2' is the incorrect group?

> C:\WINNT\Microsoft.NET\Framework\v2.0.50727\caspol -q -m -ag 1.2 -url
> file://M: FullTrust -n M_Drive -d "FullTrust granted to:  M_Drive"

TIA,
Martin.