CSLA 1.53 busted my dataportal.

CSLA 1.53 busted my dataportal.

Old forum URL: forums.lhotka.net/forums/t/404.aspx


JonM posted on Monday, June 19, 2006

Hello all,

I justed upgraded from CSLA 1.52 to CSLA 1.53.  The sorting fix is specifically helpful to me!  However, now I cannot run my app in dataportal mode, it works great local mode.  Note, I'm running on the .NET 2.0 framework and VS2005.  Any ideas would be greatly appreciated here.  I've verified that the .DLL in the dataportal folder match.  I've also verified that the dataportal is working and return WSDL through IE.  I've attached a link to the error details.

http://www.accs.net/users/anonymous/dataportalbug.jpg

JonM replied on Monday, June 19, 2006

Okay, I got it figured out.  It turns on that the client-side dataportal code was looking for AppSetting named 'AlwaysImpersonate'.  I did not have this application setting (no idea why it wants to find it now).  Any way, the helper method in the CSLA framework threw an error because this value was unavailable.  I simple added it to my app settings (setting it to false, I'm using CSLA authentication, I hope this is the right thing to do).  So far, my problems are gone!

RockfordLhotka replied on Monday, June 19, 2006

Hmm, it appears to be a bug in the VB code. I should have used LCase() instead of .ToLower, because LCase() automatically handles the null string case. Grumble...

Your solution is a fine answer, otherwise you can change the DataPortal.vb code as follows:

  Private Shared Function ALWAYS_IMPERSONATE() As String

    Return LCase(ConfigurationSettings.AppSettings("AlwaysImpersonate"))

  End Function

 

I've made this change in the code in cvs, so if there is a future 1.x release you'll be safe in making this change.

Copyright (c) Marimer LLC