More in this section

Forums / Developing with Sitefinity / tag editor and RPC error

tag editor and RPC error

9 posts, 0 answered
  1. Kameo
    Kameo avatar
    13 posts
    Registered:
    23 Feb 2006
    23 Jan 2009
    Link to this post
    I am running Sitefinity 3.5 sp1 community with MS SQL 2005 as the database.
    I get this error when trying to edit the content of my custom module based on the Generic Content module:

    Exception Type: System.Data.SqlClient.SqlException

    Message: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Too many parameters were provided in this RPC request. The maximum is 2100.

    I noticed that the error seems to happen when the Tag information is being pulled up so I removed the Tag editor control from my ControlPanelEdit.ascx page and the error goes away.  I think the problem is that I have too many tags somehow ( I only have 180 but I didn't get this error until I was very deep into the content entry for the site.) 

    Has anyone run into this problem before with too many tags? is there a workaround? 

    I think the best solution for me would be to write my own tag editor that doesn't display all the existing tags but I'm not sure how to go about doing that since I use the default TagEditor.ascx control.  Could someone please point me in the right direction for creating a custom TagEditor?  

  2. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    26 Jan 2009
    Link to this post
    Hello Kameo,

    The problem is in our system. We are ready to assist you until you resolve this. Could you please provide us with the exact stack trace? We will prepare a fix and will send it to you.

    Best wishes,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Kameo
    Kameo avatar
    13 posts
    Registered:
    23 Feb 2006
    26 Jan 2009
    Link to this post
    Hi Georgi,
    I don't know how to make the trace show up nicely so here it is.

    Thanks,
    -kameo

    [SqlException (0x80131904): The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Too many parameters were provided in this RPC request. The maximum is 2100.]
       System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +925466
       System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800118
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186
       System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932
       System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +31
       System.Data.SqlClient.SqlDataReader.get_MetaData() +62
       System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297
       System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1005
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
       System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +122
       System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +12
       System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() +9
       Nolics.ORMapper.DataProviders.SQLBlockBuilder.EndStatement(SQLCommandEventArgs args, DataRow row) +389
       Nolics.ORMapper.DataProviders.SQLBlockBuilder.EmitQuery(StmtContext context, DataRow queryData, Int32 maxRows, String groupName) +1416
       Telerik.Cms.Engine.Data.Providers.GCSql2005Builder.EmitQuery(StmtContext context, DataRow queryData, Int32 maxRows, String groupName) +209
       Nolics.ORMapper.DataProviders.SQLBlockBuilder.ExecuteQuery(StmtContext context, DataRow queryData, Int32 maxRows, String group) +106
       Nolics.ORMapper.DataProviders.SQLDataProvider.ExecQuery(DataSet queries) +519
       Nolics.ORMapper.Base.QueryBase`1.LoadQuery(Int32 maxElements, Int32 fromElement) +275
       Nolics.ORMapper.Base.QueryBase`1.LoadAll() +20
       Telerik.Cms.Engine.Data.Providers.DefaultProvider.GetTags(String owner, String sortExpression, Boolean incldueZeroContentTags) +459
       Telerik.Cms.Engine.ContentManager.GetTags(String owner, String sortExpression, Boolean includeZeroContentTags) +74
       Telerik.Cms.Engine.WebControls.Tags.TagEditor.BindMyTags() +52
       Telerik.Cms.Engine.WebControls.Tags.TagEditor.CreateChildControls() +2857
       System.Web.UI.Control.EnsureChildControls() +87
       System.Web.UI.Control.PreRenderRecursiveInternal() +50
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
  4. Kameo
    Kameo avatar
    13 posts
    Registered:
    23 Feb 2006
    29 Jan 2009
    Link to this post
    So is this really a bug with the system?  Any ideas on a work around or should I start writing my own tag editor?
  5. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    29 Jan 2009
    Link to this post
    Hi Kameo,

    Here is a fix for the News Provider. You should do the same for all Generic Content based providers you need, the approach is absolutely the same:

    1. Copy the attached NewsProviderFix.cs file in the App_Code folder of your site. It contains a NewsProviderFix class, which overrides the default News data provider:
    using System; 
    using System.Collections; 
    using System.Collections.Generic; 
    using Nolics.ORMapper.Base; 
    using Telerik.Cms.Engine; 
    using Telerik.Cms.Engine.Data; 
    using Telerik.News.Data; 
     
    /// <summary> 
    /// Summary description for NewsProviderFix 
    /// </summary> 
    public class NewsProviderFix : DefaultNewsProvider 
        // Fix a possible error "The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Too many parameters were provided in this RPC request. The maximum is 2100." for tags 
        public override IList GetTags(string owner, string sortExpression, bool incldueZeroContentTags) 
        { 
            TagsQuery dQuery = new TagsQuery(); 
            dQuery.Provider = this.odbProvider; 
            if (!String.IsNullOrEmpty(sortExpression)) 
                dQuery.OrderBy = sortExpression; 
            dQuery.AndCondition("Application", QueryCondition.EQ, this.Application); 
     
            if (!String.IsNullOrEmpty(owner)) 
            { 
                TaggedContentQuery userTagsQuery = new TaggedContentQuery(); 
                userTagsQuery.Provider = this.odbProvider; 
                userTagsQuery.AndCondition("Application", QueryCondition.EQ, this.Application); 
                if (!String.IsNullOrEmpty(owner)) 
                    userTagsQuery.AndCondition("Owner", QueryCondition.EQ, owner); 
                userTagsQuery.LoadAll(); 
     
                userTagsQuery.ForEach(delegate(TaggedContent taggedContent) 
                      { 
                          Tag tag = taggedContent.Tag_lnk; 
                          if (tag != null && !dQuery.Contains(tag)) 
                          { 
                              dQuery.Add(taggedContent.Tag_lnk); 
                          } 
                      }); 
            } 
            else 
            { 
                dQuery.LoadAll(); 
            } 
             
            IList filteredTags = new List<Tag>(); 
            if (!incldueZeroContentTags) 
            { 
                foreach (Tag tag in dQuery) 
                { 
                    if (tag.TaggedContent.Count > 0) 
                    { 
                        filteredTags.Add(tag); 
                    } 
                } 
                return filteredTags; 
            } 
            return dQuery; 
     
        } 
     


    2. Web.config changes:
    <telerik> 
      ... 
        <cmsEngine defaultProvider="Generic_Content"
            <providers> 
          ... 
                <add name="News" ... type="NewsProviderFix, App_Code"/> 
            </providers> 
     

    The custom provider also includes a fix for a similar issue with comments.
    Sorry for the inconvenience.

    All the best,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Kameo
    Kameo avatar
    13 posts
    Registered:
    23 Feb 2006
    29 Jan 2009
    Link to this post
    Thank you! It worked. 

    Best,
    -kameo
  7. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    30 Jan 2009
    Link to this post
    Hello Kameo,

    I am glad everything is fine.
    Don't hesitate to contact us if you have other questions.

    Greetings,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  8. jan
    jan avatar
    3 posts
    Registered:
    30 Jul 2008
    02 Jul 2010
    Link to this post
    Hi,

    Is this issue fixed in the v3.7 SP3 release?  We're currently using v3.2 and followed this article to allow comments on News articles:

    http://www.sitefinity.com/devnet/kb/sitefinity-3-x/how-to-enable-comments-in-the-news-module.aspx

    Public end does work so users can submit comments.  But, in the admin, when we try to administer the News Comments, we get this error:

    The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Too many parameters were provided in this RPC request. The maximum is 2100.


    We tried to use your patch, but since we have .vb code in our App_Code folder, it's having conflicts. 

    Thanks.

    Jan
  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    02 Jul 2010
    Link to this post
    Hello jan,

    The problem has been fixed in 3.6. If you want you can upgrade. We have sorted out other issues there and improved the performance. You could also use the temp fix provided above in the post.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
9 posts, 0 answered