Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Owen Blacker 19 posts 91 karma points
    Feb 20, 2020 @ 14:52
    Owen Blacker
    0

    SqlException for icUrlTracker on first request

    We have a curious problem with our (new) Umbraco 7.14.0 site.

    Every time the HttpApplication restarts (such as when we change the Web.config), the first request produces a SqlException with the message

    Cannot find the object "icUrlTracker" because it does not exist or you do not have permissions.

    Making a new request (by reloading the page, for example), makes the problem go away, so presumably there isn't actually a problem with the database permissions. The user in question has a server role of public and is a member of db_datareader, db_datawriter and public for the database in question.

    The stack trace follows:

    [SqlException (0x80131904): Cannot find the object "icUrlTracker" because it does not exist or you do not have permissions.]
    System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +3306108
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +736
    System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4061
    System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite) +1293
    System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +421
    System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +380
    Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) +82
    umbraco.DataLayer.SqlHelpers.SqlServer.SqlServerHelper.ExecuteNonQuery(String commandText, SqlParameter[] parameters) +198
    umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters) +114

    [SqlHelperException: Umbraco Exception (DataLayer): SQL helper exception in ExecuteNonQuery]
    umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters) +303
    InfoCaster.Umbraco.UrlTracker.Repositories.UrlTrackerRepository.UpdateUrlTrackerTable() in D:\kipusoep\Documents\GitHub\UrlTracker\Repositories\UrlTrackerRepository.cs:461 InfoCaster.Umbraco.UrlTracker.Modules.UrlTrackerModule.CheckUrlTrackerInstalled() in D:\kipusoep\Documents\GitHub\UrlTracker\Modules\UrlTrackerModule.cs:81 InfoCaster.Umbraco.UrlTracker.Modules.UrlTrackerModule.Context_PostResolveRequestCache(Object sender, EventArgs e) in D:\kipusoep\Documents\GitHub\UrlTracker\Modules\UrlTrackerModule.cs:49 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +139 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +195 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +88

  • Marc Goodson 1451 posts 9716 karma points MVP 5x c-trib
    Feb 20, 2020 @ 15:59
    Marc Goodson
    100

    Hi Owen

    When Umbraco starts up the UrlTracker 3rd party plugin tries to query it's database table, 'icUrlTracker' to put into cache a list of redirects that are flagged as 'forced'... and this is where the error occurs, subsequent requests to your site won't trigger UrlTracker to try to make the request to the database, as it will be reading from it's cache... which will be empty... as it didn't retrieve anything. So the fact it loads ok on the second request isn't necessarily proof that permissions aren't a problem... as UrlTracker isn't trying to access the database on the second request.

    so ...

    Do you have the UrlTracker plugin installed on your site? Does your database table have the icUrlTracker db table in it? If so, who owns that table eg dbo.icUrlTracker? Does the account under which the site accesses SQL Server have the permissions to read from that table... Does the UrlTracker dashboard perform correctly in the backoffice when you manually try to create a redirect?

    If that helps on your debug path?

    regards

    Marc

  • Owen Blacker 19 posts 91 karma points
    Feb 20, 2020 @ 16:37
    Owen Blacker
    0

    Aha, that makes sense. Thank you Marc.

    I'm bemused why the permissions were a problem (because the same user was having no problem writing to other tables), but explicitly providing permissions for the user to act upon the table icUrlTracker has resolved the problem.

    Thanks again!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies