<?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 : Padding is invalid and cannot be removed</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Padding is invalid and cannot be removed</description>
  <pubDate>Wed, 13 May 2026 05:46:34 -700</pubDate>
  <lastBuildDate>Wed, 30 May 2012 20:53:11 -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=3458</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>Padding is invalid and cannot be removed : Thanks Denis, setting the flag...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3458&amp;PID=13687#13687</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1223" rel="nofollow">Lemispaid</a><br /><strong>Subject:</strong> 3458<br /><strong>Posted:</strong> 30-May-2012 at 8:53pm<br /><br />Thanks Denis, setting the flag on the second Manager seems to have fixed the issue.&nbsp;<div><br></div><div>manager.Options.UseDefaultAuthenticationContext = false;</div><div><br></div><div>Regards</div><div>Marcus</div>]]>
   </description>
   <pubDate>Wed, 30 May 2012 20:53:11 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3458&amp;PID=13687#13687</guid>
  </item> 
  <item>
   <title>Padding is invalid and cannot be removed : Hi Marcus,This type of padding...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3458&amp;PID=13674#13674</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 3458<br /><strong>Posted:</strong> 29-May-2012 at 1:30pm<br /><br />Hi Marcus,<div><br></div><div>This type of padding error is almost always caused by not setting the "sessionEncryptionKey" correctly if you're doing load balancing. See the following links for more details.</div><div><br></div><div><a href="http://www.ideablade.com/forum/forum_posts.asp?TID=2425&amp;title=padding-error-&#111;n-azure" target="_blank">http://www.ideablade.com/forum/forum_posts.asp?TID=2425&amp;title=padding-error-on-azure</a></div><div><br></div><div><a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/deploy-iis#H&#079;bjectServer28customc&#111;nfigurati&#111;n29" target="_blank">http://drc.ideablade.com/xwiki/bin/view/Documentation/deploy-iis#HObjectServer28customconfiguration29</a></div><div><br></div><div><table width="99%"><tr><td class="BBquote"></div><div><span style="text-align: left; : rgb251, 251, 253; ">I notice that as soon as this Manager is created, it shares the same SessionKey and IPrinicpal as the main app Entity Manager (created first), this I find strange considering I don't link it to the first manager</span></div><div><span style="text-align: left; : rgb251, 251, 253; "></td></tr></table></span></div><div><span style="text-align: left; : rgb251, 251, 253; "><br></span></div><div><span style="text-align: left; : rgb251, 251, 253; ">In 6.1.6, we implement a new feature that provides single sign on/sign off by default. This means that you no longer have to link EntityManagers. Every EntityManager created now uses a default <b>shared</b> AuthenticationContext class. You can optionally turns off this sharing by setting the Options.UseDefaultAuthenticationContext flag.</span></div><div><span style="text-align: left; : rgb251, 251, 253; "><br></span></div><div style="text-align: left;">See the following 6.1.6 release notes for more details.&nbsp;<a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/616-release-notes" target="_blank">http://drc.ideablade.com/xwiki/bin/view/Documentation/616-release-notes</a></div>]]>
   </description>
   <pubDate>Tue, 29 May 2012 13:30:14 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3458&amp;PID=13674#13674</guid>
  </item> 
  <item>
   <title>Padding is invalid and cannot be removed : Hi Guys,Devforce Version : 6.1.7Platform...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3458&amp;PID=13661#13661</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1223" rel="nofollow">Lemispaid</a><br /><strong>Subject:</strong> 3458<br /><strong>Posted:</strong> 27-May-2012 at 8:17pm<br /><br />Hi Guys,<div><br></div><div>Devforce Version : 6.1.7</div><div>Platform : Silverlight</div><div><br></div><div>Getting the subject error while trying to deploy a BOS to IIS 7.0. Here's the scenario;</div><div><br></div><div>Our silverlight app has two EntityManagers, one will be remote (stored on clients own IIS server). We have specified the following in the App.Config;</div><div><br></div><div><div>&lt;ideablade.configuration version="6.00" xmlns="http://schemas.ideablade.com/2010/IdeaBladeConfig"&gt;</div><div>&nbsp; &nbsp; &lt;logging logFile="log\DebugLog7.xml" /&gt;</div><div>&nbsp; &nbsp; &lt;objectServer remoteBaseURL="http://localhost" serverPort="9100" serviceName="EntityService.svc"&gt;</div><div>&nbsp; &nbsp; &nbsp; &lt;serviceKeys&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;serviceKey name="GTPAC" remoteBaseURL="http://testserver" serverPort="81" serviceName="GTPACBOS/EntityService.svc/sl" /&gt;</div><div>&nbsp; &nbsp; &nbsp; &lt;/serviceKeys&gt;</div><div>&nbsp; &nbsp; &nbsp; &lt;clientSettings isDistributed="true" /&gt;</div><div>&nbsp; &nbsp; &lt;/objectServer&gt;</div><div>&nbsp; &lt;/ideablade.configuration&gt;</div></div><div><br></div><div>The underlying Entity Manager is created using the following;</div><div><br></div><div>return new GTPACEntities(new EntityManagerContext(true, null, EntityServiceOption.UseDistributedService, null, null, serviceKey: _userContext.TenantDetails.SERVICE_KEY));</div><div><br></div><div>I notice that as soon as this Manager is created, it shares the same SessionKey and IPrinicpal as the main app Entity Manager (created first), this I find strange considering I don't link it to the first manager and I implement a second Login Manager on the remote BOS which doesn't seem to be resolving. The login itself seems to succeed, but as soon as I try to query the manager for an Entity, the below Padding error occurs..</div><div><br></div><div>The debug log on the remote BOS is as follows;</div><div><br></div><div><div>2012-05-28 12:46:29 &nbsp;IdeaBlade.EntityModel.Server.SessionManager:GetLoginManager Anonymous access: disabled&nbsp;</div><div>2012-05-28 12:46:29 &nbsp;IdeaBlade.Core.Composition.CompositionHost:GetImportDefSingle CompositionContext: '-IbDefault-' - Probed for non-default 'IEntityLoginManager' and found 'GTPaC.LoginManager'.&nbsp;</div><div>2012-05-28 12:46:29 &nbsp;IdeaBlade.Core.Composition.CompositionHost:CheckMultiExport CompositionContext: '-IbDefault-' - Probed for non-default 'IKnownTypeProvider' and found no matching exports.&nbsp;</div><div>2012-05-28 12:46:29 &nbsp;IdeaBlade.EntityModel.Server.EntityServerHost:&lt;AddBehaviors&gt;b__2 Using DC serializer for EntityServer&nbsp;</div><div>2012-05-28 12:46:29 &nbsp;IdeaBlade.EntityModel.Server.EntityServerHostFactory:CreateServiceHost EntityServer listening on http://egtpac-trial:81/GTPACBOS/EntityServer.svc&nbsp;</div><div>2012-05-28 12:46:29 &nbsp;IdeaBlade.EntityModel.Server.EntityServerHostFactory:CreateServiceHost EntityServer listening on http://egtpac-trial:81/GTPACBOS/EntityServer.svc/sl&nbsp;</div><div>2012-05-28 12:46:30 &nbsp;IdeaBlade.EntityModel.EntityServerProxy:GetInstance Loaded IdeaBlade.EntityModel.EntityServerProxy&nbsp;</div><div>2012-05-28 12:46:30 &nbsp;IdeaBlade.Core.Composition.CompositionHost:GetImportDefSingle CompositionContext: '-IbDefault-' - Probed for default 'IDataSourceKeyResolver' and found 'IdeaBlade.EntityModel.DefaultDataSourceKeyResolver'.&nbsp;</div><div>2012-05-28 12:46:30 &nbsp;IdeaBlade.EntityModel.EntityMetadataStore:LoadMetadataFromEmbeddedResources No metadata resources found in 'GTPaC.ModelDF, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'&nbsp;</div><div>2012-05-28 12:46:30 &nbsp;IdeaBlade.Core.Composition.CompositionHost:GetImportDefSingle CompositionContext: '-IbDefault-' - Probed for any 'EntityServerErrorInterceptor' and found 'IdeaBlade.EntityModel.Server.EntityServerErrorInterceptor'.&nbsp;</div><div>2012-05-28 12:46:30 &nbsp;IdeaBlade.EntityModel.Server.EntityServerErrorHandler:ProvideFault Caught exception: System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed. at System.Security.Cryptography.CapiSymmetricAlgorithm.DepadBlock(Byte&#091;&#093; block, Int32 offset, Int32 count) at System.Security.Cryptography.CapiSymmetricAlgorithm.TransformFinalBlock(Byte&#091;&#093; inputBuffer, Int32 inputOffset, Int32 inputCount) at System.Security.Cryptography.CryptoStream.FlushFinalBlock() at System.Security.Cryptography.CryptoStream.Dispose(Boolean disposing) at System.IO.Stream.Close() at IdeaBlade.Core.CryptoFns.AesDecrypt(String encryptedValue, Byte&#091;&#093; key, Boolean fipsCompliant) at IdeaBlade.EntityModel.Server.CredentialEncryptor.Decrypt(String encryptedCredential, String encryptionKey) at IdeaBlade.EntityModel.Server.SessionManager.GetPrincipalFromEncryptedCredential(SessionBundle sessionBundle) at IdeaBlade.EntityModel.Server.SessionManager.Validate(SessionBundle sessionBundle, Boolean loginIfNotInMap) at IdeaBlade.EntityModel.Server.EntityServer.Fetch(SessionBundle sessionBundle, IEntityQuerySurrogate surrogate) at SyncInvokeFetch(Object , Object&#091;&#093; , Object&#091;&#093; ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object&#091;&#093; inputs, Object&#091;&#093;&amp; outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)&nbsp;</div></div><div><br></div><div>It should be noted, that when I deploy to my local (development) IIS server, everything works fine, however, as soon as I try to deploy to the remote IIS server, the padding error occurs.</div><div><br></div><div>Any help GREATLY appreciated..</div><div><br></div><div>Thanks</div><div>Marcus</div><div><br></div>]]>
   </description>
   <pubDate>Sun, 27 May 2012 20:17:22 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3458&amp;PID=13661#13661</guid>
  </item> 
 </channel>
</rss>