<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : PersistenceSecurityException</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2012 : PersistenceSecurityException</description>
  <pubDate>Thu, 14 May 2026 10:42:39 -700</pubDate>
  <lastBuildDate>Tue, 13 Aug 2013 15:15:02 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=4268</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>PersistenceSecurityException : This is weird. DevForce only throws...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4268&amp;PID=16720#16720</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 4268<br /><strong>Posted:</strong> 13-Aug-2013 at 3:15pm<br /><br />This is weird.&nbsp; DevForce only throws that specific exception message if it's found an AuthorizationAttribute of some kind on the type.<DIV>&nbsp;</DIV><DIV>Is there any possibility that the changes you're making - to the MyEntity type definition, and also the custom EntityServerQueryInterceptor which isn't being found - haven't actually been deployed to your server?&nbsp; </DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 13 Aug 2013 15:15:02 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4268&amp;PID=16720#16720</guid>
  </item> 
  <item>
   <title>PersistenceSecurityException : I&amp;#039;m getting the following...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4268&amp;PID=16719#16719</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=2190" rel="nofollow">energysaver</a><br /><strong>Subject:</strong> 4268<br /><strong>Posted:</strong> 13-Aug-2013 at 12:20pm<br /><br />I'm getting the following exception when I attempt to query one of my entities:<br><br><b>PersistenceSecurityException: User is not authorized for this type</b><br><br>The generated class for the entity looks like this:<br><br>&nbsp; &#091;DataContract(IsReference=true)&#093;<br>&nbsp; &#091;IbEm.DataSourceKeyName(@"MyContext")&#093;<br>&nbsp; &#091;IbEm.DefaultEntitySetName(@"MyContext.MyEntity")&#093;<br>&nbsp; &#091;IbEm.ClientCanQuery(true)&#093;<br>&nbsp; &#091;IbEm.ClientQueryPermissions(IbEm.ClientQueryPermissions.AllowIncludes | IbEm.ClientQueryPermissions.AllowProjections)&#093;<br>&nbsp; &#091;IbEm.ClientCanSave(true)&#093;<br>&nbsp; public partial class MyEntity : IbEm.Entity <br>&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp; ...<br>&nbsp; }<br><br>The partial class looks like this:<br><br>&nbsp; public partial class MyEntity : IbEm.Entity<br>&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp; ...<br>&nbsp; }<br><br>The <b>&#091;RequiresAuthentication&#093;</b> attribute is <b>NOT </b>present on the class.<br><br><b>None </b>of my queries throws this exception when I pass a non-null login credential to Authenticator.Instance.LoginAsync. The exception occurs <b>ONLY </b>when I pass in a null credential. When the exception occurs, the AuthenticationContext of the entity manager indicates the I am logged in as <b>Anonymous </b>/ <b>Guest - 1</b>.<b><br></b><br>I tried adding this to my web.config:<br><br>&nbsp;&nbsp;&nbsp; &lt;objectServer&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;serverSettings<b> allowAnonymousLogin="true" </b>useAspNetSecurityServices="true"/&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/objectServer&gt;<br><br>It didn't help.<br><br>I tried inheriting from EntityServerQueryInterceptor and setting DefaultAuthorization to false and ShouldAuthorizeQueryResult to false and AuthorizeQuery to true. <br><br>That didn't help either. (And I saw no indication that DevForce ever picked up on my interceptor.)<br><br>My Silverlight app is based on the TempHire sample Cocktail app, where the domain model is in one assembly with links to its classes in a separate SL assembly, which is subsequently referenced by the Silverlight assembly.<br><br>Any suggestions on how to solve this? The contents of the server log file near where the exception occurs appears below.<br><br>Thanks in advance.<br><br>&lt;entry id="6" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.Core.IdeaBladeConfig:InitializationStatusCallback"&gt;IdeaBlade License: 'DataCenterServer, Universal', KeyDate: 7/10/2013, AllowedSessions: 10000. Found on Assembly: 'My.DataServices.CustomApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'&lt;/entry&gt;<br>&lt;entry id="7" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.Core.Configuration.ServerSettingsElement:ConstrainSettingsBasedOnLicenseCore"&gt;The configured SupportedClientApplicationType is All&lt;/entry&gt;<br>&lt;entry id="8" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.Core.Composition.CompositionHost:CheckMultiExport"&gt;CompositionContext: 'IbDefault' - Probed for non-default 'ITraceLoggerProvider' and found 'Cocktail.TraceLoggerProvider'.&lt;/entry&gt;<br>&lt;entry id="10" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.Core.TraceFns:CompleteTracingInitialization"&gt;IdeaBladeConfig resolution: File: C:\My.NET\MyApp.Development\MyApponline.Web\web.config - found&lt;/entry&gt;<br>&lt;entry id="11" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.Core.TraceFns:CompleteTracingInitialization"&gt;IdeaBladeConfig resolution: Logging file: C:\My.NET\MyApp.Development\MyApponline.Web\log\DevForceDebugLog.xml&lt;/entry&gt;<br>&lt;entry id="12" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.Core.TraceFns:CompleteTracingInitialization"&gt;Bound to .NET runtime version 4.0.30319.18213&lt;/entry&gt;<br>&lt;entry id="13" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.Core.TraceFns:CompleteTracingInitialization"&gt;DevForce Version=7.2.0.0&lt;/entry&gt;<br>&lt;entry id="14" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.EntityModel.RemoteServiceFns:AddSerializationBehavior"&gt;Using DC serializer for EntityService&lt;/entry&gt;<br>&lt;entry id="15" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.Core.Composition.CompositionHost:CheckSingleExport"&gt;CompositionContext: 'IbDefault' - Probed for any 'ServiceHostEvents' and found 'IdeaBlade.EntityModel.Server.ServiceHostEvents'.&lt;/entry&gt;<br>&lt;entry id="16" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.EntityModel.Server.EntityServiceHostFactory:CreateServiceHost"&gt;EntityService listening on http://localhost:9009/EntityService.svc&lt;/entry&gt;<br>&lt;entry id="17" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.EntityModel.Server.EntityServiceHostFactory:CreateServiceHost"&gt;EntityService listening on http://localhost:9009/EntityService.svc/winrt&lt;/entry&gt;<br>&lt;entry id="18" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.EntityModel.Server.EntityServiceHostFactory:CreateServiceHost"&gt;EntityService listening on http://localhost:9009/EntityService.svc/wp&lt;/entry&gt;<br>&lt;entry id="19" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.EntityModel.Server.EntityServiceHostFactory:CreateServiceHost"&gt;EntityService listening on http://localhost:9009/EntityService.svc/sl&lt;/entry&gt;<br>&lt;entry id="20" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.Core.Composition.CompositionHost:CheckSingleExport"&gt;CompositionContext: 'IbDefault' - Probed for any 'EntityServiceApplication' and found 'IdeaBlade.EntityModel.EntityServiceApplication'.&lt;/entry&gt;<br>&lt;entry id="21" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.EntityModel.EntityServiceApplication:OnServiceStartup"&gt;EntityService created&lt;/entry&gt;<br>&lt;entry id="22" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.EntityModel.Server.EntityServer:.ctor"&gt;EntityServer created for DataSourceExtension: &#091;None&#093;, CompositionContext: IbDefault&lt;/entry&gt;<br>&lt;entry id="23" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.Core.Composition.CompositionHost:CheckMultiExport"&gt;CompositionContext: 'IbDefault' - Probed for any 'ICompositionContextResolver' and found no matching exports.&lt;/entry&gt;<br>&lt;entry id="24" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.Core.Composition.CompositionHost:CheckSingleExport"&gt;CompositionContext: 'IbDefault' - Probed for default 'IDataSourceKeyResolver' and found 'IdeaBlade.EntityModel.DefaultDataSourceKeyResolver'.&lt;/entry&gt;<br>&lt;entry id="25" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.Core.Composition.CompositionHost:CheckMultiExport"&gt;CompositionContext: 'IbDefault' - Probed for any 'IEntityQueryExecutor' and found 'IdeaBlade.EntityModel.Edm.EdmQueryExecutor'.&lt;/entry&gt;<br>&lt;entry id="26" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.Core.Composition.CompositionHost:CheckMultiExport"&gt;CompositionContext: 'IbDefault' - Probed for any 'IEntityQueryExecutor' and found 'IdeaBlade.EntityModel.Edm.PassthruEsqlQueryExecutor'.&lt;/entry&gt;<br>&lt;entry id="27" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.Core.Composition.CompositionHost:CheckMultiExport"&gt;CompositionContext: 'IbDefault' - Probed for any 'IEntityQueryExecutor' and found 'IdeaBlade.EntityModel.Edm.StoredProcQueryExecutor'.&lt;/entry&gt;<br>&lt;entry id="28" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.Core.Composition.CompositionHost:CheckMultiExport"&gt;CompositionContext: 'IbDefault' - Probed for any 'IEntityQueryExecutor' and found 'IdeaBlade.EntityModel.Edm.UdtQueryExecutor'.&lt;/entry&gt;<br>&lt;entry id="29" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.EntityModel.Server.SessionManager:GetLoginManager"&gt;<b>Anonymous access: enabled</b>&lt;/entry&gt;<br>&lt;entry id="30" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.Core.Composition.CompositionHost:CheckSingleExport"&gt;CompositionContext: 'IbDefault' - Probed for non-default 'IEntityLoginManager' and found no matching exports.&lt;/entry&gt;<br>&lt;entry id="31" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.EntityModel.Server.SessionManager:GetLoginManager"&gt;Looking for AspAuthenticatingLoginManager&lt;/entry&gt;<br>&lt;entry id="32" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.EntityModel.Web.AspAuthenticatingLoginManager:.ctor"&gt;<b>ASP.NET security service integration enabled</b>&lt;/entry&gt;<br>&lt;entry id="33" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.EntityModel.Web.AspAuthenticatingLoginManager:.ctor"&gt;<b>ASP.NET authentication mode: Forms</b>&lt;/entry&gt;<br>&lt;entry id="34" timestamp="2013-08-13T11:55:43" username="" source="IdeaBlade.Core.Composition.CompositionHost:CheckSingleExport"&gt;CompositionContext: 'IbDefault' - Probed for default 'IEntityLoginManager' and found 'IdeaBlade.EntityModel.Web.AspAuthenticatingLoginManager'.&lt;/entry&gt;<br>&lt;entry id="35" timestamp="2013-08-13T11:55:45" username="" source="IdeaBlade.Core.Composition.CompositionHost:CheckMultiExport"&gt;CompositionContext: 'IbDefault' - Probed for non-default 'IKnownTypeProvider' and found no matching exports.&lt;/entry&gt;<br>&lt;entry id="36" timestamp="2013-08-13T11:55:45" username="" source="IdeaBlade.EntityModel.RemoteServiceFns:AddSerializationBehavior"&gt;Using DC serializer for EntityServer&lt;/entry&gt;<br>&lt;entry id="37" timestamp="2013-08-13T11:55:45" username="" source="IdeaBlade.EntityModel.Server.EntityServerHostFactory:CreateServiceHost"&gt;EntityServer listening on http://localhost:9009/EntityServer.svc&lt;/entry&gt;<br>&lt;entry id="38" timestamp="2013-08-13T11:55:45" username="" source="IdeaBlade.EntityModel.Server.EntityServerHostFactory:CreateServiceHost"&gt;EntityServer listening on http://localhost:9009/EntityServer.svc/winrt&lt;/entry&gt;<br>&lt;entry id="39" timestamp="2013-08-13T11:55:45" username="" source="IdeaBlade.EntityModel.Server.EntityServerHostFactory:CreateServiceHost"&gt;EntityServer listening on http://localhost:9009/EntityServer.svc/wp&lt;/entry&gt;<br>&lt;entry id="40" timestamp="2013-08-13T11:55:45" username="" source="IdeaBlade.EntityModel.Server.EntityServerHostFactory:CreateServiceHost"&gt;EntityServer listening on http://localhost:9009/EntityServer.svc/sl&lt;/entry&gt;<br>&lt;entry id="41" timestamp="2013-08-13T11:55:46" username="" source="IdeaBlade.EntityModel.EntityServerProxy:GetInstance"&gt;Loaded IdeaBlade.EntityModel.LocalEntityServerProxy&lt;/entry&gt;<br>&lt;entry id="42" timestamp="2013-08-13T11:55:54" username="" source="IdeaBlade.EntityModel.EntityMetadataStore:LoadMetadataFromEmbeddedResources"&gt;No metadata resources found in 'My.DataServices.CustomApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'&lt;/entry&gt;<br>&lt;entry id="43" timestamp="2013-08-13T11:55:54" <b>username="Guest - 1"</b> source="IdeaBlade.Core.Composition.CompositionHost:CheckSingleExport"&gt;CompositionContext: 'IbDefault' - Probed for any 'EntityServerQueryInterceptor' and found 'IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor'.&lt;/entry&gt;<br>&lt;entry id="44" timestamp="2013-08-13T11:55:55" <b>username="Guest - 1"</b> source="IdeaBlade.Core.Composition.CompositionHost:CheckSingleExport"&gt;CompositionContext: 'IbDefault' - Probed for any 'EntityServerErrorInterceptor' and found 'IdeaBlade.EntityModel.Server.EntityServerErrorInterceptor'.&lt;/entry&gt;<br>&lt;entry id="45" timestamp="2013-08-13T11:55:55" <b>username="Guest - 1</b>" source="IdeaBlade.EntityModel.Server.EntityServerErrorInterceptor:OnError"&gt;<b>Caught exception: System.UnauthorizedAccessException: User is not authorized for this type</b><br>&nbsp;&nbsp; at IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor.HandleException(Exception e, PersistenceFailure failureType)<br>&nbsp;&nbsp; at IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor.<b>OnAuthorizeQuery</b>()<br>&nbsp;&nbsp; at IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor.Execute(IEntityQuery entityQuery, SessionBundle sessionBundle, IEntityServer entityServer)<br>&nbsp;&nbsp; at IdeaBlade.EntityModel.Server.EntityServer.Fetch(SessionBundle sessionBundle, IEntityQuerySurrogate surrogate)<br>&nbsp;&nbsp; at SyncInvokeFetch(Object , Object&#091;&#093; , Object&#091;&#093; )<br>&nbsp;&nbsp; at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object&#091;&#093; inputs, Object&#091;&#093;&amp;amp; outputs)<br>&nbsp;&nbsp; at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp;amp; rpc)<br>&nbsp;&nbsp; at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp;amp; rpc)<br>&nbsp;&nbsp; at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc&amp;amp; rpc)<br>&nbsp;&nbsp; at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc&amp;amp; rpc)<br>&nbsp;&nbsp; at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc&amp;amp; rpc)<br>&nbsp;&nbsp; at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc&amp;amp; rpc)<br>&nbsp;&nbsp; at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc&amp;amp; rpc)<br>&nbsp;&nbsp; at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&amp;amp; rpc)<br>&nbsp;&nbsp; at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc&amp;amp; rpc)<br>&nbsp;&nbsp; at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)&lt;/entry&gt;<br>]]>
   </description>
   <pubDate>Tue, 13 Aug 2013 12:20:10 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4268&amp;PID=16719#16719</guid>
  </item> 
 </channel>
</rss>