简体   繁体   English

在服务器上发布 ASP.net 项目 - 失败

[英]publishing ASP.net project on server -fail

My project is developed on ASP.net with C#. I want to publish my project on our company's server.我的项目是在ASP.net和C#上开发的,我想把我的项目发布到我们公司的服务器上。 I have published my project successfully on server.But when I open any aspx page, it is giving me such error.我已经在服务器上成功发布了我的项目。但是当我打开任何 aspx 页面时,它会给我这样的错误。 Any Idea?任何的想法? All pages are running very well in my local host.所有页面在我的本地主机上都运行良好。

Server Error in '/' Application. “/”应用程序中的服务器错误。 Configuration Error Description: An error occurred during the processing of a configuration file required to service this request.配置错误说明:处理此请求所需的配置文件时发生错误。 Please review the specific error details below and modify your configuration file appropriately.请查看下面的具体错误详细信息并适当修改您的配置文件。

Parser Error Message: Sections must only appear once per config file.解析器错误消息:每个配置文件的部分只能出现一次。 See the help topic for exceptions.有关例外情况,请参阅帮助主题。

Source Error:来源错误:

Line 27: Line 28: Line 29: Line 30: Line 31:第 27 行: 第 28 行: 第 29 行: 第 30 行: 第 31 行:

Source File: C:\Documents and Settings\TaxSmart\Desktop\khushubu_ASP\AAS_Application\AAS_Application\web.config Line: 29源文件:C:\Documents and Settings\TaxSmart\Desktop\khushubu_ASP\AAS_Application\AAS_Application\web.config 行:29

Version Information: Microsoft .NET版本信息:Microsoft .NET

web.config: web.config:

<?xml version="1.0"?>

.--> section enables configuration of the security authentication mode used by ASP.NET to identify an incoming user. .--> 部分启用 ASP.NET 用于识别传入用户的安全身份验证模式的配置。 --> section enables configuration of what to do if/when an unhandled error occurs during the execution of a request, Specifically. --> 部分允许配置如果/当在执行请求期间发生未处理的错误时要做什么,特别是。 it enables developers to configure html error pages to be displayed in place of a error stack trace.它使开发人员能够配置 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"/>
    </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>
<!-- 
    The system.webServer section is required for running ASP.NET AJAX under Internet
    Information Services 7.0.  It is not necessary for previous version of IIS.
-->
<system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <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>
<connectionStrings>
    <add name="AASProject" connectionString="Data Source=182.50.133.145;Database=taxsmartapp;User ID=taxsmartapp ;Password=Admin123! "/>
</connectionStrings>

</connectionStrings>--> </connectionStrings>-->

This implies that you have a section in your web.config/app.config defined more than once, have a check over it for duplicate sections (possibly those which IIS may have inserted for you when configuring the site)这意味着您在 web.config/app.config 中有一个部分定义了不止一次,检查它是否有重复部分(可能是 IIS 在配置站点时为您插入的部分)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM