Can't access admin settings after upgrade

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
12/28/2010 4:25:27 PM
Gravatar
Total Posts 137
When enough isn't

Can't access admin settings after upgrade

Hi,

I updated from version 2-3-5-1 on asp.net 3.5 on IIS 6 to version 2-3-5-8 on asp.net 3.5 on IIS7. That worked well - all running hosted in medium trust by the way.

But my final step has an error which I can't solve:

I updated from asp.net 3.5 to 4.0 on the IIS7, which apparently worked. But now I can't access the site settings in the admin module even though my user still is admin as it was originally. I can access all other parts of the admin module. Any ideas?

This is the error message:

"The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or a non-white space character among the padding characters."

Best regards

Lars, Denmark

12/29/2010 7:10:15 AM
Gravatar
Total Posts 18439

Re: Can't access admin settings after upgrade

Hi Lars,

Is there more error detail in the log like a stack trace showing where this error is happening?

I would try clearing the browser cache and cookies and then sign in again and see if the problem persists.

Best,

Joe

12/29/2010 9:45:26 AM
Gravatar
Total Posts 137
When enough isn't

Re: Can't access admin settings after upgrade

Hi,

Actually I already did erase the cookies and browser cache plus I gave it many hours with no activity. But with no change in result.

Here is the error log for trying again now:

2010-12-29 16:38:11,359 ERROR mojoPortal.Web.Global - <myIPadressErased>-da-DK - /Admin/SiteSettings.aspx
System.FormatException: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or a non-white space character among the padding characters.
at System.Convert.FromBase64String(String s)
at mojoPortal.Web.mojoMembershipProvider.UnencodePassword(String pass, MembershipPasswordFormat passwordFormat)
at mojoPortal.Web.SiteUtils.Decrypt(String encrypted)
at mojoPortal.Web.AdminUI.SiteSettingsPage.PopulateMailSettings()
at mojoPortal.Web.AdminUI.SiteSettingsPage.PopulateControls()
at mojoPortal.Web.AdminUI.SiteSettingsPage.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at mojoPortal.Web.mojoBasePage.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 

I hope this gives a better clue?

Thanks a lot,

Lars

12/29/2010 10:55:17 AM
Gravatar
Total Posts 18439

Re: Can't access admin settings after upgrade

Hi Lars,

Make sure this exists in Web.config and make sure it is not set to false in user.config

<add key="UseLegacyCryptoHelper" value="true"/>

Hope it helps,

Joe

12/29/2010 2:08:51 PM
Gravatar
Total Posts 137
When enough isn't

Re: Can't access admin settings after upgrade

Thanks, Joe ... I'm impressed. You just solved it right away smiley.

Now I can proceed with the new redirects to www-domain made possible in MojoPortal under asp.net 4. Another feature that you developed on our request.

Thanks a lot

Lars

1/4/2011 8:16:06 AM
Gravatar
Total Posts 18439

Re: Can't access admin settings after upgrade

Hi Lars,

Actually there is a more ideal solution. Basically the issue is that you are storing smtp settings in site settings and the smtp user and password are encrypted using the legacy crypto helper so it cannot be decrypted by the newer version of cryptohelper and it caused this error when you visited the Site Settings page. So the config setting makes it use the legacy crypto helper and it works ok and solved the error. But it would be ideal  to change it to use the newer crypto helper method which uses the same encryption as is used for passwords based on the machine key.

To accomplish this you would need to:

  1. clear out those settings from the database like this: UPDATE mp_SiteSettingsEx SET SMTPPassword = '', SMTPUser = ''
  2. then change the config to <add key="UseLegacyCryptoHelper" value="false"/> in user.config
  3. touch Web.config to clear the cache
  4. then restore the smtp settings from the UI in Site Settings (if a multi site installation do this for each site) so it can encrypt them with the new method

Note that in those brief moments after you clear the settings it will not be able to send email until you restore them.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.