In order to use AzManPermissions, you have to connect to an AzMan authorization store (for more information: Authorization Manager). If your application can't connect to it directly (for example, it's in a remote SQL database, where users do not have connection rights), then you need a service which can connect to it directly and serve your application's permission check requests. You can use the class AzManOperationRemotePermission in your application to perform AzMan operation permission checks.
AzManPermissions need a WCF service with a AzManPermissions.IAzManService contract to serve it's requests. It has a dedicated service client class to connect to it, you only have to specify the service connection details in your application's config file.
The service has to connect to the authorization store directly. To set up your service to connect to the store, you can follow the steps described in Connect to authorization store directly.

Specifying sercvice connection details through application's config
You can use your application's config file, to specify the service's address and binding. In the configuration section you can write the following settings:
        <binding name="BasicHttpBinding_IAzManService" closeTimeout="00:01:00"
          openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
          allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
          maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
          messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
            <transport clientCredentialType="None" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
      <endpoint address="http://localhost:59614/AzManService.svc" binding="basicHttpBinding"
        bindingConfiguration="BasicHttpBinding_IAzManService" contract="AzManPermissions.IAzManService"
        name="BasicHttpBinding_IAzManService" />

Of course, it's just a sample setting, you can choose your settings as long as the contract is AzManPermissions.IAzManService.

Last edited Aug 14, 2012 at 7:31 PM by pjenei, version 1


No comments yet.