HTTP Error 500.19 - Internal Server Error

I published my website to our test server which runs on IIS 8 on server 2012.  My website uses url rewriting, so there are additional things on my web.config file.

Here is my error, when I pull up the site.
error page
I was able to get it to appear, however only when I deleted all the assembly's under the<assembly> tag.  I just don't want to do that and leave it because it works, but I just need to know why? and will this cause issues down the road.

Here is my Web.Config File.

<?xml version="1.0" encoding="utf-8"?>
<!-- For more information on how to configure your ASP.NET application, please visit  http://go.microsoft.com/fwlink/?LinkId=169433 -->
<configuration>
  <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXXX" requirePermission="false" />
  
  </configSections>
  
  <connectionStrings>
    <add name="MyConnectionString" connectionString="Data Source=MyDataSource;Initial Catalog=MyCatalog;Persist Security Info=True;User ID=MyUserID;password=MyPassword" providerName="System.Data.SqlClient" />
    
  </connectionStrings>
  <appSettings>
      
     
  </appSettings>
  
  <system.web>
    
    <httpHandlers>
      <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXXX" validate="false" />
    </httpHandlers>
      <httpModules>

          <add name="CryptoQueryStringUrlRemapper" type="SmartSoft.QueryStringEncryption.CryptoQueryStringUrlRemapper"/>
      </httpModules>
    <trace enabled="true" localOnly="false" />
    
    <!--<customErrors defaultRedirect="~/MyErrorPage.aspx" mode="On"/>-->
    
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Web.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXXX" />
        <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXXX" />
        <add assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXXX" />
        <add assembly="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXXX" />
        <add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXXX" />
      </assemblies>
      <buildProviders>
        <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXXX" />
          
      </buildProviders>
    </compilation>
    <authentication mode="Forms">
      <forms loginUrl="/" protection="All" path="/" timeout="200" slidingExpiration="true" requireSSL="false"  />

    </authentication>
    <authorization>
      <deny users="?" />
    </authorization>
    <profile defaultProvider="DefaultProfileProvider">
      <providers>
        <add name="DefaultProfileProvider" type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXXX" connectionStringName="MyConnectionString" applicationName="/" />
      </providers>
    </profile>
    <roleManager enabled="true" cacheRolesInCookie="true">
      <providers>
        <remove name="AspNetSqlRoleProvider" />
        <add connectionStringName="MyConnectionString" applicationName="MyApplicationName" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXXX" />
        <add applicationName="/" name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXXX" />
      </providers>
    </roleManager>
    <membership defaultProvider="MyDefaultProvider">
      <providers>
        <add connectionStringName="MyConnectionString" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="MyApplicationName" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="500" minRequiredPasswordLength="5" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" name="MySiteName" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXXX" />
       
      </providers>
    </membership>
    <sessionState mode="InProc" customProvider="DefaultSessionProvider" cookieless="false">
      <providers>
        <add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXXX" connectionStringName="MyConnectionString" />
      </providers>
    </sessionState>
    <pages>
      <controls>
        <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
      </controls>
    </pages>

      <machineKey validationKey="MyValidation" validation="SHA1" decryption="AES" />

  </system.web>
  
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
    <validation validateIntegratedModeConfiguration="false" />
    <!--<handlers>
      <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXXX" />
    </handlers>-->

      <directoryBrowse enabled="true" />
        <security>
            <requestFiltering>
                <fileExtensions>
                
                </fileExtensions>
            </requestFiltering>
        </security>
      <httpErrors>
          <error statusCode="404" prefixLanguageFilePath="" path="/MyErrorPage.aspx" responseMode="ExecuteURL" />
      </httpErrors>
      <rewrite>
          <rules>
              <rule name="RemoveASPX" enabled="true" stopProcessing="true">
                  <match url="(.*)\.aspx" />
                  <action type="Redirect" url="{R:1}" />
              </rule>
              <rule name="AddASPX" enabled="true">
                  <match url=".*" negate="false" />
                  <conditions>
                      <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                      <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                      <add input="{URL}" pattern="(.*)\.(.*)" negate="true" />
                  </conditions>
                  <action type="Rewrite" url="{R:0}.aspx" />
              </rule>


            

          </rules>
      </rewrite>

  </system.webServer>


    <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
  </entityFramework>
  <system.net>
   
  </system.net>
</configuration>

Open in new window

Shade22Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shade22Author Commented:
URL re-write has been installed onto the server.
0
käµfm³d 👽Commented:
Does the error go away if you make the <httpErrors> section this:

<httpErrors>
    <clear />
    <error statusCode="404" prefixLanguageFilePath="" path="/MyErrorPage.aspx" responseMode="ExecuteURL" />
</httpErrors>

Open in new window

0
Vikram Singh SainiSoftware Engineer cum AD DeveloperCommented:
Hi,

You should check out article Troubleshooting HTTP 500.19 Errors in IIS 7

It specify the error code which you are facing. And it also have solution too.
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Shade22Author Commented:
Update: I now have it narrowed down to these two assembly's that are causing issues.  I have a reporting page on the site, and believe that the reporting get error's from the url re-writes.

<add assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" />
<add assembly="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" />


After I put <clear /> I now get this error.  

pageerror.jpg
0
Shade22Author Commented:
I have this javascript on one of my pages that sends data to my reporting page but I believe the re-write is interrupting it.  How would I add a rule to make this javascript work again?

 <script type="text/javascript">
        function printReport(Form, Report) {
            var e = document.getElementById("<%= ddl_report.ClientID %>");
            window.open("Report.aspx?SelectedYear=" + e.options[e.selectedIndex].value + "&Form=" + Form + "&Fund=" + Fund)
        }
        function printReport2(Form, Report) {
            var e = document.getElementById("<%= ddl_report_Supplement.ClientID %>");
                    window.open("Report.aspx?SelectedYear=" + e.options[e.selectedIndex].value + "&Form=" + Form + "&Fund=" + Fund)
                }
        function printReport3(Form, Report) {
            var e = document.getElementById("<%= ddl_report_change.ClientID %>");
                    window.open("Report.aspx?SelectedYear=" + e.options[e.selectedIndex].value + "&Form=" + Form + "&Fund=" + Fund)
                    location.reload();
        }
        function printReport4(Form, Report) {
            var e = document.getElementById("<%= ddl_Report_Zap.ClientID %>");
             window.open("Report.aspx?SelectedYear=" + e.options[e.selectedIndex].value + "&Form=" + Form + "&Fund=" + Fund)
             location.reload();
         }
    </script>

Open in new window


Re-Write
     
<rewrite>
          <rules>
              <rule name="RemoveASPX" enabled="true" stopProcessing="true">
                  <match url="(.*)\.aspx" />
                  <action type="Redirect" url="{R:1}" />
              </rule>
              <rule name="AddASPX" enabled="true">
                  <match url=".*" negate="false" />
                  <conditions>
                      <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                      <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                      <add input="{URL}" pattern="(.*)\.(.*)" negate="true" />
                  </conditions>
                  <action type="Rewrite" url="{R:0}.aspx" />
              </rule>
          </rules>
      </rewrite>

Open in new window

0
Shade22Author Commented:
Thanks kaufmed.  The <clear /> tag helped me pin point what the issue was.  The issue was that the server didn't have report viewer on it.  Once it was installed everything worked.  The reason why it worked when I cleared all the assemblies was that the two specific one's that referred to reporting weren't there.  The other assemblies weren't causing any issues.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Shade22Author Commented:
With the help of others I was able to get different errors which lead to the solution.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.