After Reinstall: The ConnectionString property has not been initialized.
Problem reported by Tim Winkelmann - 4/10/2019 at 2:28 AM

I am reinstalling my dev environment of SmarterTrack. (old: build 6957. new: build 7034).
I am switching from a MySQL to an SQL Server database, and as such I decided to uninstall SmarterTrack completely, and install the last one anew (I don't care about the configuration or the data, it is all test data).

If I just uninstall SmarterTrack from the Windows Programs list, then install it again, the IIS Express Website "SmarterTrack" still exists.
If I choose to reuse it, the installation completes fine.
But I then get the following error when trying to load any page at http://loalhost:9996:

[InvalidOperationException: La propriété ConnectionString n'a pas été initialisée.]   System.Data.SqlClient.SqlConnection.PermissionDemand() +7117877   System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection) +30   System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +312   System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) +202   System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +413   System.Data.SqlClient.SqlConnection.Open() +128   SmarterTrack.Data.DataLayerShortcut.ExecuteScalar(IDbConnection& conn, String query, IDbDataParameter[] parameters) +504   SmarterTrack.Data.DataLayerShortcut.ExecuteScalar(String query, IDbDataParameter[] parameters) +50   SmarterTrack.Data.UserEntity.GetActivatedAgentCount(Boolean ignoreCache) +376   SmarterTrack.HelperClasses.Licensing.SmarterTrackLicense.ValidateLicense(LicenseDetailsBase data) +76   SmarterTrack.HelperClasses.Licensing.SmarterTrackLicense.GetEffectiveLicense() +21   SmarterTrack.HelperClasses.Security.PortalUserInfo.VerifyAuthenticationCookie(HttpContext context, String& Message) +253   SmarterTrack.MRS.Global.Application_PostAuthenticateRequest(Object sender, EventArgs e) +230   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
Version information : Version Microsoft .NET Framework :4.0.30319; Version ASP.NET :4.7.3282.0

So I decided to purge the IIS Website from all config files I could find (mainly C:\Windows\System32\inetsrv\Config\applicationHost.config)
, and create a new one from the SmarterTrack installer. I was able to do that, but it didn't fix the error.

I made sure to delete all remaining config files from SmarterTrack, but no difference.

I decided to completely remove IIS Express (v. 10) from my system (from the Windows Programs list). It didn't fix the error.

(I restarted my computer between each tests)

What's wrong here ? I understand the database configuration is incorrect, but I cannot access http://localhost:9996/Management/Settings/frmSetupWizard.aspx to reconfigure it like I was able to do the very first time I installed SmarterTrack (that page also returns the error above).

What should I do ?
Thanks in advance

Tim Winkelmann

2 Replies

Reply to Thread
Andrew Barker Replied
Employee Post Marked As Resolution
This generally happens if your browser still has an authentication cookie for the website. You should be able to get around the issue by either clearing cookies from your browser, or by using something like Chrome's incognito mode.

Andrew Barker
Software Developer
SmarterTools Inc.
(877) 357-6278

Tim Winkelmann Replied

Thanks for your answer. That solved it.
I should have tried that out, but I though the problem was with the install, I wasn't thinking about the browser.
It's quite the ugly error. Throwing an "Invalid cookie" or something would have made solving this issue instantaneous.

Best regards

Reply to Thread