+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Telerik.DataAccess.ProviderDatabaseUpgradeException

Telerik.DataAccess.ProviderDatabaseUpgradeException

23 posts, 0 answered
  1. adds
    adds avatar
    8 posts
    Registered:
    10 Nov 2006
    03 Sep 2008
    Link to this post
    I have uploaded a sitefinity site to a shared hosting environement and copied the database (including the stored procedures) across after having made the changes to the web.config file so that it works in medium trust, however I receive the following error message:

    Telerik.DataAccess.ProviderDatabaseUpgradeException

    Stack trace:

    [ProviderDatabaseUpgradeException: Exception of type 'Telerik.DataAccess.ProviderDatabaseUpgradeException' was thrown.]
       Telerik.Cms.Data.DefaultProvider.Initialize(String name, NameValueCollection config) +1702
       Telerik.ManagerBase`1.InstantiateProvider(ProviderSettings providerSettings, Type providerType) +660
       Telerik.ManagerBase`1.InstantiateProvider(ProviderSettings providerSettings) +102
       Telerik.ManagerBase`1.SetProvider(String providerName) +201
       Telerik.ManagerBase`1..ctor(String providerName) +86
       Telerik.ManagerBase`1..ctor() +11
       Telerik.Cms.CmsManager..ctor() +5
       Telerik.Cms.Web.UrlHelper..cctor() +686

    [TypeInitializationException: The type initializer for 'Telerik.Cms.Web.UrlHelper' threw an exception.]
       Telerik.Cms.Web.CmsHttpModule.Init(HttpApplication context) +101
       System.Web.HttpApplication.InitModulesCommon() +66
       System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +1006
       System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +259
       System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +114
       System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +350


    Any ideas?
  2. Pepi
    Pepi avatar
    981 posts
    Registered:
    28 Oct 2016
    03 Sep 2008
    Link to this post
    Hi Adam,

    The reason for the exception is that the database is still not upgraded and the CmsManager provider is not initialized. Actually, this provider should be initialized on application start, which means that all database tables are not upgraded.

    Please make sure of the following:
        - The build versions of the ~/bin/Telerik.Cms.dll assemblies on your local project and production project are the same;
        - The value of the SchemaVersion variable is the third number of the ~/bin/Telerik.Cms.dll assemblies version in the sf_CmsVariables table in the database.

    Also, please note that the Sitefinity module providers cannot get their database objects created in medium trust
    environment and you may get errors. To prevent this, you need to enforce database upgrade in full
    trust environment, in your local Web server.

    Do let us know how it goes.

    Sincerely yours,
    Pepi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Janusz
    Janusz avatar
    3 posts
    Registered:
    02 Feb 2009
    08 May 2009
    Link to this post
    Hi there

    I am also getting this error.  My scenario is as follows.

    - I have created a local project.
    - The database is located on a remote server.
    - The local project works fine (full trust mode).
    - When trying to deploy to a shared server (medium trust, point to the same database server as my local project) I receive the above error.
    - When switching my local copy of the project to medium trust I then receive the error as mentioned above.

    Is there a way around this?


  4. Stoyanka Assenova
    Stoyanka Assenova avatar
    113 posts
    Registered:
    01 Dec 2016
    11 May 2009
    Link to this post
    Hello Janusz,

    You should download the attachment (zip file). Copy bin folder from zip file and paste in your project. Note the .NET version - you should take the bin directory for the version you need.

    If you have any problem, don't hesitate to contact us.

    Kind regards,
    Stoyanka Assenova
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Gema
    Gema avatar
    46 posts
    Registered:
    02 Oct 2009
    27 Jul 2010
    Link to this post
    Hi,
    I'm trying to deploy a sitefinity project in a shared server.
    I'm getting this error:
     

    Server Error in '/' Application.

    Exception of type 'Telerik.DataAccess.ProviderDatabaseUpgradeException' was thrown.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: Telerik.DataAccess.ProviderDatabaseUpgradeException: Exception of type 'Telerik.DataAccess.ProviderDatabaseUpgradeException' was thrown.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [ProviderDatabaseUpgradeException: Exception of type 'Telerik.DataAccess.ProviderDatabaseUpgradeException' was thrown.]
       Telerik.Cms.Data.DefaultProvider.Initialize(String name, NameValueCollection config) +2371
       Telerik.ManagerBase`1.InstantiateProvider(ProviderSettings providerSettings, Type providerType) +673
       Telerik.ManagerBase`1.InstantiateProvider(ProviderSettings providerSettings) +91
       Telerik.ManagerBase`1.SetProvider(String providerName) +203
       Telerik.ManagerBase`1..ctor(String providerName) +89
       Telerik.Cms.Web.UrlHelper.Initialize(CmsHttpModule cmsModule) +44
       Telerik.Cms.Web.CmsHttpModule.Init(HttpApplication context) +86
       System.Web.HttpApplication.InitModulesCommon() +65
       System.Web.HttpApplication.InitModules() +43
       System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +729
       System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +298
       System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107
       System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +289
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927

    I've followed the instructions:
     
     1. Disable page and module workflow *:

    <add connectionStringName="DefaultConnection" 
    allowPageHistory="false" 
    allowPageWorkflow="false" name="Sitefinity" 
    type="Telerik.Cms.Data.DefaultProvider, Telerik.Cms.Data" /> 
    … 
    <add name="Generic_Content" visible="True" defaultMetaField="Name" 
    securityProviderName="" allowLocalization="False" 
    allowVersioning="True" allowWorkflow="false 
    … 
    <add name="News" visible="False" defaultMetaField="Title" 
    securityProviderName="" allowLocalization="true" 
    allowWorkflow="false" 
    … 
    <add name="Blogs" visible="False" defaultMetaField="Title" 
    applicationName="/Blogs" allowVersioning="True" 
    allowLocalization="False" localizationProviderName="" 
    allowWorkflow="false" 
    … 

    2. Disable health monitoring:

    <healthMonitoring enabled="false" heartbeatInterval="0"

    3. Make sure the following lines are commented out:
    <!--add name="SitefinityXml" securityProviderName="" 
    type="Telerik.Lists.Data.XmlProvider, Telerik.Lists.Data" 
    dataFile="~/App_Data/Lists.xml" visible="true" /--> 


    But I still getting the error.

    Is there anything else that I have to do?

    Thank you.
  6. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    27 Jul 2010
    Link to this post
    Hello mgrp,

    Thank you for using our services.

    In the shared hosting environment you do not have permissions to perform database upgrade/downgrade. This is most probably because your shared hosting environment is set up to run either in Medium Trust or in modified Medium Trust. What you should do is to create the project on local environment, connect it to the database and open the back-end and create one content item in each module. Then ftp the website and a backup of the db to your host. There restore the db and fix the connection string to it in your website's web.config.


    Sincerely yours,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Gema
    Gema avatar
    46 posts
    Registered:
    02 Oct 2009
    27 Jul 2010
    Link to this post
    Hi again,
    I've done what you have said. In my local project, I´ve created one item in each module, then I´ve restored the backup of the db in the host server, but I still getting the same error.

    Why do sitefinity need a database upgrade?
    I don´t understand

    Thanks
  8. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    27 Jul 2010
    Link to this post
    Hi mgrp,

    It needs a database upgrade if the versions of Sitefinity which you have used on local and on the host are different. Make sure that you are using the same Sitefinity version on both websites. You can check the Sitefinity version by following the instructions in this article.

    Greetings,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  9. Gema
    Gema avatar
    46 posts
    Registered:
    02 Oct 2009
    27 Jul 2010
    Link to this post
    Both local and host server, are using the same version.

    Am I missing anything?
  10. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    27 Jul 2010
    Link to this post
    Hi mgrp,

    Can you check if the database in table sf_SecVariables has the SchemaVersion row has the same build number as the one Sitefinity assemblies on your host. For example if you are using Sitefinity 3.7 SP3 the SchemaVersion will be 2096 and Sitefinity assemblies should have version 3.7.2096.x.

    Also check if you have Community Edition on one environment and Standard Edition on the other.

    All the best,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  11. Gema
    Gema avatar
    46 posts
    Registered:
    02 Oct 2009
    27 Jul 2010
    Link to this post
    SchemaVersion in sf_SecVariables is 2096, and assemblies version is 3.7.2096.2 in both local and host server.
    According to the link you have post to check de sitefinity version, it is:

    Release Sitefinity 3.7 SP3
    3.7.2096.2 - standard
  12. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    27 Jul 2010
    Link to this post
    Hi mgrp,

    Can you try with commenting the bellow lines in the web.config:
    <section name="workflow" type="Telerik.Workflow.WorkflowSectionHandler, Telerik.Workflow" requirePermission="false"/>
    ...
    <healthMonitoring enabled="true" heartbeatInterval="0">
        <eventMappings>
            <add name="Simple Web Request Event" type="Telerik.Utilities.SimpleWebRequestEvent,Telerik.Framework"/>
            <add name="Code Benchmark Event" type="Telerik.Utilities.CodeBenchmarkEvent,Telerik.Framework"/>
        </eventMappings>
        <providers>
            <add name="Simple Web Event Provider" type="Telerik.Utilities.TextFileWebEventProvider,Telerik.Framework" logFileName="~/App_Data/sitefinity.log"/>
            <add name="Simple Web Buffered Event Provider" type="Telerik.Utilities.BufferedTextFileWebEventProvider,Telerik.Framework" bufferMode="Notification" logFileName="~/App_Data/sitefinity.log"/>
            <add name="Code Benchmark Provider" type="Telerik.Utilities.CodeBenchmarkTextFileProvider,Telerik.Framework" enabled="False" logFileName="~/App_Data/performance.log"/>
        </providers>
        <rules>
            <add name="SitefinityEventHandler" eventName="Simple Web Request Event" provider="Simple Web Event Provider" minInterval="00:00:00" minInstances="1" maxLimit="Infinite"/>
            <add name="SitefinityErrorHandler" eventName="All Errors" provider="Simple Web Event Provider" minInterval="00:00:00" minInstances="1" maxLimit="Infinite"/>
            <add name="SitefinityCodeBenchmarkHandler" eventName="Code Benchmark Event" provider="Code Benchmark Provider" minInterval="00:00:00" minInstances="1" maxLimit="Infinite"/>
        </rules>
    </healthMonitoring>
    ...
    <workflow deleteOnCompletion="true" defaultProvider="NolicsWorkflowProvider">
        <providers>
            <clear/>
            <add name="NolicsWorkflowProvider" connectionStringName="DefaultConnection" type="Telerik.Workflow.NolicsWorkflowProvider, Telerik.Workflow"/>
        </providers>
    </workflow>


    All the best,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  13. Gema
    Gema avatar
    46 posts
    Registered:
    02 Oct 2009
    27 Jul 2010
    Link to this post
    Hi Radoslav,
    I've commented the specified lines, but the error is still there
    Any other idea?

    Thanks
  14. Gema
    Gema avatar
    46 posts
    Registered:
    02 Oct 2009
    27 Jul 2010
    Link to this post
    All the text error

    Exception of type 'Telerik.DataAccess.ProviderDatabaseUpgradeException' was thrown.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: Telerik.DataAccess.ProviderDatabaseUpgradeException: Exception of type 'Telerik.DataAccess.ProviderDatabaseUpgradeException' was thrown.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [ProviderDatabaseUpgradeException: Exception of type 'Telerik.DataAccess.ProviderDatabaseUpgradeException' was thrown.]
       Telerik.Cms.Data.DefaultProvider.Initialize(String name, NameValueCollection config) +2371
       Telerik.ManagerBase`1.InstantiateProvider(ProviderSettings providerSettings, Type providerType) +673
       Telerik.ManagerBase`1.InstantiateProvider(ProviderSettings providerSettings) +91
       Telerik.ManagerBase`1.SetProvider(String providerName) +203
       Telerik.ManagerBase`1..ctor(String providerName) +89
       Telerik.Cms.CmsWorkflowService..ctor() +32
       Telerik.Cms.CmsWorkflowService..cctor() +21
    
    [TypeInitializationException: The type initializer for 'Telerik.Cms.CmsWorkflowService' threw an exception.]
       Telerik.Cms.CmsWorkflowService.Initialize() +0
       Telerik.Cms.CmsManager.OnInitialized() +5
       Telerik.ManagerBase`1.Initialize() +505
       Telerik.ManagerBase`1..ctor(String providerName) +21
       Telerik.Cms.Web.UrlHelper.Initialize(CmsHttpModule cmsModule) +44
       Telerik.Cms.Web.CmsHttpModule.Init(HttpApplication context) +86
       System.Web.HttpApplication.InitModulesCommon() +65
       System.Web.HttpApplication.InitModules() +43
       System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +729
       System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +298
       System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107
       System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +289
    
  15. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    27 Jul 2010
    Link to this post
    Hello mgrp,

    You are trying to upgrade the database( for instance you have two websites or single website which uses different version from this one that was initially connected to the website) and since you are not running in Full Trust level and PermissionState.Unrestricted is false an error of type ProviderDatabaseUpgradeException is thrown. Please run the website locally in Full Trust so that the database will be upgraded properly. Then reupload the website and the local database to your host. You are getting this error due to insufficient permissions.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  16. Gema
    Gema avatar
    46 posts
    Registered:
    02 Oct 2009
    27 Jul 2010
    Link to this post
    Hi Ivan,
    I´ve created a new project, and I´ve run it locally.
    I´ve created a page and some items in all modules.
    I´ve copied the website files, and restore the database, but I´m still getting de error message.

    Locally all works fine.
    Is there any way to avoid the database upgrade?

    Thanks
  17. Gema
    Gema avatar
    46 posts
    Registered:
    02 Oct 2009
    28 Jul 2010
    Link to this post
    Hi,
    I´ve read this post:
    http://www.sitefinity.com/devnet/forums/sitefinity-3-x/bugs-issues/that-assembly-does-not-allow-partially-trusted-callers.aspx 
    I´m wondering if I could use DummyCmsProvider to see if an exception is thrown in the initialize method.
    The problem is that I'm deploying sitefinity version 2096, and CmsProvider don´t implements Initialize method.

    What should I have to change in the code?

    Thanks
  18. Gema
    Gema avatar
    46 posts
    Registered:
    02 Oct 2009
    28 Jul 2010
    Link to this post
    Hi,
    I´m not able to do my sitefinity project works in my shared hosting.
    I´ve tried everything you have suggested me without any success.
    So, if I have to change my hosting, can you give me a list of hosting providers that implements full trust configuration?

    I urgently need a hosting where I can run my sitefinity project.

    Thanks.
  19. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    28 Jul 2010
    Link to this post
    Hi mgrp,

    Try http://discountasp.net/sitefinity/

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  20. tanmay
    tanmay avatar
    18 posts
    Registered:
    14 Aug 2007
    01 Jun 2011
    Link to this post
    Hello Support,
    I am working with Sitefinity 3.7, and getting the same issue as above. my hosting provider is godaddy and my plan is share plan so trust level is middle.
    Error is like :

     

    Server Error in '/' Application.

    Exception of type 'Telerik.DataAccess.ProviderDatabaseUpgradeException' was thrown.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: Telerik.DataAccess.ProviderDatabaseUpgradeException: Exception of type 'Telerik.DataAccess.ProviderDatabaseUpgradeException' was thrown.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [ProviderDatabaseUpgradeException: Exception of type 'Telerik.DataAccess.ProviderDatabaseUpgradeException' was thrown.]
       Telerik.Localization.Data.DefaultProvider.Initialize(String name, NameValueCollection config) +542
       Telerik.ManagerBase`1.InstantiateProvider(ProviderSettings providerSettings, Type providerType) +673
       Telerik.ManagerBase`1.InstantiateProvider(ProviderSettings providerSettings) +91
       Telerik.ManagerBase`1.SetProvider(String providerName) +199
       Telerik.ManagerBase`1..ctor(String providerName) +89
       Telerik.ManagerBase`1..ctor() +10
       Telerik.Localization.LocalizationManager..ctor() +24
       Telerik.Localization.LocalizationManager..cctor() +58
    
    [TypeInitializationException: The type initializer for 'Telerik.Localization.LocalizationManager' threw an exception.]
       Telerik.Localization.LocalizationManager.get_PersistenceMode() +0
       Telerik.Cms.Web.CmsHttpModule.SetCurrentCulture(HttpContext context, CmsHttpRequest request) +23
       Telerik.Cms.Web.CmsHttpModule.BeginRequest(Object sender, EventArgs e) +1285
       System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.4211; ASP.NET Version:2.0.50727.4209



    i have read all the options you told, i think may be in my case there is some diffrence, because it is runing well in our stageing server though it is a dedicated server. New thing i want to maintion in my case, when i got DB we found some table related with asp.net authorization and authentication, table name start's with "asp" in our hosting database, and in my app_data folderi have sitefrnity.mdf file also.

    i guess in sitefinity.mdf there are same table may be found another thing is something trying to write some thing in this sitefinity.mdf? if so then if i have write permission on the folder then is it possible that issue will be resolve?

    what i found from your responce your trying to say about full trust level , atlist "discountasp" provide that in share hosting. so is there any way to host it in godaddy ? i have read one document from your support that help me to host the site in godadd, but finally i got this current error.

    Please help me to resolve me the issue as i have to make this site live asap , because i have done all the job in my stageing server and client now want to make it live.


    thanks in advance.
    Tanmay
  21. Nabanita
    Nabanita avatar
    22 posts
    Registered:
    18 Oct 2010
    02 Jun 2011
    Link to this post
    Hello Support,

    We want to install Sitefinity in a medium trust level in a shared server. We have uploaded all the tables with proper data. It is running perfectly in dedicated server with the same database. But in shared server it is showing..
    "Exception of type 'Telerik.DataAccess.ProviderDatabaseUpgradeException' was thrown. - error.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: Telerik.DataAccess.ProviderDatabaseUpgradeException: Exception of type 'Telerik.DataAccess.ProviderDatabaseUpgradeException' was thrown.


    we have followed all the steps in the link:
    http://www.sitefinity.com/devnet/forums/sitefinity-3-x/deployment/deployment-to-shared-hosting-with-medium-trust.aspx

    please help. We are looking for your feedback.

    Thanks,
    Nabanita Das.

  22. Nabanita
    Nabanita avatar
    22 posts
    Registered:
    18 Oct 2010
    02 Jun 2011
    Link to this post
    Hello,

    In our hosting site the sitefinity is running perfectly. It was running with sql server2005. It was a dedicated server.

    Our new server is a shared server with medium trust level and the database is sql server 2008.
    It is showing a exception to hosting sitefinity:

    Exception of type 'Telerik.DataAccess.ProviderDatabaseUpgradeException' was thrown.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: Telerik.DataAccess.ProviderDatabaseUpgradeException: Exception of type 'Telerik.DataAccess.ProviderDatabaseUpgradeException' was thrown.

    Version Information: Microsoft .NET Framework Version:2.0.50727.4211; ASP.NET Version:2.0.50727.4209

    Is this error due to the up gradation of server. Please help us to fix this issue

    Looking for your help.
    Nabanita.
  23. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    02 Jun 2011
    Link to this post
    Hello,

    We sent a reply to you in this thread

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
23 posts, 0 answered