Permissions for access to Active Directory (CAS)

Discussion in 'ASP .Net Security' started by Taras Overchuk, Oct 31, 2003.

  1. Hi!
    I need to access to Active Directory from Web Servise by DirectoryServices,
    but at runtime I had SecurityException with message:
    System.Security.SecurityException: Security error.
    at PartnerData.DQuery.SplitUser()
    at PartnerData.DQuery.get_CompanyName() in
    d:\virtualdirs\webservices\partnerdata\dquery.asmx.cs:line 92
    at PartnerData.DQuery.GetTestInfo() in
    d:\virtualdirs\webservices\partnerdata\dquery.asmx.cs:line 172

    The granted set of the failing assembly was:
    <PermissionSet class="System.Security.PermissionSet"
    version="1">
    <IPermission class="System.Security.Permissions.EnvironmentPermission,
    mscorlib, Version=1.0.5000.0, Culture=neutral,
    PublicKeyToken=b77a5c561934e089"
    version="1"
    Read="TEMP;TMP;USERNAME;OS;COMPUTERNAME"/>
    <IPermission class="System.Security.Permissions.FileIOPermission,
    mscorlib, Version=1.0.5000.0, Culture=neutral,
    PublicKeyToken=b77a5c561934e089"
    version="1"
    Read="D:\VirtualDirs\WebServices\PartnerData"
    Write="D:\VirtualDirs\WebServices\PartnerData"
    Append="D:\VirtualDirs\WebServices\PartnerData"
    PathDiscovery="D:\VirtualDirs\WebServices\PartnerData"/>
    <IPermission
    class="System.Security.Permissions.IsolatedStorageFilePermission, mscorlib,
    Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
    version="1"
    Allowed="AssemblyIsolationByUser"
    UserQuota="9223372036854775807"/>
    <IPermission class="System.Security.Permissions.SecurityPermission,
    mscorlib, Version=1.0.5000.0, Culture=neutral,
    PublicKeyToken=b77a5c561934e089"
    version="1"
    Flags="Assertion, Execution, ControlThread,
    ControlPrincipal, RemotingConfiguration"/>
    <IPermission class="System.Web.AspNetHostingPermission, System,
    Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
    version="1"
    Level="Medium"/>
    <IPermission class="System.Net.DnsPermission, System, Version=1.0.5000.0,
    Culture=neutral, PublicKeyToken=b77a5c561934e089"
    version="1"
    Unrestricted="true"/>
    <IPermission class="System.Drawing.Printing.PrintingPermission,
    System.Drawing, Version=1.0.5000.0, Culture=neutral,
    PublicKeyToken=b03f5f7f11d50a3a"
    version="1"
    Level="DefaultPrinting"/>
    <IPermission class="Microsoft.SharePoint.Security.SharePointPermission,
    Microsoft.SharePoint.Security, Version=11.0.0.0, Culture=neutral,
    PublicKeyToken=71e9bce111e9429c"
    version="1"
    ObjectModel="True"/>
    <IPermission class="System.Data.SqlClient.SqlClientPermission,
    System.Data, Version=1.0.5000.0, Culture=neutral,
    PublicKeyToken=b77a5c561934e089"
    version="1"
    Unrestricted="true"/>
    <IPermission class="Microsoft.SharePoint.Security.WebPartPermission,
    Microsoft.SharePoint.Security, Version=11.0.0.0, Culture=neutral,
    PublicKeyToken=71e9bce111e9429c"
    version="1"
    Connections="True"/>
    <IPermission class="System.Net.WebPermission, System, Version=1.0.5000.0,
    Culture=neutral, PublicKeyToken=b77a5c561934e089"
    version="1"
    Unrestricted="true"/>
    <IPermission
    class="System.Security.Permissions.StrongNameIdentityPermission, mscorlib,
    Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
    version="1"

    PublicKeyBlob="0024000004800000940000000602000000240000525341310004000001000
    100F901577EEB3062D31C3E893B2BCADBEF1FDA50A8978E998CC6374D53D0C1D00DBF2B75E1D
    894837E07EE27A38ADF39B0AD6A15056DD118A4E80DE9E8D57FF87B0ACC4507FA1E9EA702F2F
    9C944A1DD14399CBC29156D18C4CA349D2AE9ED6392C523DEE546D8D382F372396CB1605B2D7
    FE5E790D71C8EEB6337E93C5208CCB4"
    Name="PartnerData"
    AssemblyVersion="1.0.2.0"/>
    <IPermission class="System.Security.Permissions.UrlIdentityPermission,
    mscorlib, Version=1.0.5000.0, Culture=neutral,
    PublicKeyToken=b77a5c561934e089"
    version="1"

    Url="file://D:/VirtualDirs/WebServices/PartnerData/bin/PartnerData.DLL"/>
    <IPermission class="System.Security.Permissions.ZoneIdentityPermission,
    mscorlib, Version=1.0.5000.0, Culture=neutral,
    PublicKeyToken=b77a5c561934e089"
    version="1"
    Zone="MyComputer"/>
    </PermissionSet>

    What kind of Permissions I have to give for my application in this case.P.S.
    If I give "Full" trust level than my application work perfect.
     
    Taras Overchuk, Oct 31, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Scott
    Replies:
    2
    Views:
    2,618
    Juan T. Llibre
    May 16, 2006
  2. Spam Catcher
    Replies:
    4
    Views:
    538
    Willy Denoyette [MVP]
    Apr 21, 2008
  3. Jay Armstrong

    Active Directory Machine Account Permissions

    Jay Armstrong, Feb 28, 2005, in forum: ASP .Net Security
    Replies:
    4
    Views:
    440
    Jay Armstrong
    Mar 15, 2005
  4. Keith F.

    Account Permissions to query Active Directory

    Keith F., Apr 24, 2006, in forum: ASP .Net Security
    Replies:
    2
    Views:
    2,379
    Joe Kaplan \(MVP - ADSI\)
    Apr 25, 2006
  5. Phil

    Code Access Security (CAS) Problem

    Phil, May 24, 2006, in forum: ASP .Net Security
    Replies:
    0
    Views:
    143
Loading...

Share This Page