Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There are two things that I've learned lately. First af all my concept was right, I can use PrinciplePermissionAttribute with costom role provider, the second is that I was totaly confused with the web.config tags. tag is used for the asp .net settings, while is used for WCF settings. So a liitle bit configuration solved the entire problem. Here is the right configuration</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;configuration&gt; &lt;system.web&gt; &lt;compilation debug="true" defaultLanguage="c#" targetFramework="4.0" /&gt; &lt;roleManager enabled="true" cacheRolesInCookie="true" cookieName=".ASPROLES" defaultProvider="MyRoleProvider"&gt; &lt;providers&gt; &lt;clear /&gt; &lt;add connectionStringName="Service1" applicationName="InfraTest" writeExceptionsToEventLog="false" name="MyRoleProvider" type="SecLib.MyRoleProvider" /&gt; &lt;/providers&gt; &lt;/roleManager&gt; &lt;/system.web&gt; &lt;system.serviceModel&gt; &lt;serviceHostingEnvironment multipleSiteBindingsEnabled="true" /&gt; &lt;bindings&gt; &lt;basicHttpBinding&gt; &lt;binding name="BasicHttpBindingConfiguration" closeTimeout="00:01:00" sendTimeout="00:10:00" maxBufferSize="524288" maxReceivedMessageSize="524288"&gt; &lt;security mode="TransportCredentialOnly"&gt; &lt;transport clientCredentialType="Windows" /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/basicHttpBinding&gt; &lt;/bindings&gt; &lt;services&gt; &lt;service name="WcfRoleProviderTestService.Service1" behaviorConfiguration="BasicHttpServiceBehavior" &gt; &lt;endpoint name="BasicHttpEndpoint" contract="WcfRoleProviderTestService.IService1" address="WcfAuthenticationTest" binding="basicHttpBinding" bindingConfiguration="BasicHttpBindingConfiguration" /&gt; &lt;host&gt; &lt;baseAddresses&gt; &lt;add baseAddress="http://localhost/WcfRoleProviderTestService/" /&gt; &lt;/baseAddresses&gt; &lt;/host&gt; &lt;/service&gt; &lt;/services&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name="BasicHttpServiceBehavior"&gt; &lt;serviceAuthorization principalPermissionMode="UseAspNetRoles" roleProviderName="MyRoleProvider" impersonateCallerForAllOperations="true" /&gt; &lt;serviceMetadata httpGetEnabled="true" /&gt; &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt; &lt;/behavior&gt; &lt;behavior name=""&gt; &lt;serviceMetadata httpGetEnabled="true" /&gt; &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;/system.serviceModel&gt; &lt;system.webServer&gt; &lt;modules runAllManagedModulesForAllRequests="true"/&gt; &lt;/system.webServer&gt; &lt;/configuration&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload