Hello,

I need to give full access to the code on my machine when I access it
through a share. It defaults to intranet zone and therefore is only
partially-trusted.

I want to have a constant mapped drive for all my developers, and I don't
want the overhead of maintaining the SUBST (DefineDosDevice) everytime
someone logs in.

I've tried (through the .NET config manager)

...
                  <CodeGroup class="UnionCodeGroup"
                             version="1"
                             PermissionSetName="FullTrust"
                             Name="My_Computer_Zone"
...
                     <CodeGroup class="UnionCodeGroup"
                                version="1"
                                PermissionSetName="FullTrust"
                                Name="Local_Machine"
                                Description="Code group grants ...">
                        <IMembershipCondition
                                    class="UrlMembershipCondition"
                                    version="1"
                                    Url="file://KBRUBAKEROFFICE/*"/>
                     </CodeGroup>
...


and I tried in .../[EMAIL PROTECTED]"Trusted_Zone"]

                     <CodeGroup class="UnionCodeGroup"
                                version="1"
                                PermissionSetName="FullTrust"
                                Name="Local_Code_Trust"
                                Description="Lcoal code ...">
                        <IMembershipCondition
                                    class="UrlMembershipCondition"
                                    version="1"
                                    Url="file://KBRUBAKEROFFICE/*"/>
                     </CodeGroup>

Note that the config utility changed "\\KBRUBAKEROFFICE\*"
to "file://KBRUBAKEROFFICE/*" so it knows what kind of url it's got.

My question is: should I be using something else (like site? -- that
didn't seem to work either), have I messed up the incantation somehow, or
do I just have to stick to SUBST?

[*] I KNOW I can up my intranet-zone to full trust. I don't want to do
that for obvious reasons.

[*] It definately should allow me to give full trust to a single machine.
I'd like that machine to be my own :-)


Test App:
static void Main(string[] args)
{
    // this is the line that gives the security exception
    System.IO.FileStream strm = System.IO.File.OpenWrite(
        System.IO.Path.Combine(
            AppDomain.CurrentDomain.BaseDirectory, "TestFile.txt"));

    strm.Close();
}

Behavior:

Works for:
C:\Development\MyCompany\Test\CS\ConsoleApplication\bin\Debug\Xx.exe

Fails for:
\\Kbrubakeroffice\Test\CS\ConsoleApplication\bin\Debug\Xx.exe
T:\CS\ConsoleApplication\bin\Debug\Xx.exe

Reply via email to