+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / sf_SecPermissions has too many arguments

sf_SecPermissions has too many arguments

9 posts, 0 answered
  1. Randel
    Randel avatar
    50 posts
    Registered:
    30 Aug 2012
    13 Oct 2008
    Link to this post

    I've updated my projects from Sitefinity V3.2 to V3.5 and have now been starting to get this error, posted below.  I thought the update went ok and started adding HTML content to some Generic Content controls, HTML also posted below.   

    Project Details

    I have four projects configured to use a shared database.  Currently, there are two master pages which are used to build my Templates: Home.masterpage and Site.masterpage.  All but the default home page use Site.masterpage; the default home page uses the Home.masterpage.  

    What I was doing before this error started popping up

    I was working on adding controls and HTML content via Sitefinity’s admin tool.  I started adding the below HTML code to a Generic Content control, located on the default page.  After that gave me the error, I attempted to add it to the Home Template.

    Now if I attempt to get into any of the four project’s admin sites, I get this error.  Other then attempting to get into the database via Microsoft SQL Server Management Studio, I’m at a lost how to fix this. 

    Does anyone have any idea?

     

    Server Error in '/WisDairyCMS.Consumer' Application.


    Procedure or function sf_SecPermissions 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 sf_SecPermissions has too many arguments specified.

    Source Error:

    Line 108:

    Line 109:              PagePermission pagePerm = new PagePermission(manager.GetRootPage(), PageRights.View);

    Line 110:              bool canViewPages = pagePerm.CheckDemand();

    Line 111:

    Line 112:        if (!canViewPages)


    Source File: c:\Workspaces\WMMB\WisDairyCMS.Consumer\trunk\Sitefinity\Admin\Default.aspx.cs    Line: 110

    Stack Trace:

    [SqlException (0x80131904): Procedure or function sf_SecPermissions has too many arguments specified.]

       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.ExecQueryProcedure(StmtContext context, DataRow queryData) +550

       Nolics.ORMapper.DataProviders.SQLBlockBuilder.ExecuteQuery(StmtContext context, DataRow queryData, Int32 maxRows, String group) +62

       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.Security.Data.DefaultSecurityProvider.GetPermissions(ISecured securedObject, String roleProvider) +226

       Telerik.Security.SecurityManager.GetPermissions(ISecured securedObject, String roleProvider) +14

       Telerik.Cms.Data.RootPage.GetPermissions(String roleProvider) +153

       Telerik.Cms.Data.RootPage.GetPermission(String roleProvider, String[] roles) +31

       Telerik.Security.Permissions.ApplicationPermission.CheckDemand() +423

       Admin_Default.hintsPanel_DataBound(Object sender, EventArgs e) in c:\Workspaces\WMMB\WisDairyCMS.Consumer\trunk\Sitefinity\Admin\Default.aspx.cs:110

       System.Web.UI.WebControls.BaseDataBoundControl.OnDataBound(EventArgs e) +86

       System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +137

       System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +29

       System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149

       System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70

       Admin_Default.Page_Load(Object sender, EventArgs e) in c:\Workspaces\WMMB\WisDairyCMS.Consumer\trunk\Sitefinity\Admin\Default.aspx.cs:188

       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15

       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33

       System.Web.UI.Control.OnLoad(EventArgs e) +99

       Telerik.Cms.Web.AdminPage.OnLoad(EventArgs e) +58

       Admin_Default.OnLoad(EventArgs e) in c:\Workspaces\WMMB\WisDairyCMS.Consumer\trunk\Sitefinity\Admin\Default.aspx.cs:69

       System.Web.UI.Control.LoadRecursive() +47

       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436

     


    Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433 

     

     

    HTML CODE

    <div>
      <div>
        <strong>Featured Content</strong>
        <div>
          <img alt="110x75"
     
              sfref="~/Libraries/Test_Images/110x75.sflb.ashx" 
               src="/WisDairyCMS.Consumer/Libraries/Test_Images/110x75.sflb.ashx" />
        </div>
        <div>
          <div>
            <strong>Cheese of the Month</strong>
          </div>
          <div>
            This copy is for placement only and will be replaced at a later time.  It will be seriously awesome.
          </div>
          <div>
            <a href="%7E/default.aspx">read more</a>
          </
    div>
        </div>
      </div>
      <br/>
      <div>
        <div>
          <img alt="110x75" 
              
    sfref="~/Libraries/Test_Images/110x75.sflb.ashx"
               src="/WisDairyCMS.Consumer/Libraries/Test_Images/110x75.sflb.ashx" />
        </div>
        <div>
          <div>
            <strong>Featured Recipe</strong>
          </div>
          <div>
            This copy is for placement only and will be replaced at a later time.  It will be seriously awesome.
          </div>
          <div>
            <a href="%7E/default.aspx">read more</a>
          </div>
        </div>
      </div>
      <br/>
      <div>
        <div>
          <img alt="110x75" 
               sfref="~/Libraries/Test_Images/110x75.sflb.ashx" 
               src="/WisDairyCMS.Consumer/Libraries/Test_Images/110x75.sflb.ashx" />
        </div>
        <div>
          <div>
            <strong>Wine &amp; Cheese Pairing</strong>
          </div>
          <div>
            This copy is for placement only and will be replaced at a later time.  It will be seriously awesome.
          </div>
          <div>
            <a href="%7E/default.aspx">read more</a>
          </div>
        </div>
      </div> 
      <div>
        <strong>Featured Videos</strong>
        <div>
          <img alt="250x175"
               sfref="~/Libraries/Test_Images/250x175.sflb.ashx"
               src="/WisDairyCMS.Consumer/Libraries/Test_Images/250x175.sflb.ashx" />
        </div>
        <div>
          <div>
            <strong>Cheesey Stuffed Shells</strong>
            <strong>25Mins</strong>
          </div>
          <div>
            This copy is for placement only and will be replaced at a later time.  It will be seriously awesome.
            <br/>
            <a href="%7E/default.aspx">readmore</a>
          </div>
        </div>
      </div>
      <div>
        <strong>Downloads</strong>
        <ul>
          <li>
            <strong>Traveler's Guide to American's Dairyland</strong>
            <br/>
            The map lists Wisconsin cheese plant tours and cheese retail locations around the state.
          </li>
          <li>
            <strong>Cheese Variety Guide</strong>
            <br/>
            Do you love cheese but you're not familiar with a particulare cheese variety?  Refer to this handy guide for 33 popular cheese varieties from Wisconsin.
          </li>
          <li>
            <strong>Wisconsin Master Cheesemaking Directory</strong>
            <br/>
            Request this guide to help you learn more about these cheesemakers and how to contact them.
          </li>
        </ul>
        <div>
          <div>
            <img alt="85x60" 
                 sfref="~/Libraries/Test_Images/85x60.sflb.ashx" 
                 src="/WisDairyCMS.Consumer/Libraries/Test_Images/85x60.sflb.ashx" />
          </div>
          <div>
            <strong>WMMB NEWSLETTER</strong>
            <input id="EmailAddress" type="text" />
            <input id="SignUp" type="button" value="SIGN-UP" />
          </div>
        </div>
      </div>
    </div>

  2. Randel
    Randel avatar
    50 posts
    Registered:
    30 Aug 2012
    13 Oct 2008
    Link to this post
    Ok, if I restart my computer, I can sign-in and things work for a while.  But after a short while, I get this error again and cannot sign-in to do anything.

    Can someone please help me with this?
  3. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    14 Oct 2008
    Link to this post
    Hello Randel,

    Do you have several instances of Sitefinity (with different versions) attached to the same database?
    The error could be raised only if the database is upgraded and downgraded consequently. Here is the example:

    1. You run an the 3.5 project, which is upgrading your database.
    2. Someone else (or you) run 3.2SP2 version, with the same database. The database itself is being downgraded.
    3. At this time, you try to edit or change something withing the 3.5 version. We have changed the stored procedure that fails in the 3.5 - it is with more parameters indeed. The error shows actually that your database is not upgraded.

    Could you please check which is the exact database version in the moment when the error occurs? You could check this in the table sf_SecVariables  from the database.

    We hope this helps.

    Regards,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  4. Randel
    Randel avatar
    50 posts
    Registered:
    30 Aug 2012
    14 Oct 2008
    Link to this post
    Georgi,

    Thanks for the information and I do think this may be the issue.  I'll try and get everyone updated to 3.5 as soon as I can.  Onces everyones up to 3.5 I'll see if the issue continues.
  5. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    15 Oct 2008
    Link to this post
    Hello Randel,

    Thank you for the follow-up. We think that you will have no problems if all projects are with one version.

    Best wishes,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Nauman
    Nauman avatar
    35 posts
    Registered:
    28 Jul 2008
    06 May 2009
    Link to this post
    Hi Georgi 

    I have the same issue as you told already, i have a website in Sitefinity 3.5 with data in table sf_SecVariables
    _ SchemaVersion 1747

    and i am testing news api on my test project which contains webconfig settings of  Sitefinity 3.6 . In test project i  changed the database settings to   my 3.5 project which crash my website
    now in database it show me this schema version
    _ SchemaVersion 1870
     
    On admin side i am getting error
    Server Error in '/' Application. 
    Procedure or Function 'sf_SecPermissions' expects parameter '@P_RoleProvider', which was not supplied. 
    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 'sf_SecPermissions' expects parameter '@P_RoleProvider', which was not supplied. 
     
    Source Error: 
     


    On the website i am getting error

     Object reference not set to an instance of an object. 
    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.NullReferenceException: Object reference not set to an instance of an object. 
     
    Source Error: 
     
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 
     
    Stack Trace: 
     
    [NullReferenceException: Object reference not set to an instance of an object.] 
       Nolics.ORMapper.DataProviders.SQLDataProvider.ParseResult(Int32 fromRow, Int32 maxRows, DataSet dsResult, IDataReader rd) +490 
       Nolics.ORMapper.DataProviders.SQLDataProvider.ExecuteKeyQuery(DataSet queries, Boolean fPrimaryKey) +262 
       Nolics.ORMapper.DataProviders.SQLDataProvider.QueryByPrimaryKey(DataSet keys) +7 
       Nolics.ORMapper.Base.PrimeryKeyQuery.LoadPKQuery() +38 
       Nolics.ORMapper.Base.OdbClass.LoadByPrimaryKey(IOdbClass primaryKey, OdbDataProvider provider, ObDataCache cache) +79 
       Telerik.Cms.Data.PageBase.get_CurrentLanguageVersion() +127 
       Telerik.Cms.Data.PageBase.get_MasterPage() +4 
       Telerik.Cms.Web.InternalPage.OnPreInit(EventArgs e) +370 
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +66 

    Can you please tell me urgently how i can solve this issue.

    Many thanks

  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    06 May 2009
    Link to this post
    Hello Nauman,

    The problem is due to the reason you have connected the both project to the same database - there are two different values of the SchemaVersion. Thus, one of the projects constantly upgrades the database while the another performs downgrade. This results in the stored procedure which are not found.

    If you are going to test you can backup the database of the current project, create a new database, restore the backup and attach the test project, so that the database will be upgraded/downgraded to the current project version.


    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  8. Nauman
    Nauman avatar
    35 posts
    Registered:
    28 Jul 2008
    06 May 2009
    Link to this post
    Hi  Ivan Dimitrov

    I really appreciate your instant help and i followed your steps and it worked well.


    Many Thanks
    Nauman Ahmed
  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    06 May 2009
    Link to this post
    Hello Nauman,

    Always glad to help to the community!

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Register for webinar
9 posts, 0 answered