Posts

Showing posts with the label configuration files

ASP.NET: Change page title based on database to which you're connecting

On occasion, you may find it useful to provide a visual cue that the user is not in an application's production environment. This is especially useful during a late night crunch when the developers, system administrators, and the Q.A. team are distracted and tired. Below is some code which allows you to change the page title and its style based on the database specified in a connection string. Note that we are parsing an Entity Framework connection string, not an ADO.NET connection string. Site.Master <div class="navbar navbar-inverse navbar-fixed-top">     <div class="container">         <div class="navbar-header">             <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">                 <span class="icon-bar"></span>                 <span class="...

Fixing the error: "The element 'entityFramework' has invalid child element 'providers'. List of possible elements expected: 'contexts'"

If you're getting the error message: The element 'entityFramework' has invalid child element 'providers'. List of possible elements expected: 'contexts'. and you're using Visual Studio 2012 or Visual Studio 2013, then you can download and install  Entity Framework 6 Tools for Visual Studio 2012 & 2013 . These tools update the schema used to validate the configuration files for your projects. Entity Framework 6 Tools for Visual Studio 2012 & 2013 https://www.microsoft.com/en-us/download/details.aspx?id=40762