Deployment to Azure via Github

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
Hi,

I'm a total newbee to NopCommerce. But I have deployed websites to azure via github before.

In this instance I downloaded nopcommerce source and got it to run locally. However I used a Azure sql server as the backend. Now I wanted to push this to git hub and have my deployments automated.

The deployment to azure happened as expected. However when I run the web site I get the following error.

Exception information:

    Exception type: HttpException

    Exception message: No database instance
   at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app)
   at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
   at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
   at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
   at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)

No database instance
   at Nop.Data.Initializers.CreateTablesIfNotExist`1.InitializeDatabase(TContext context)
   at System.Data.Entity.Internal.InternalContext.<>c__DisplayClassf`1.<CreateInitializationAction>b__e()
   at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action)


I checked the App_Data\Settings.txt file and it is correctly pointing to the azure db with correct credential information. (Similar to the local copy I had with Visual Studio).

I've got no idea what I have done wrong. Any information would be appreciated. Thanks.
7 years ago
If you ever change Settings.txt in between, note that the first time you run nopCommerce, it caches Settings.txt. So if you ever change it, you need to restart app to get nopCommerce to re-read the file. :)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.