C# . net on an 64 Bit XP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RAJSPY
    New Member
    • Jan 2008
    • 18

    C# . net on an 64 Bit XP

    Hi all,

    I have a very strange problem with a Windows XP 64 bit edition. When I start my program from a network drive it gives the following error:

    System.Security .SecurityExcept ion: Request for the permission of type 'System.Securit y.Permissions.E nvironmentPermi ssion, mscorlib, Version=2.0.0.0 , Culture=neutral , PublicKeyToken= b77a5c561934e08 9' failed.
    at System.Security .CodeAccessSecu rityEngine.Chec k(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
    at System.Security .CodeAccessPerm ission.Demand()
    at System.Environm ent.get_UserDom ainName()
    at FD.Credentials. UserCredentials .Reset()
    The action that failed was:
    Demand
    The type of the first permission that failed was:
    System.Security .Permissions.En vironmentPermis sion
    The Zone of the assembly that failed was:
    Intranet
    If I start it from a local path it don’t produces errors.
    If I start the same program from the same share on a normal Windows XP machine it don’t produce errors.

    I think there is a security problem but everything I do just don’t work.
    I have signed the program with our own root certificate and it has a strongkey deployment.

    Please help, thanx greetings RAJ
    Last edited by Curtis Rutland; Oct 23 '08, 01:17 PM. Reason: removing center tags
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Its not really a security problem per say.
    The default security settings for .NET (Administrator Tools -> Microsoft .NET Framework X Configuration) say to provide a "limited trust" to applications being run from a network drive.
    You have two options here I think:
    1. Strongly Key(or type? I forget the lingo) your assembly/application: Basically you need to digitally sign your application I think
    2. Reconfigure the .NET security settings on the computer(or computers) that will be running the application from a network directory, to allow applications "full trust" or something like that.

    Comment

    • RAJSPY
      New Member
      • Jan 2008
      • 18

      #3
      Is there a Group or User policy to set this trust?
      Because I deployed a strong key and it doesn’t work.

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        Well to be honest I never really figured out the stong key thing. I ended up giving up on running the application from a network drive entirely, rather then adjust the security settings.
        I *think* if you use any unmanaged DLLs, or any 3rd party DLLs that are NOT strongly keyed(typed?) you will not get the full trust, since the entirety of the application/assembly has to be strongly whatevered

        Comment

        • RAJSPY
          New Member
          • Jan 2008
          • 18

          #5
          But it is still strange that on a normal XP and Vista it just works and with a 64bit XP it is a problem! I have deployed the strongkey through the hole company and it works everywhere if there is a .net version installed. But just the XP64 Bit versions are a pain in the ass.

          If you start the program on a network share you don’t have to update it on every machine just the network share. So I have unraveled the strongkey option and it works great but under XP64 it just don’t.

          :-( Security is nice to have but it is always in the way! )-:

          Comment

          • RAJSPY
            New Member
            • Jan 2008
            • 18

            #6
            Solved 1 bit

            I have 1 solution for this problem.

            In the end I noticed that I have deployed an .net 1.1 strongkey.

            And Vista 64 bit hasn’t got .net 1.1 installed correctly.
            You must first install the dotnetfx.exe from Microsoft and install the ndp1.1sp1-kb867460-x86.exe

            Then the whole 1.1 framework works well again and the strongkey will deploy properly

            Comment

            Working...