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

Forums / Set-up & Installation / web.config deleted accidentally

web.config deleted accidentally

4 posts, 0 answered
  1. Dino
    Dino avatar
    24 posts
    Registered:
    20 Dec 2008
    03 Sep 2009
    Link to this post
    What do I do if the root web.config was deleted accidentally?  Is there a way to regenerate it?  There is already a lot of pages and content generated in the database that I do not want to lose.

    Can I upload a new web.config and go through cmsstartup again or will that overwrite the database?

    Thanks.
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    04 Sep 2009
    Link to this post
    Hi Dino,

    Thank you for using our services.

    You can take the web.config file from a Blank Project. If you do not have a Sitefinity Blank Project you can download it from your Client.Net account. Just in case back up your database. Then add the web.config to the project. By default you will go through cmsstartup but it will only ask you to make the connection to database, and perform a check for existing administrators.

    You can also avoid going through the cms startup by disabling it in the web.config. However this means that you will need to set the connection to your database manualy through the web.config file. To disable the startup, you can modify the following line in the web.config:
    <cms defaultProvider="Sitefinity" pageExtension=".aspx" disabled="false" 
          pageEditorUIMode="Overlay"

    Kind regards,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Dino
    Dino avatar
    24 posts
    Registered:
    20 Dec 2008
    04 Sep 2009
    Link to this post
    Thanks.  I did what you said above and was able to add my connection settings, but on the next screen an Object reference not set to an instance of an object error came up.

    Here is the stack trace:

    [NullReferenceException: Object reference not set to an instance of an object.]   Telerik.Workflow.WorkflowManager.get_ProvidersSettings() +8   Telerik.Workflow.ObjectManager`1.Initialize() +973   Telerik.Workflow.ObjectManager`1..ctor(String provider) +32   Telerik.Workflow.ObjectManager`1..ctor() +22   Telerik.Workflow.WorkflowManager..ctor(Boolean createTransaction) +20   Telerik.Workflow.WorkflowRuntime.Initialize() +144   Telerik.Workflow.WorkflowRuntime..ctor() +38   Telerik.Workflow.WorkflowRuntime.get_Instance() +45   Telerik.Cms.CmsWorkflowService..ctor() +53   Telerik.Cms.CmsWorkflowService..cctor() +31[TypeInitializationException: The type initializer for 'Telerik.Cms.CmsWorkflowService' threw an exception.]   Telerik.Cms.CmsWorkflowService.Initialize() +0   Telerik.ManagerBase`1.Initialize() +543   Telerik.ManagerBase`1..ctor(String providerName) +32   Telerik.ManagerBase`1..ctor() +22   Telerik.Cms.CmsManager..ctor() +9   Telerik.Cms.Web.CmsHttpModule.Init(HttpApplication context) +155   System.Web.HttpApplication.InitModulesCommon() +124   System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +1162   System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +312   System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +133   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +196
  4. Dino
    Dino avatar
    24 posts
    Registered:
    20 Dec 2008
    04 Sep 2009
    Link to this post
    I had to rebuild a new project and use that web.config.  So everything is working now.

    Thanks for the help.
Register for webinar
4 posts, 0 answered