i'm trying to encrypt my web.config.
aspnet_regiis keeps telling me: The configuration section 'applicationSettings' was not found.
I followed this site: Walkthrough: Creating and Exporting an RSA Key Container
My web.config looks like this:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="x" type="x" />
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="x.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<configProtectedData>
<providers>
<add name="MyProvider"
type="System.Configuration.RsaProtectedConfigurationProvider, System.Configuration, Version=2.0. 0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a,
processorArchitecture=MSIL"
keyContainerName="MyKeys"
useMachineContainer="true" />
</providers>
</configProtectedData>
...
<applicationSettings>
<x.Properties.Settings>
<setting name="PollingInterval" serializeAs="String">
<value>10000</value>
</setting>
</x.Properties.Settings>
</applicationSettings>
</configuration>
I use the command: aspnet_regiis -pe "applicationSettings" -app "/MyApplication" -prov "MyProvider"
When I move the Section configProtectedData above the configSections it encrypts the applicationSettings, but removes the configSections-Section, anyway, IIS tells me configSections need to be the first element. I'm not sure what I'm doing wrong.
Is it a problem, that the applicationSettings is listed in the configSections?
Thank you for your help.
Ok, found the solution,
as stated in "configSections", "applicationSettings" is a SectionGroup, not a Section. aspnet_regiis can only encrypt Sections.
so I had to go one deeper: aspnet_regiis -pe "applicationSettings/x.Properties.Settings" -app "/MyApplication" -prov "MyProvider"
Related
I encrypted my web.config file but when I upload the web.config into server the website is not accessible any more.
First I create a key by typing this code in cmd:
aspnet_regiis -pc "MyKeys" -exp
Then I modify web.config like this:
<configuration>
<configSections>
<section name="entityFramework"
type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection,
EntityFramework, Version=6.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"
requirePermission="false"/>
</configSections>
<configProtectedData>
<providers>
<add name="MyProvider"
type="System.Configuration.RsaProtectedConfigurationProvider,
System.Configuration, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a,
processorArchitecture=MSIL"
keyContainerName="MyKeys"
useMachineContainer="true" />
</providers>
</configProtectedData>
<connectionStrings>
<add name="sth" connectionString="Data Source=sth; Initial
Catalog=2888_AtiRayan; User ID=sth; Password=sth; Integrated
Security=False;"
providerName="System.Data.SQLClient"/>
</connectionStrings>
</configuration>
Last I run below code in cmd and web.cofig encrypted successfully.
aspnet_regiis -pef "connectionStrings" "/MyApplication" -prov "MyProvider"
How do I use or decrypt this file?
All I found is decrypting by coding in cmd like above, but I uploaded my source to server and I can't access it so what can I do?
How can I use connection string from this encrypted file which is uploaded to server?
I have a site running in a subdirectory of another site. They run in separate app pools. The two sites are running different versions of Entity Framework. So in the web.config in the subdirectory I have:
<remove name="entityFramework"/>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
But even with the <remove> tag I still get this error:
Section or group name 'entityFramework' is already defined. Updates to this may only occur at the configuration level where it is defined.
I've also placed <location> tags in the parent web.config wherever possible:
<location path="." inheritInChildApplications="false">
The <location> tag is present around the parent web.config's <entityFramework> section.
And I've placed enableConfigurationOverride="false" in the applicationHost.config files for IIS (both files in System32 and SysWOW64).
How do I prevent the site in the subdirectory from seeing the parent entityFramework tag?
EDIT
IIS Version: 7.5.7600.16385
From the parent web.config:
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
l
<location path="." inheritInChildApplications="false">
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
</location>
From the child web.config:
<configSections>
<remove name="entityFramework"/>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<section name="enterpriseLibrary.ConfigurationSource" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection, Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" />
</configSections>
l
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
</entityFramework>
EDIT 2
In regards to using <clear/>: this causes a series of errors about missing section declarations. If I add back ~100 lines of section declarations I get the error: An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode. The error persists even if I use <validation validateIntegratedModeConfiguration="false" /> in <system.webServer>.
Can you confirm if you tried clear instead of remove the problem still persist or not?
<configSections>
<clear/>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<section name="enterpriseLibrary.ConfigurationSource" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection, Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" />
</configSections>
You might read more here
Hope this will help you
You said that you used but in the parent web.config you posted, the path="." is missing. You're going to need that for it to block the inheritance.
Have you tried this Removeattributes
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
</system.web>
http://weblogs.asp.net/srkirkland/common-web-config-transformations-with-visual-studio-2010
Example 2
I am running IIS7.
I have a 3rd party dll that has its own config file. My understanding is that IIS7 will not read this config file and that I have to add it to the server web.config file.
However I get errors when adding a particular node.
In the dll.config it has:
<configuration>
<dllSettings>
--- bunch of settings....
</dllSettings>
</configuration>
So I added that same node into my web.config file...
Is there a parent node that I should add this to in my web.config?
When I have to add more config file. This is how I defined in the Web.Config
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="[NAMESPACE].[PROJECT].Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</sectionGroup>
</configSections>
<applicationSettings>
<[NAMESPACE].[PROJECT].Properties.Settings configSource="[NAMESPACE].[PROJECT].dll.settings.config"/>
</applicationSettings>
...
</configuration>
This is what I have in my other Config File
<?xml version="1.0" encoding="utf-8" ?>
<[PROJECT].Properties.Settings>
<setting name="[NAME]" serializeAs="String">
<value>Anything</value>
</setting>
</[PROJECT].Properties.Settings>
I am attempting to follow this article:
http://www.codeproject.com/KB/aspnet/elmahGAC.aspx
to get Elmah working from the GAC rather than needing to be setup for each application individually. Everything works locally but when the settings are set globally, Elmah stops logging. I read somewhere that if Elmah is running from the GAC then the settings should be in the "global" machine.config vs the "global" web.config but I've tried both. Right now, I'm at a point where if I add this:
<system.webServer>
<modules>
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah, Version=1.2.13605.0, Culture=neutral, PublicKeyToken=abc123" preCondition="managedHandler" />
</modules>
</system.webServer>
into my application's web.config, it picks up the rest of the settings from the global machine.config and logs successfully. To answer the obvious question, yes I have this section in the global machine.config and have even tried entering it in the global web.config but still logging won't work. Anyone have any ideas? Is there anyway to get Elmah to display its errors instead of failing quietly?
EDIT: Here is my "global" machine.config file. It's just the default one with the stuff for ELMAH added and some section groups taken out to meet the char limit. I should probably also note this is running in IIS7.
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<configSections>
<sectionGroup name="elmah">
<section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah, Version=1.2.13605.0, Culture=neutral, PublicKeyToken=e50dbdd41da277ac" />
<section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah, Version=1.2.13605.0, Culture=neutral, PublicKeyToken=e50dbdd41da277ac" />
<section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah, Version=1.2.13605.0, Culture=neutral, PublicKeyToken=e50dbdd41da277ac" />
<section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah, Version=1.2.13605.0, Culture=neutral, PublicKeyToken=e50dbdd41da277ac" />
</sectionGroup>
</configSections>
<connectionStrings>
<clear />
<add name="Elmah.Sql" connectionString="IMNOTTELLING" providerName="System.Data.SqlClient" />
<add name="LocalSqlServer" connectionString="IMNOTTELLING" providerName="System.Data.SqlClient" />
</connectionStrings>
<elmah>
<security allowRemoteAccess="0" />
<errorLog type="Elmah.SqlErrorLog, Elmah, Version=1.2.13605.0, Culture=neutral, PublicKeyToken=e50dbdd41da277ac" connectionStringName="Elmah.Sql" />
</elmah>
<runtime />
<system.data>
<DbProviderFactories />
</system.data>
<system.serviceModel>
Nothing tampered with here
</system.serviceModel>
<system.web>
<processModel autoConfig="true"/>
<httpHandlers>
<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah, Version=1.2.13605.0, Culture=neutral, PublicKeyToken=e50dbdd41da277ac" />
</httpHandlers>
<httpModules>
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah, Version=1.2.13605.0, Culture=neutral, PublicKeyToken=e50dbdd41da277ac" />
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah, Version=1.2.13605.0, Culture=neutral, PublicKeyToken=e50dbdd41da277ac" />
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah, Version=1.2.13605.0, Culture=neutral, PublicKeyToken=e50dbdd41da277ac" />
</httpModules>
<compilation>
<assemblies>
<add assembly="Elmah, Version=1.2.13605.0, Culture=neutral, PublicKeyToken=e50dbdd41da277ac" />
</assemblies>
</compilation>
<membership>
Nothing tampered with here
</membership>
<profile>
<providers>
<add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/"
type="System.Web.Profile.SqlProfileProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</profile>
<roleManager>
Nothing tampered with here
</roleManager>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests ="true">
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah, Version=1.2.13605.0, Culture=neutral, PublicKeyToken=e50dbdd41da277ac" preCondition="managedHandler" />
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah, Version=1.2.13605.0, Culture=neutral, PublicKeyToken=e50dbdd41da277ac" preCondition="managedHandler" />
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah, Version=1.2.13605.0, Culture=neutral, PublicKeyToken=e50dbdd41da277ac" preCondition="managedHandler" />
</modules>
<handlers>
<add name="Elmah" path="elmah.axd" verb="POST,GET,HEAD" type="Elmah.ErrorLogPageFactory, Elmah, Version=1.2.13605.0, Culture=neutral, PublicKeyToken=e50dbdd41da277ac" preCondition="integratedMode" />
</handlers>
</system.webServer>
</configuration>
EDIT: I installed the modules and handler in IIS directly and now it works.
I also had problems with IIS7 on a Win7x64 install (testing for a production system). I finally got this working by putting the module and handler into the appropriate nodes in the applicationHost.config file.
C:\Windows\System32\inetsrv\config\applicationHost.config
It seems that IIS7 ignores certain areas of the main framework web.config files, instead using the applicationHost.config file for IIS settings.
Something to note about that file if you are on a 64 bit install: it seems that 32 bit applications (including Visual Studio) will appear to not see the file. It's because of some file system behavior due to the OS being 64 bit. One easy work around is to open it using an UNC path:
\\localhost\c$\Windows\System32\inetsrv\config\applicationHost.config
I really doubt the PublicKeyToken of Elmah is abc123... You need to use the real PublicKeyToken, which you can find if you look at the assembly in the GAC. It looks something like: b03f5f7f11d50a3a (that was for mscorlib.dll, so that is Microsoft's public key token).
EDIT: I installed the modules and handler in IIS directly and now it works.
I've tried everything I could find to get ELMAH working from the GAC on my Win7 Ultimate 64bit machine and the only thing that finally got it working was registering the elmah.axd handler and the various modules in IIS Manager.
I´m starting to use "MVC 3" but I´m facing some little problems. In my Views, when I code something like this:
#if(Request.IsAuthenticated) {
<text>Welcome <b>#Context.User.Identity.Name</b>!
[ #Html.ActionLink("Log Off", "LogOff", "Account") ]</text>
}
else {
#:[ #Html.ActionLink("Log On", "LogOn", "Account") ]
}
The objects like #Request and #Html is indicating an error: The name 'HTML' does not exist in the current context.
The same occurs with #Context, #ViewBag, #Layout, #Url and others.
See:
But the code is correctly compiled with no errors. The problem is that I cannot use the Intellisense with theses objects in the Views. Is it normal? (I don´t think so). What could be happening?
I have reinstalled the MVC 3 framework but the same still occurs.
Note: this is a new project from scratch, not a MVC 2 migration. This occurs both with Razor engine and ASPX.
This is the Web.Config in the Views folder:
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
</sectionGroup>
</configSections>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
</namespaces>
</pages>
</system.web.webPages.razor>
<appSettings>
<add key="webpages:Enabled" value="false" />
</appSettings>
<system.web>
<httpHandlers>
<add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/>
</httpHandlers>
<!--
Enabling request validation in view pages would cause validation to occur
after the input has already been processed by the controller. By default
MVC performs request validation before a controller processes the input.
To change this behavior apply the ValidateInputAttribute to a
controller or action.
-->
<pages
validateRequest="false"
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<controls>
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
</controls>
</pages>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
</handlers>
</system.webServer>
</configuration>
Thanks!
You could try:
Close the View with the false errors.
(Steps 2-5 are sometimes optional) Close Visual Studio
Delete the bin and obj folders in all the Projects in the Solution.
Reopen the same Solution
Rebuild the Solution
Open a different View then the one causing the errors
Close that View, hopefully you didn't see any of the similar errors in this View
Reopen the View that gave you problems earlier
I have solved this issue with the old, good, wise Microsoft default solution: reinstall all the things again.
Uninstall and Reinstall the Visual Studio 2010 and MVC 3 Framework.
Clean your solution and Under references.
Then set the follow property:
System.Web.MVC file to Copy Local = True.
All I had to do was close all views that were open in the editor and rebuild.
What worked for me was closing Visual Studio, deleting the user option files (both solution and project level), then relaunching Visual Studio.
I'm using dotnet core sdk 2.2 and Visual Studio Professional 2019.
This was caused by Visual Studio mangling code.
Code was pasted into the razor view. Visual Studio would attempt but then fail to auto-format it. Part of the failure resulted in deleting code.
Pressing ctrl+z reverted the formatting but kept the pasted code. The razor compilation errors were then fixed (The name 'Html' does not exist in the current context)
Disable format on paste (see https://stackoverflow.com/a/28053865/1462295 ) under Tools -> Options -> Text Editor -> HTML -> Advanced
For me this just seemed to be the fact that I had compiler warnings. Code would still compile and run ok but it was not until I fixed all the build warnings that my Intellisense starting working.
I tried to remove the project that is still in trouble from solution and add it back again, after which the problem had been gone.
Set the property of System.Web.MVC,Copy Local = True
In my case my Packages folder was missing including MVC and Razor so I have updated packages in packages.config, reopened the view and it worked.
All you need to do is Restart Visual Studio and check.
You could try some following point:
Close the View with the false errors.
Close visual studio.
open project again.
clean your solution
Rebuild your solution.
hopefully you will not get any of the similar errors now.
If you still have same problem. than Please check following steps.
Make sure you have web.config file inside view folder. Becuase MVC has two web.config. one for solution and other one for project.
Your web.config file will seems like this which is inside views folder.
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
</sectionGroup>
</configSections>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Optimization"/>
<add namespace="System.Web.Routing" />
<add namespace="Your Project Name" />
</namespaces>
</pages>
</system.web.webPages.razor>
<appSettings>
<add key="webpages:Enabled" value="false" />
</appSettings>
<system.webServer>
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
</handlers>
</system.webServer>
<system.web>
<compilation>
<assemblies>
<add assembly="System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
</compilation>
</system.web>
</configuration>
It worked for me. and hope for you also.
Close Visual Studio => Delete the obj and bin folders located in your project => Start Visual Studio
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v11.0" />
</parameters>
</defaultConnectionFactory>
solution for this problem in web.config
I experienced this on ASP.NET MVC 4 as well, after uninstalling EntityFramework from my packages list.
I had to remove this section
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, ....
that's left on the Web.config file... at the least it removed the errors from the errors list
Apologies for the necro post.
Selecting "Build | Rebuild Solution" corrected this issue for me in Visual Studio 2015. In my case, the warnings occurred after renaming the primary namespace of a project. A rebuild set everything straight.
I'm using ASP .net core. Solved mine by upgrading Microsoft.AspNetCore.Mvc from 1.1.2 to 1.1.3.
For me, I just restarted my Visual Studios and everything got fixed.
Maybe I am a bit late to answer this question but this easy fix helped me:
Right click the file > Exclude from project.
Right click the file > Include in project.
I had this same issue in MVC 4. None of these solutions worked for me. Instead, in Windows, I went into Control Panel -> Uninstall a program. Select Microsoft ASP.NET MVC 4 in the program list. Click 'Uninstall.' A 'Microsoft ASP.NET MVC 4 Setup' wizard will display. Click 'Repair.'