Unable to access site settings. Please help.

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
5/23/2011 7:40:56 AM
Gravatar
Total Posts 76

Unable to access site settings. Please help.

Dear all,

I'm unable to access site settings now. All I did was just set this to true :

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

I'm getting the following on the logs...

2011-05-23 18:02:53,796 ERROR mojoPortal.Web.Global - 122.183.224.254-en-US - /Admin/SiteSettings.aspx
System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed.
   at System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode paddingMode, Boolean fLast)
   at System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
   at System.Security.Cryptography.CryptoStream.FlushFinalBlock()
   at System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean useValidationSymAlgo, Boolean useLegacyMode, IVType ivType)
   at System.Web.Security.MembershipAdapter.EncryptOrDecryptData(Boolean encrypt, Byte[] buffer, Boolean useLegacyMode)
   at System.Web.Security.MembershipProvider.DecryptPassword(Byte[] encodedPassword)
   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)
2011-05-23 18:02:53,885 INFO mojoPortal.Web.Global - crypto error trapped and returned a 404 instead of 500 for security reasons

 

When I access site settings, this is what I see..

-------------------------

SERVER ERROR

404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unava

------------------------

All the sub sites work fine. The smtp setting shows up in the sub sites. But I'm unable access the site settings for the first main site.

If i set EnableSiteSettingsSmtpSettings=false, I am able to access site settings.

Please guide me on how I can resolve this.. 

Thanks so much.. 

5/23/2011 12:53:17 PM
Gravatar
Total Posts 18439

Re: Unable to access site settings. Please help.

Sounds like the machine key changed since it previously encrypted smtp settings or else you changed from using the legacy crypto helper.

The only way to fix it is to clear those settings out from the database and then you can enter them again correctly from the UI.

UPDATE mp_SiteSettingsEx
SET KeyValue = ''
WHERE SiteID = yoursiteid
AND (KeyName = 'SMTPPassword' OR KeyName = 'SMTPUser')

Hope that helps,

Joe

5/24/2011 6:45:27 AM
Gravatar
Total Posts 76

Re: Unable to access site settings. Please help.

Thank you Joe!

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