Site settings error

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

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.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
2/28/2013 4:42:29 AM
Gravatar
Total Posts 1

Site settings error

Hello , Joe.

I have a problem with the "site settings ".

 When i click the button "site settings"  on the administrator panel of my site, the page with following inscription  opens  =

"We're sorry but a server error has occurred while trying to process your request.The error has been logged and will be reviewed by our staff as soon as possible. It is possible that the error was just a momentary hiccup and you may wish to use the back button and try again or go back to the home page. "

At the same time other administrator settings still work. I kindly ask you to help me.

B.R. Oleg

2/28/2013 6:10:41 AM
Gravatar
Total Posts 18439

Re: Site settings error

Start with Basic Troubleshooting to find out the error details. No-one can help without knowing the error details.

3/5/2013 1:55:41 PM
Gravatar
Total Posts 22

Re: Site settings error

I have this problem recently as well.  I will paste some of my info information below.  it initially occurred after uploading the new release last week.  i uploaded all the files again and it went away.  Today it resurfaced.  to rule some things out i have used explorer, firefox, and chrome and multiple admin user ids, all getting the same result.

mojoPortal Version 2.3.9.4 MSSQL

Operating System Microsoft Windows NT 6.1.7601 Service Pack 1
ASP.NET Info v4.0.30319 Running in Full Trust
Server Time Zone Central Standard Time
Server Local Time (GMT -6) 3/5/2013 1:47:23 PM
Greenwich Mean Time (GMT/UTC) 3/5/2013 7:47:23 PM
 

from system log --

2013-03-05 13:53:58,382 ERROR 24.178.208.226 - en-US - /Admin/SiteSettings.aspx - mojoPortal.Web.mojoBasePage - 24.178.208.226-en-US - /Admin/SiteSettings.aspx 
System.Web.HttpException (0x80004005): Unable to validate data.
   at System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean useValidationSymAlgo, Boolean useLegacyMode, IVType ivType, Boolean signData)
   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)
2013-03-05 13:53:58,393 ERROR 24.178.208.226 - en-US - /Admin/SiteSettings.aspx - mojoPortal.Web.Global - 24.178.208.226 /Admin/SiteSettings.aspx Referrer(http://www.creditre.net/Admin/AdminMenu.aspx) useragent Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0) 
System.Web.HttpException (0x80004005): Unable to validate data.
   at System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean useValidationSymAlgo, Boolean useLegacyMode, IVType ivType, Boolean signData)
   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)

 

3/5/2013 2:13:15 PM
Gravatar
Total Posts 18439

Re: Site settings error

Hi Bob,

You have assumed the previous post was about the same error but the previous poster posted no error details and there is no reason to make such and assumption. The generic "an error has occurred" message could be any error.

Your error is very clear. You have configured it such that your smtp settings are edited via the site settings page instead of using settings from web.config/user.config

​When you do that we encrypt the values before storing them in the database for extra security and must decrypt them when they are retrieved. However the machine key from web.config is used by the encryption so it must never change otherwise this error happens because it fails to decrypt. So when you upgrade you need to restore your machine key from the old web.config into the new one every time so that it does not change.

Hope that helps,

Joe

3/6/2013 9:57:47 AM
Gravatar
Total Posts 22

Re: Site settings error

Joe,

Thank you for your follow up, however, i could use a little more encouragement in the right direction to fix.  I think I have been using correctly configured email settings (per the instruction in the link you included) in my user config file.  I am not aware of any settings in the site settings regarding email other than completing the "site email from" field.

Also, i typically do not retain my old web.config file following an upgrade.  i upload the new one and then change the machine key to a new one, which i now realize is not the right thing to do.

as such, i am a bit locked out - can't access site settings.  is there anything i can do with the user config or web config to get my email setting the way they need to be?

bob

 

 

3/6/2013 10:36:25 AM
Gravatar
Total Posts 18439

Re: Site settings error

Hi Bob,

Sure. The reason it is trying to use smtp settings from site settings instead of directly from web.config/user.config is because you have this setting set to true:

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

if you set it to false then it will not try to load them from the database but will use them from the user.config file. That should eliminate the error in site settings but its probably also a good idea to clear out those fields in the db since they cannot be decrypted.

UPDATE mp_SiteSettingsEx
SET KeyValue = ''
WHERE KeyName = 'SMTPUser' OR KeyName = 'SMTPPassword'

Generally since smtp settings are a set and forget kind of thing I recommend just use user.config instead of making it editable as site settings from the UI. For multi site installations where you want to have different smtp settings per site then the site settings approach can be helpful.

Hope that helps,

Joe

3/6/2013 10:53:33 AM
Gravatar
Total Posts 22

Re: Site settings error

Thx.  Cheers!

3/6/2013 11:43:14 AM
Gravatar
Total Posts 18439

Re: Site settings error

Hi Bob,

Many thanks for the generous beer donation! Very much appreciated.

Cheers,

Joe

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