Asp.net mvc HTTP错误500.19-IIS 10中的内部服务器错误

Asp.net mvc HTTP错误500.19-IIS 10中的内部服务器错误,asp.net-mvc,iis,web-config,Asp.net Mvc,Iis,Web Config,我更改了网站的服务器。新服务器具有windows 10 2016 R2操作系统,并使用IIS 10。 我将文件从旧服务器传输到新服务器,添加网站,然后将端口80绑定到此网站。现在浏览网站时出现此错误: HTTP错误500.19-内部服务器错误 无法访问请求的页面,因为该页面的相关配置数据无效 经过一些故障排除,发现url重写模块缺失 Url重写模块可以从以下位置下载和安装: 检查Jexus Manager报告的内容。是否安装了URL重写模块?这是一个单独的下载/默认情况下未安装。除了@Mist

我更改了网站的服务器。新服务器具有windows 10 2016 R2操作系统,并使用IIS 10。 我将文件从旧服务器传输到新服务器,添加网站,然后将端口80绑定到此网站。现在浏览网站时出现此错误:

HTTP错误500.19-内部服务器错误

无法访问请求的页面,因为该页面的相关配置数据无效



经过一些故障排除,发现url重写模块缺失

Url重写模块可以从以下位置下载和安装:

检查Jexus Manager报告的内容。是否安装了URL重写模块?这是一个单独的下载/默认情况下未安装。除了@MisterSmith建议之外,您还可以查看事件查看器(控制面板->管理工具->甚至查看器)系统或应用程序日志以了解更多信息troubleshooting@MohsinMehmood你的意思是“事件Viwer”?另一个建议!转到IIS,在左窗格中选择您的网站,然后单击右窗格中的HttpHandlers以确保显示http处理程序列表。另外,检查URL重写图标是否显示在选中网站的右侧窗格中。如果是,请双击url重写以确保列出规则。url重写------------------执行此操作时出错。详细信息:文件名:\\?\C:\inetpub\wwwroot\NewTravelEnter\web.config错误:-------------------------------------确定-----------------加载URLEwrite模块时指定了此错误。检查此堆栈溢出。您可能需要修复UrlReWrite模块安装我发布我的网站项目并用旧的web.config文件替换生成的web.config文件。然后这个问题就解决了。
<?xml version="1.0" encoding="utf-8"?>

