Installation and deployment Questions on installation, system configuration and deployment to the live server.
Version 6.x > Installation and deployment > Problem after migrating a website to another server View modes: 
User avatar
Certified Developer 8
Certified Developer 8
liquidmagic - 4/27/2012 7:41:28 AM
   
Problem after migrating a website to another server
Hello,

I have the following issue. I migrated a website from one server to another. Here is the way I did it.
I copies all files from the rot directory of the site to the other server. Then I created a backup of the server and did a restore on the new server. I changed the connections tring, fixed permissions and I get the following error. The error happens on some cases even though it's a server error. I mean on a browser I see the site but from another location somebody else cannot.

Here is the error:
Server Error in '/' Application.

Procedure or function Proc_CMS_SettingsKey_SelectGeneration has too many arguments specified.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Procedure or function Proc_CMS_SettingsKey_SelectGeneration has too many arguments specified.

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

<%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:

[SqlException (0x80131904): Procedure or function Proc_CMS_SettingsKey_SelectGeneration has too many arguments specified.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +212
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +245
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1099
System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +58
System.Data.SqlClient.SqlDataReader.get_MetaData() +112
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +6291924
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +6292993
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +424
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +28
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +211
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +87
CMS.DataProviderSQL.DataConnection.ExecuteReader(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, CommandBehavior commandBehavior) +223

[Exception: [DataConnection.ExecuteQuery]: Query: Proc_CMS_SettingsKey_SelectGeneration: caused exception: Procedure or function Proc_CMS_SettingsKey_SelectGeneration has too many arguments specified.]
CMS.DataProviderSQL.DataConnection.ExecuteReader(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, CommandBehavior commandBehavior) +485
CMS.SettingsProvider.SqlHelperClass.ExecuteReader(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, CommandBehavior commandBehavior, IDataConnection conn) +196
CMS.SettingsProvider.SettingsKeyProvider.LoadGenerationReader(Int32 generation, Object parameter) +234
CMS.SettingsProvider.ProviderDictionaryCollection.LoadGeneration(Int32 generation) +139
CMS.SettingsProvider.ProviderDictionary`2.LoadNextGeneration() +40
CMS.SettingsProvider.ProviderStringDictionaryTemplate`1.Contains(String key, ValueType& value) +245
CMS.SettingsProvider.SettingsKeyProvider.GetValue(String siteName, String globalKeyName) +443
CMS.SettingsProvider.SettingsKeyProvider.GetBoolValue(String keyName) +97
CMS.SettingsProvider.DebugHelper.get_DebugDisabled() +61
CMS.SettingsProvider.DebugHelper.GetDebugBoolSetting(String keyName, Boolean defaultValue) +17
CMS.SettingsProvider.DebugHelper.get_DebugEverythingEverywhere() +51
CMS.SettingsProvider.DebugHelper.get_DebugEverything() +50
CMS.SettingsProvider.DebugHelper.GetDebugBoolSetting(String keyName) +222
CMS.GlobalHelper.CacheHelper.get_DebugCache() +49
CMS.CMSHelper.CMSContext.get_AnyDebugEnabled() +56
CMSFunctions.get_AnyDebugEnabled() +9
CMSAppBase.FirstRequestInitialization(Object sender, EventArgs e) +315
CMSAppBase.BeforeBeginRequest(Object sender, EventArgs e) +125
CMSAppBase.CMSBeginRequest(Object sender, EventArgs e) +16
CMS.CMSHelper.CMSApplicationModule.app_BeginRequest(Object sender, EventArgs e) +35
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171

Version Information: Microsoft .NET Framework Version:2.0.50727.5448; ASP.NET Version:2.0.50727.5456

Any ideas why?

Thank you,
Dimitris

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 4/29/2012 12:18:07 PM
   
RE:Problem after migrating a website to another server
Hi,

Have you tried to enable the debug mode as it is mentioned in the error message and in this blog post so we can see where it is coming from?

Are you able to reproduce the issue again?

Best regards,
Juraj Ondrus

User avatar
Certified Developer 8
Certified Developer 8
liquidmagic - 4/30/2012 4:31:15 PM
   
RE:Problem after migrating a website to another server
Hello,

it happens randomly on all pages. Right now it happens on all pages (even on CMS Desk and Site Manager). So, I can't debug it.

Any ideas on what to look if this starts working?

Dimitris

User avatar
Kentico Support
Kentico Support
kentico_radekm2 - 5/2/2012 2:42:45 AM
   
RE:Problem after migrating a website to another server
Hello.

You can still enable debug in your web.config file, so we could see more details then:

Add the following section to the configuration file of your application:
<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>

I have found the same issue in our ticket history, and the problem was solved by customer himself, when he realized what was the problem: "There was a mixup between the db backups we were making."

Could you please check that this is not your case, too? Thank you.

Best Regards,
Radek Macalik

User avatar
Certified Developer 8
Certified Developer 8
liquidmagic - 5/3/2012 2:06:17 AM
   
RE:Problem after migrating a website to another server
Hello,

I will add debugging and check.

Did he mention the way it was solved?

Thank you,
Dimitris

User avatar
Kentico Support
Kentico Support
kentico_radekm2 - 5/3/2012 2:54:37 AM
   
RE:Problem after migrating a website to another server
Hello.

All he wrote (and it is kind of description what was wrong) is:

...
There was a mixup between the db backups we were making.
...

Best Regards,
Radek Macalik

User avatar
Certified Developer 8
Certified Developer 8
liquidmagic - 5/3/2012 3:01:44 AM
   
RE:Problem after migrating a website to another server
Hello,

not very helpful...

The thing is that we are getting this randomly. We will try to restore it from another backup set.

Thank you,
Dimitris

User avatar
Kentico Support
Kentico Support
kentico_radekm2 - 5/3/2012 4:09:33 AM
   
RE:Problem after migrating a website to another server
Hello.

I see. I will be waiting for your update.

Best Regards,
Radek Macalik