Hi,
DNN 4.9.3
IIS 7
Win Server 2008
semi-dedicated server in shared hosting environment
Live and Test running on same server
When running the Scheduler in Test, the history shows that it is trying to run a process against the Live DB(!), even though there is no reference to the Live DB in web.config (or elsewhere that I can find). Fortunately the SQL Test credentials don't have access to the live DB, so it errors.
Here's the error message fromm Schedule History:
Kola.WF.Scheduler, BookPal_WFSchedulerWF Scheduler failed. System.Data.SqlClient.SqlException: The server principal "lpdf123h" is not able to access the database "aspndb" under the current security context. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at
...
at DotNetNuke.Data.SqlDataProvider.ExecuteNonQuery(String ProcedureName, Object[] commandParameters) at Kola.WF.Scheduler.AssignProducers() at Kola.WF.Scheduler.DoWork()
Now 'aspndb' is the Live DB. 'aspnDevdb' is the Test DB.
Everything else in the site works with 'aspnDevdb'.
As we want Test to match live, we copied the directory and updated web.config. Two of us have tripple-checked web.config, and it only references 'aspnDevdb'.
I've tried combinations of 'Clear Cache', 'Restarted Application', restarting the Scheduler, disabling/enabling the scheduled task... all to no avail.
Here's the code of AssignProducers():
Friend Sub AssignProducers()
'run stored procedure to add to producer to-do lists where the customer has satisfied the WF's criteria
'Create PortalId parameter
Dim myParam As SqlParameter = New SqlParameter("@portal", SqlDbType.Int)
myParam.Value = 0 'DotNetNuke.Entities.Portals.PortalController.GetCurrentPortalSettings.PortalId
'Execute Stored Procedure
DataProvider.Instance().ExecuteNonQuery("WF_Sched_AssignProducersSp", myParam)
End Sub
The module runs sweet in Live.
Any thoughts?
Cheers,
Kent