<configuration>
    <configSections>
        <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
        <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
            <section name="TravelEnterProject.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
        </sectionGroup>
    </configSections>
    <connectionStrings>
        <add name="DefaultConnection" connectionString="Data Source=.;Initial Catalog=TravelEnterDB;User ID=User;Password=rLyVhrghj#A39Ac" providerName="System.Data.SqlClient" />
        <add name="TravelEnterDBEntities" connectionString="metadata=res://*/AdakDbModel.csdl|res://*/AdakDbModel.ssdl|res://*/AdakDbModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=.;initial catalog=TravelEnterDB;persist security info=True;user id=User;password=rLyVhrdfffd@j#A39Ac;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
        <add name="TravelEnterDBEntities2" connectionString="metadata=res://*/Models.DbModel.TravelEnterModels.csdl|res://*/Models.DbModel.TravelEnterModels.ssdl|res://*/Models.DbModel.TravelEnterModels.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=.;initial catalog=TravelEnterDB;user id=User;password=rLyVhr9dfdf39Ac;multipleactiveresultsets=True;application name=EntityFramework&quot;" providerName="System.Data.EntityClient" />
    </connectionStrings>
    <appSettings>
        <add key="webpages:Version" value="3.0.0.0" />
        <add key="webpages:Enabled" value="false" />
        <add key="ClientValidationEnabled" value="true" />
        <add key="UnobtrusiveJavaScriptEnabled" value="true" />
        <add key="fullsize" value="/uploadimage/UploadImages/" />
        <add key="Image900x500" value="/uploadimage/UploadImages/900x500/" />
        <add key="Image270x160" value="/uploadimage/UploadImages/270x160/" />
        <add key="Image70x70" value="/uploadimage/UploadImages/70x70/" />

        <add key="Sitekey" value="6LfbRCwUAAAAANSNLUZvBUMmn6Nzc-q" />
        <add key="Secretkey" value="6LfbRCwUAAAAAKDeRsyy7vcupQME1wO" />

    </appSettings>
    <system.web>
        <authentication mode="None" />
        <compilation debug="false" targetFramework="4.5" />
        <httpRuntime targetFramework="4.5" />
        <httpCookies requireSSL="true" />
        <customErrors mode="on" />

    </system.web>
    <system.webServer>
        <stripHeaders>
            <header name="Server" />
            <header name="X-Powered-By" />
            <header name="X-Aspnet-Version" />
        </stripHeaders>
        <httpProtocol>
            <customHeaders>
                <remove name="X-Powered-By" />

                <add name="X-Frame-Options" value="SAMEORIGIN" />
                <add name="Access-Control-Allow-Origin" value="*" />
            </customHeaders>
        </httpProtocol>
        <validation validateIntegratedModeConfiguration="false" />
        <modules>
        </modules>
        <rewrite>
            <rules>
                <rule name="Redirect to HTTPS" stopProcessing="true">
                    <match url="(.*)" />

                    <conditions>
                        <add input="{HTTPS}" pattern="^OFF$" />
                    </conditions>
                    <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" />
                </rule>
                <rule name="charter" enabled="false">
                    <match url="^charter/([0-9]+)/([0-9]+)/([0-9]+)/([0-9]+)/([0-9]+)/([0-9]+)/([0-9]+)/([0-9]+)/([0-9]+)/(.*)" />
                    <action type="Rewrite" url="Charter?depCountryId={R:1}&amp;DepCityId={R:2}&amp;ArrCountryId={R:3}&amp;ArrCityId={R:4}&amp;Fromdate={R:5}&amp;DateRange={R:6}&amp;ADT={R:7}&amp;CHD={R:8}&amp;INF={R:9}&amp;S={R:10}" />
                </rule>
                <rule name="Redirect non-www to www" patternSyntax="Wildcard" stopProcessing="true">
                    <match url="*" />
                    <conditions>
                        <add input="{HTTP_HOST}" pattern="travelenter.com" />
                    </conditions>
                    <action type="Redirect" url="https://www.travelenter.com/{R:0}" />
                </rule>

            </rules>
            <outboundRules>
                <rule name="changeServerHeader">
                    <match serverVariable="RESPONSE_Server" pattern=".*" />
                    <action type="Rewrite" value="heloooo" />
                </rule>
            </outboundRules>
        </rewrite>
        <security>
            <requestFiltering>
                <verbs>
                    <add verb="TRACE" allowed="false" />
                    <add verb="HEAD" allowed="false" />
                    <add verb="OPTIONS" allowed="false" />
                </verbs>
            </requestFiltering>
        </security>
        <tracing>
            <traceFailedRequests>
                <add path="*">
                    <traceAreas>
                        <add provider="ASP" verbosity="Verbose" />
                        <add provider="ASPNET" areas="Infrastructure,Module,Page,AppServices" verbosity="Verbose" />
                        <add provider="ISAPI Extension" verbosity="Verbose" />
                        <add provider="WWW Server" areas="Rewrite" verbosity="Verbose" />
                    </traceAreas>
                    <failureDefinitions timeTaken="00:00:00" statusCodes="500" verbosity="Ignore" />
                </add>
            </traceFailedRequests>
        </tracing>
        <staticContent>
            <clientCache cacheControlCustom="public" cacheControlMaxAge="96:00:00" cacheControlMode="UseMaxAge" />
        </staticContent>
        <caching>
            <profiles>
                <add extension=".woff" policy="CacheUntilChange" kernelCachePolicy="DontCache" />
                <add extension=".ico" policy="CacheUntilChange" kernelCachePolicy="DontCache" duration="00:00:30" />
                <add extension=".css" policy="DisableCache" kernelCachePolicy="DontCache" duration="24.00:00:00" />
                <add extension=".js" policy="DisableCache" kernelCachePolicy="DontCache" duration="24.00:00:00" />
                <add extension=".ttf" policy="CacheUntilChange" kernelCachePolicy="DontCache" duration="24.00:00:00" />
                <add extension=".png" policy="CacheUntilChange" kernelCachePolicy="DontCache" duration="24.00:00:00" />
                <add extension=".jpg" policy="CacheUntilChange" kernelCachePolicy="DontCache" duration="24.00:00:00" />
            </profiles>
        </caching>
        <httpErrors errorMode="Detailed" existingResponse="Replace">
            <remove statusCode="404" />
            <error statusCode="404" path="https://www.ttttttt.com/404.htm" responseMode="Redirect" />
        </httpErrors>

    </system.webServer>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
                <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
                <bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
                <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
                <bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
                <bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
                <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
            </dependentAssembly>
        </assemblyBinding>
    </runtime>
    <entityFramework>
        <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
            <parameters>
                <parameter value="v11.0" />
            </parameters>
        </defaultConnectionFactory>
        <providers>
            <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
        </providers>
    </entityFramework>
    <system.serviceModel>
        <bindings>
            <customBinding>
                <binding name="CustomBinding_IFlightService">
                    <textMessageEncoding messageVersion="Soap12" />
                    <httpTransport />
                </binding>
            </customBinding>
            <basicHttpBinding>
                <binding name="BindingCharter" maxReceivedMessageSize="999999999" maxBufferSize="999999999" maxBufferPoolSize="999999999" sendTimeout="00:55:00" receiveTimeout="00:09:00" openTimeout="00:10:00" closeTimeout="00:10:00" />
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint name="BasicHttpBinding_ICharterService" address="http://localhost:8080/CharterWs/CharterService.svc" binding="basicHttpBinding" bindingConfiguration="BindingCharter" contract="CharterMiddleWebService.ICharterService" />
            <endpoint name="CustomBinding_IFlightService" address="http://82.50.209.208:8080/FlightMiddleService/FlightService.svc" binding="customBinding" bindingConfiguration="CustomBinding_IFlightService" contract="flightReference.IFlightService" />
        </client>
    </system.serviceModel>
    <applicationSettings>
        <TravelEnterProject.Properties.Settings>
            <setting name="TravelEnterProject_AdakFlightRefrence_AdakFlight" serializeAs="String">
                <value>http://localhost:8080/FlightWS/AdakFlight.svc</value>
            </setting>
            <setting name="TravelEnterProject_RajaReference_online2Services" serializeAs="String">

                <value>https://webservices.raja.ir/online2Services.asmx</value>
            </setting>
            <setting name="TravelEnterProject_CharterFlightsReference_Service1" serializeAs="String">
                <value>http://localhost:8080/CharterFlights/Flights.svc</value>
            </setting>
            <setting name="TravelEnterProject_AutoRentService_AutoRentService" serializeAs="String">
                <value>http://service.karanehnovin.ir/AutoRentService.asmx</value>
            </setting>
            <setting name="AdakCharterLib_CharterMiddleWebService_CharterService" serializeAs="String">
                <value>http://localhost:8080/CharterWs/CharterService.svc</value>
            </setting>
            <setting name="AdakTrainLib_AdakTrainWebReference_TrainService" serializeAs="String">
                <value>http://127.0.0.1:8085/TrainService.svc</value>
            </setting>
        </TravelEnterProject.Properties.Settings>
    </applicationSettings>
</configuration>
<section name="compilation" type="System.Web.Configuration.CompilationSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" requirePermission="false"/>