当前位置:编程学习 > C#/ASP.NET >>

windows iis 7 web.config配置是不是有错误啊。 打开网站404错误

windows   iis 7  web.config配置是不是有错误啊。 打开网站404错误 404 (Page Not Found) Error --------------------编程问答-------------------- <?xml version="1.0"?>
<configuration>
    <configSections>
        <section name="CustomConfiguration" type="URLRewriter.Config.UrlsSection, URLRewriter"/>

        <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
            <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                    <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
                    <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                </sectionGroup>
            </sectionGroup>
        </sectionGroup>
    </configSections>
    <CustomConfiguration>
        <urls>

            <add virtualUrl="~/(.[a-zA-Z])/" destinationUrl="~/index.aspx?lan=$1"/>
            <add virtualUrl="~/aboutus.html" destinationUrl="~/aboutus.aspx?lan=En"/>
            <add virtualUrl="~/(.[a-zA-Z])/aboutus.html" destinationUrl="~/aboutus.aspx?lan=$1"/>
            <add virtualUrl="~/feedback.html" destinationUrl="~/feedback.aspx?lan=En"/>
            <add virtualUrl="~/(.[a-zA-Z])/feedback.html" destinationUrl="~/feedback.aspx?lan=$1"/>
            <add virtualUrl="~/contactus.html" destinationUrl="~/contactus.aspx?lan=En"/>
            <add virtualUrl="~/(.[a-zA-Z])/contactus.html" destinationUrl="~/contactus.aspx?lan=$1"/>
            <add virtualUrl="~/sitemap.html" destinationUrl="~/sitemap.aspx?lan=En"/>
            <add virtualUrl="~/(.[a-zA-Z])/sitemap.html" destinationUrl="~/sitemap.aspx?lan=$1"/>
            <add virtualUrl="~/order.html" destinationUrl="~/order.aspx?lan=En"/>
            <add virtualUrl="~/news.html" destinationUrl="~/news.aspx?lan=En&curPager=1"/>
            <add virtualUrl="~/news-(\d+).html" destinationUrl="~/news.aspx?lan=En&curPager=$1"/>
            <add virtualUrl="~/conent/news/(\d+)/(\d+).html" destinationUrl="~/newsdetail.aspx?lan=En&date=$1&nid=$2"/>
            <add virtualUrl="~/(.[a-zA-Z])/news.html" destinationUrl="~/news.aspx?lan=$1&curPager=1"/>
            <add virtualUrl="~/(.[a-zA-Z])/news-(.[0-9]*).html" destinationUrl="~/news.aspx?lan=$1&curPager=$2"/>
            <add virtualUrl="~/(.[a-zA-Z])/news/(\d+)/(\d+).html" destinationUrl="~/newsdetail.aspx?lan=$1&date=$2&nid=$3"/>
            <add virtualUrl="~/fairs.html" destinationUrl="~/fairs.aspx?lan=En&curPager=1"/>
            <add virtualUrl="~/fairs-(.[0-9]*).html" destinationUrl="~/fairs.aspx?lan=En&curPager=$1"/>
            <add virtualUrl="~/conent/fairs/(\d+)/(\d+).html" destinationUrl="~/fairsdetail.aspx?lan=En&date=$1&fid=$2"/>
            <add virtualUrl="~/(.[a-zA-Z])/fairs.html" destinationUrl="~/fairs.aspx?lan=$1&curPager=$1"/>
            <add virtualUrl="~/(.[a-zA-Z])/fairs-(\d+).html" destinationUrl="~/fairs.aspx?lan=$1&curPager=$2"/>
            <add virtualUrl="~/(.[a-zA-Z])/conent/fairs/(\d+)/(\d+).html" destinationUrl="~/fairsdetail.aspx?lan=$1&date=$2&fid=$3"/>
            <add virtualUrl="~/project.html" destinationUrl="~/project.aspx?lan=En&curPager=1"/>
            <add virtualUrl="~/project-(\d+).html" destinationUrl="~/project.aspx?lan=En&curPager=$1"/>
            <add virtualUrl="~/(.[a-zA-Z])/project.html" destinationUrl="~/project.aspx?lan=$1&curPager=1"/>
            <add virtualUrl="~/(.[a-zA-Z])/project-(\d+).html" destinationUrl="~/project.aspx?lan=$1&curPager=$2"/>
            <add virtualUrl="~/download.html" destinationUrl="~/download.aspx?lan=En" />
            <add virtualUrl="~/(.[a-zA-Z])/download.html" destinationUrl="~/download.aspx?lan=$1" />
            <add virtualUrl="~/aobote/productshow.html" destinationUrl="~/productshow.aspx?lan=En" />
            <add virtualUrl="~/(.[a-zA-Z])/aobote/productshow.html" destinationUrl="~/productshow.aspx?lan=$1" />
            <add virtualUrl="~/productshow/(.*).html" destinationUrl="~/products.aspx?lan=En&bigcategory=$1" />
            <add virtualUrl="~/(.[a-zA-Z])/productshow/(.*).html" destinationUrl="~/products.aspx?lan=$1&bigcategory=$2" />
            <add virtualUrl="~/product/list/(.*)/(.*).html" destinationUrl="~/productlist.aspx?lan=En&bigcategory=$1&smallcategory=$2" />

            <add virtualUrl="~/product/list_(\d+)/(.*)/(.*).html" destinationUrl="~/productlist.aspx?lan=En&CurPager=$1&bigcategory=$2&smallcategory=$3" />
            
             --------------------编程问答-------------------- <add virtualUrl="~/(.[a-zA-Z])/product/list/(.*)/(.*).html" destinationUrl="~/productlist.aspx?lan=$1&bigcategory=$2&smallcategory=$3" />
            <add virtualUrl="~/(.[a-zA-Z])/product/list_(\+d)/(.*)/(.*).html" destinationUrl="~/productlist.aspx?lan=$1&CurPager=$2&bigcategory=$3&smallcategory=$4" />
            
            


          <add virtualUrl="~/products/(.*)/(.*).html" destinationUrl="~/productdetail.aspx?lan=En&bigcategory=$1&pid=$2" />
          <add virtualUrl="~/(.[a-zA-Z])/products/(.*)/(.*).html" destinationUrl="~/productdetail.aspx?lan=$1&bigcategory=$2&pid=$3" />


          <add virtualUrl="~/search/(.*)" destinationUrl="~/search.aspx?LanguageCode=En&pName=$1" />
            
            
            <add virtualUrl="~/search_(\d+)/" destinationUrl="~/search.aspx?LanguageCode=En&curPager=$1" />

            <add virtualUrl="~/search_(\d+)/(.*)" destinationUrl="~/search.aspx?LanguageCode=En&curPager=$1&pName=$2" />

        </urls>
    </CustomConfiguration>

    <appSettings/>
    <connectionStrings>
        <add name="DB" connectionString="Provider=Microsoft.Jet.Oledb.4.0;data source="/>
        <add name="DBpath" connectionString="App_Data/DB.mdb"/>
    </connectionStrings>
    <system.web>
        <httpRuntime maxRequestLength="10240" executionTimeout="7200" appRequestQueueLimit="10000"/>
        <!-- 
            设置 compilation debug="true" 可将调试符号插入
            已编译的页面中。但由于这会 
            影响性能,因此只在开发过程中将此值 
            设置为 true。
        -->
        <compilation debug="true">
            <assemblies>
                <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            </assemblies>
        </compilation>
        <!--
            通过 <authentication> 节可以配置 ASP.NET 用来 
            识别进入用户的
            安全身份验证模式。 
        -->
        <authentication mode="Forms">
            <forms loginUrl="otreeadmin/Login.aspx" protection="All">
            </forms>
        </authentication>
        <!--
            如果在执行请求的过程中出现未处理的错误,
            则通过 <customErrors> 节可以配置相应的处理步骤。具体说来,
            开发人员通过该节可以配置
            要显示的 html 错误页
            以代替错误堆栈跟踪。
            <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
                <error statusCode="403" redirect="NoAccess.htm" />
                <error statusCode="404" redirect="FileNotFound.htm" />
            </customErrors>
        -->

        <pages>
            <controls>
                <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            </controls>
        </pages>
        <httpHandlers>

            <remove verb="*" path="*.asmx"/>
            <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
        </httpHandlers>
        <httpModules>
            <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add type="URLRewriter.RewriterModule, URLRewriter" name="RewriterModule"/>

        </httpModules>
    </system.web>
    <system.codedom>
        <compilers>
            <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
                <providerOption name="CompilerVersion" value="v3.5"/>
                <providerOption name="WarnAsError" value="false"/>
            </compiler>
        </compilers>
    </system.codedom>
    <!-- 
        在 Internet 信息服务 7.0 下运行 ASP.NET AJAX 需要 system.webServer
        节。对早期版本的 IIS 来说则不需要此节。
    -->
    <system.webServer>
        <validation validateIntegratedModeConfiguration="true"/>
        <modules>
            <remove name="ScriptModule"/>
            <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        </modules>
        <handlers>
            <remove name="WebServiceHandlerFactory-Integrated"/>
            <remove name="ScriptHandlerFactory"/>
            <remove name="ScriptHandlerFactoryAppServices"/>
            <remove name="ScriptResource"/>
            <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        </handlers>
    </system.webServer>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
            </dependentAssembly>
        </assemblyBinding>
    </runtime>
</configuration>
--------------------编程问答-------------------- 你确定是 404 是 站点配置的问题吗?

http://baike.baidu.com/view/1629577.htm --------------------编程问答-------------------- 404是没找到页面 。
是不是配置错了什么的 。仔细检查 。
补充:.NET技术 ,  ASP.NET
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,