Hi in my ASP.net web app my hosting provider Hostgator said they did the following. I am not sure which lines they are referring to in my web.config file shown further on
Hosrgator's comment: "Finally I commented out the system.codedom section of lines 35-40, as that section is not allowed on shared servers, due to the security implications of allowing custom compilers. Once all of this was done the site started to load properly."
my web.config file:
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
https://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<!--
For a description of web.config changes see
http://go.microsoft.com/fwlink/?LinkId=235367.
The following attributes can be set on the <httpRuntime> tag.
<system.Web>
<httpRuntime targetFramework="4.6.1" />
</system.Web>
-->
<system.web>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.6.1"/>
<httpRuntime targetFramework="4.6.1"/>
<pages>
<namespaces>
<add namespace="System.Web.Opti
mization"/
>
</namespaces>
<controls>
<add assembly="Microsoft.AspNet
.Web.Optim
ization.We
bForms" namespace="Microsoft.AspNe
t.Web.Opti
mization.W
ebForms" tagPrefix="webopt"/>
</controls>
</pages>
</system.web>
<runtime>
<assemblyBinding xmlns="urn:schemas-microso
ft-com:asm
.v1">
<dependentAssembly>
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606
e9261f"/>
<bindingRedirect oldVersion="0.0.0.0-3.5.0.
2" newVersion="3.5.0.2"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2
a6aeed"/>
<bindingRedirect oldVersion="0.0.0.0-11.0.0
.0" newVersion="11.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad
364e35"/>
<bindingRedirect oldVersion="0.0.0.0-1.6.51
35.21930" newVersion="1.6.5135.21930
"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Pr
oviders.Do
tNetCompil
erPlatform
.CSharpCod
eProvider,
Microsoft.CodeDom.Provider
s.DotNetCo
mpilerPlat
form, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad3
64e35" warningLevel="4" compilerOptions="/langvers
ion:defaul
t /nowarn:1659;1699;1701"/>
<compiler language="vb;vbs;visualbas
ic;vbscrip
t" extension=".vb" type="Microsoft.CodeDom.Pr
oviders.Do
tNetCompil
erPlatform
.VBCodePro
vider, Microsoft.CodeDom.Provider
s.DotNetCo
mpilerPlat
form, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad3
64e35" warningLevel="4" compilerOptions="/langvers
ion:defaul
t /nowarn:41008 /define:_MYTYPE=\"Web
\" /optionInfer+"/>
</compilers>
</system.codedom>
</configuration>