This was working fine in my visual studio development environment and web server (Visual Studio 2010). Upon deploying to our Windows Server 2008R2 environment we were receiving a strange startup error that took awhile to iron out.
[ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed.]
System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) +109
Umbraco.Core.Persistence.Database.CommonConstruct() +60
Umbraco.Core.Persistence.UmbracoDatabase..ctor(String connectionStringName) +67
Umbraco.Core.Persistence.DefaultDatabaseFactory.CreateDatabase() +426
Umbraco.Core.Persistence.UnitOfWork.PetaPocoUnitOfWorkProvider.GetUnitOfWork() +26
Umbraco.Core.Services.ContentService.GetRootContent() +53
Umbraco.Core.Services.ContentService.RePublishAllDo(Boolean omitCacheRefresh, Int32 userId) +149
Project.Name.Web.Global.OnApplicationStarted(Object sender, EventArgs e) in c:\TeamCity\buildAgent\work\7a66fe180416e6cb\Project.Name.Web\Global.asax.cs:33 Umbraco.Core.CoreBootManager.Complete(Action`1 afterComplete) +62
Umbraco.Web.WebBootManager.Complete(Action`1 afterComplete) +31
My guess is the database isn't spooled up yet. But the error message can lead you on a wild goose chase if you aren't careful.
I will be switching to the ApplicationEventHandler instead but just wanted you to be aware of the issue. It's strange that the code works FINE in development but breaks in IIS. If you want more details please let me know and I'll be happy to provide them.
V6 Global.asax Issues - Implementing UmbracoApplication
To some previous documentation I found somewhere (my apologies, don't remember where!) I was implementing this global class
global.asax
global.asax.cs
This was working fine in my visual studio development environment and web server (Visual Studio 2010). Upon deploying to our Windows Server 2008R2 environment we were receiving a strange startup error that took awhile to iron out.
My guess is the database isn't spooled up yet. But the error message can lead you on a wild goose chase if you aren't careful.
I will be switching to the ApplicationEventHandler instead but just wanted you to be aware of the issue. It's strange that the code works FINE in development but breaks in IIS. If you want more details please let me know and I'll be happy to provide them.
IApplicationEventHandler doesn't give any resolution either, this function call still causes issue
I am going to compile umbraco 6 locally to provide more detail.
Upon further investigation I made a very trivial error! In my Staging web config transform I made a typo during copy and paste.
After changing this to SqlClient all is well. Sorry for the false report!
is working on a reply...