Ooops! Tutto questo รจ imbarazzante!
La query con parametri '(@lg int,@lgDef int,@terms nvarchar(4000)) exec dbo.usp_SearchRa' prevede il parametro '@terms', che non è stato specificato.

in System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) in System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) in System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() in System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) in System.Data.SqlClient.SqlDataReader.ConsumeMetaData() in System.Data.SqlClient.SqlDataReader.get_MetaData() in System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) in System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) in System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) in System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) in System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) in System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) in System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) in System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) in System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) in System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) in Websolute.BOMCore.DAL.cDataAccessLayer.Fill(String SQL, IDictionary`2 Parameters, String dtName) in Websolute.BOM.FrontEnd.Core.SQLHelper.Fill(String SQL, Dictionary`2 p) in Websolute.BOM.FrontEnd.Core.SQLHelper.FillByQueryName(enQueries Query, Dictionary`2 p) in SearchResult.SearchByTerms(String terms) in ASP._Page_template_search_cshtml.Execute() in d:\Inetpub\vs\scavolini_2012\Template\search.cshtml:riga 4 in System.Web.WebPages.WebPageBase.ExecutePageHierarchy() in System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) in System.Web.WebPages.WebPage.ExecutePageHierarchy() in System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) in System.Web.WebPages.WebPageBase.<>c__DisplayClass7.<RenderPageCore>b__6(TextWriter writer) in System.Web.WebPages.HelperResult.WriteTo(TextWriter writer) in System.Web.WebPages.WebPageBase.Write(HelperResult result) in ASP._Page_viewdoc_cshtml.Execute() in d:\Inetpub\vs\scavolini_2012\ViewDoc.cshtml:riga 45 in System.Web.WebPages.WebPageBase.ExecutePageHierarchy() in System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) in System.Web.WebPages.WebPage.ExecutePageHierarchy() in System.Web.WebPages.StartPage.RunPage() in ASP._Page__PageStart_cshtml.Execute() in d:\Inetpub\vs\scavolini_2012\_PageStart.cshtml:riga 5