none
ASP.NET HTTP 404. Ressource introuvable RRS feed

  • Discussion générale

  • Bonjour,
    J'ai vraiment besoin que quelqu'un m'aide à y voir plus clair : 
    environnement de développement
    - vs2008 sp1
    - AjaxControlToolkit
    déploiement chez le client
    - Windows 2003 server
    .net framework v1.0, v1.1, v2.0, v3.0, v3.5 
    Oracle 10g XE 
    sqldeveloper-5440
    Application ASP.NET website pour .net framework 3.5
    Pool d'application ok!
    Nouveau SiteWeb ok! 
    web.config
    [CUT]
    <?xml version="1.0"?>
    <configuration>
      <configSections>
        <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>
      
      <appSettings>
        
        <add key="modeCalcul" value="2"/>
        <add key="typeOperande" value="2"/>
        <add key="opeCriticite" value="2"/>
        <add key="opeCoefficiant" value="2"/>
        
        <add key="CodeCartoFr" value="6"/>
        <add key="ModeCalculParam" value="2" />
        <add key="CalculProbabilite" value="2" />
        <add key="CalculCriticite" value="1" />
        
        <add key="SeuilAlertePlan" value="36"/>
        <add key="SeuilCriticite" value="24"/>
        <add key="LimitNbrRisques" value="11"/>
        <add key="LimitNbrEspaces" value="10"/>
        <add key="LimitNbrActivites" value="11"/>
        
        <add key="ImagesEtPhotos" value="interne"/>
        <add key="FichiersEtDocuments" value="externe" />
        
        <add key="RepertoireImages" value="~/Data/Images/" />
        <add key="RepertoireDocuments" value="~/Data/Documents/" />
        <add key="TypesGeneriques" value="~/App_Data/TypesGeneriques.xml"/>
        <add key="Oracle10gConnection" value="Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XE)));User Id=fuscata;Password=fuscata;"/>
      </appSettings>
      
      <connectionStrings>
        <add name="Oracle10gConnection" connectionString="Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XE)));User Id=fuscata;Password=fuscata;" />
      </connectionStrings>
      
      <system.web>
        <sessionState mode="InProc" cookieless="false" timeout="40"/>
        <compilation debug="false">
          <assemblies>
            <add assembly="System.Core, 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.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
            <add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="DevExpress.Web.ASPxGridView.v8.2, Version=8.2.2.0, Culture=neutral, PublicKeyToken=49D90C14D24271B5"/>
            <add assembly="DevExpress.Web.v8.2, Version=8.2.2.0, Culture=neutral, PublicKeyToken=49D90C14D24271B5"/>
            <add assembly="DevExpress.Web.ASPxEditors.v8.2, Version=8.2.2.0, Culture=neutral, PublicKeyToken=49D90C14D24271B5"/>
            <add assembly="DevExpress.Data.v8.2, Version=8.2.2.0, Culture=neutral, PublicKeyToken=49D90C14D24271B5"/>
            <add assembly="DevExpress.XtraCharts.v8.2.Web, Version=8.2.2.0, Culture=neutral, PublicKeyToken=49D90C14D24271B5"/>
            <add assembly="DevExpress.XtraCharts.v8.2, Version=8.2.2.0, Culture=neutral, PublicKeyToken=49D90C14D24271B5"/>
            <add assembly="DevExpress.Charts.v8.2.Core, Version=8.2.2.0, Culture=neutral, PublicKeyToken=49D90C14D24271B5"/>
            <add assembly="DevExpress.Utils.v8.2, Version=8.2.2.0, Culture=neutral, PublicKeyToken=49D90C14D24271B5"/>
            <add assembly="DevExpress.XtraEditors.v8.2, Version=8.2.2.0, Culture=neutral, PublicKeyToken=49D90C14D24271B5"/>
            <add assembly="DevExpress.XtraReports.v8.2.Web, Version=8.2.2.0, Culture=neutral, PublicKeyToken=49D90C14D24271B5"/>
            <add assembly="DevExpress.XtraReports.v8.2, Version=8.2.2.0, Culture=neutral, PublicKeyToken=49D90C14D24271B5"/>
            <add assembly="DevExpress.XtraPrinting.v8.2, Version=8.2.2.0, Culture=neutral, PublicKeyToken=49D90C14D24271B5"/>
            
            <add assembly="DevExpress.Web.ASPxPivotGrid.v8.2, Version=8.2.2.0, Culture=neutral, PublicKeyToken=49D90C14D24271B5"/>
            <add assembly="DevExpress.XtraPivotGrid.v8.2.Core, Version=8.2.2.0, Culture=neutral, PublicKeyToken=49D90C14D24271B5"/>
            <add assembly="DevExpress.Web.ASPxPivotGrid.v8.2.Export, Version=8.2.2.0, Culture=neutral, PublicKeyToken=49D90C14D24271B5"/>
            <add assembly="DevExpress.XtraPivotGrid.v8.2, Version=8.2.2.0, Culture=neutral, PublicKeyToken=49D90C14D24271B5"/>
            <add assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
            <add assembly="Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
          </assemblies>
          <buildProviders>
            <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
          </buildProviders>
        </compilation>
        <authentication mode="Forms">
          <forms name=".SFAUTH" loginUrl="~/Login.aspx" protection="All" timeout="30" path="/" slidingExpiration="true" cookieless="UseDeviceProfile"/>
        </authentication>
        <authorization>
          <allow users="?"/>
        </authorization>
        
        <anonymousIdentification enabled="false"/>
        <roleManager enabled="true" cacheRolesInCookie="true" defaultProvider="XmlRoleProvider">
          <providers>
            <clear/>
            <add applicationName="DUExpressWebsite" name="XmlRoleProvider" type="Artem.Web.Security.XmlRoleProvider"/>
          </providers>
        </roleManager>
        <membership defaultProvider="XmlMembershipProvider">
          <providers>
            <clear/>
            <add applicationName="DUExpressWebsite" name="XmlMembershipProvider" type="Artem.Web.Security.XmlMembershipProvider" minRequiredPasswordLength="1" minRequiredNonAlphanumericCharacters="0" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Clear"/>
          </providers>
        </membership>
        <profile enabled="true" defaultProvider="XmlProfileProvider">
          <providers>
            <clear/>
            <add applicationName="DUExpressWebsite" name="XmlProfileProvider" type="Artem.Web.Security.XmlProfileProvider"/>
          </providers>
          <properties>
            <group name="Person">
              <add name="FirstName" type="String"/>
              <add name="LastName" type="String"/>
              <add name="Years" type="Int32"/>
            </group>
            <add name="PageCursor" type="String"/>
            <add name="Counter" type="Int32" defaultValue="0" allowAnonymous="true"/>
          </properties>
        </profile>
        <trace enabled="true" requestLimit="10" pageOutput="true" traceMode="SortByTime" localOnly="true"/>
        <globalization culture="fr-FR"/>
        <pages theme="Default" styleSheetTheme="Default">
          <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"/>
          <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
              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 name="ASPxHttpHandlerModule" type="DevExpress.Web.ASPxClasses.ASPxHttpHandlerModule, DevExpress.Web.v8.2, Version=8.2.2.0, Culture=neutral, PublicKeyToken=49d90c14d24271b5"/>
        </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>
          <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
            <providerOption name="CompilerVersion" value="v3.5"/>
            <providerOption name="OptionInfer" value="true"/>
            <providerOption name="WarnAsError" value="false"/>
          </compiler>
        </compilers>
      </system.codedom>
      
      <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"/>
          <add name="ASPxHttpHandlerModule" type="DevExpress.Web.ASPxClasses.ASPxHttpHandlerModule, DevExpress.Web.v8.2, Version=8.2.2.0, Culture=neutral, PublicKeyToken=49d90c14d24271b5"/>
        </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>
    [/CUT]
    page default.aspx
    [CUT]
    <%@ Page Language="C#" MasterPageFile="~/MasterPages/Site.master" AutoEventWireup="true" CodeFile="Default.aspx.cs"
        Inherits="_Default" Title="Accueil" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    </asp:Content>
    <%-- content placeholder --%>
    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
        <div style="text-align: center; padding-top:25px; width: 600px; height: 530px;">
            <%--premier graphique--%>
            <%--les trois charts--%>
            <div class="clear">
            </div>
        </div>
    </asp:Content>
    [/CUT]
    default.aspx.cs 
    [CUT]
    using System;
    using System.Collections;
    using System.Configuration;
    using System.Data;
    using System.Linq;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Xml.Linq;
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }
    }
    [/CUT]
    site.master
    [CUT]
    <%@ Master Language="C#" AutoEventWireup="true" CodeFile="Site.master.cs" Inherits="Site" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Evalorha(ewe)</title>
        <%-- favicon setup --%>
        <link id="Link3" runat="server" rel="shortcut icon" href="~/favicon.gif" type="image/x-icon" />
        <link id="Link4" runat="server" rel="icon" href="~/favicon.gif" type="image/ico" />
        <asp:ContentPlaceHolder ID="head" runat="server">
        </asp:ContentPlaceHolder>
    </head>
    <body>
        <form id="form1" runat="server">
        <div class="headerContent">
            <%-- header bg image --%>
            <%--<div class="headerTitleImage">
            </div>--%>
            <%-- header title text --%>
            <div class="headerTitleText">
                Evalorha[ewe] : Gestion et Prévention des Risques</div>
            <div class="loginNameAndStatus">
                Bienvenue!
                <asp:LoginName ID="LoginName1" runat="server" />
                &nbsp;|&nbsp;
                <asp:LoginStatus ID="LoginStatus1" runat="server" OnLoggedOut="LoginStatus1_LoggedOut" />
                &nbsp;|&nbsp;
                <asp:HyperLink ID="HyperLink4" runat="server" href="../Admin/Users.aspx" Visible='<%# (bool) IsAdminUser() %>'>DBA</asp:HyperLink>
                &nbsp;
            </div>
        </div>
        <div style="text-align: center;">
            <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
                <div class="formContent">
                    &nbsp;
                </div>
            </asp:ContentPlaceHolder>
        </div>
        <%-- footer user control include --%>
        <div class="footerContent">
            <div class="footerTitleText">
                EVALORHA [ewe] &copy;<%=DateTime.Now.Year.ToString() %>
                All rights reserved -
                <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="http://www.orha.com">Orha</asp:HyperLink>&nbsp;
                | &nbsp;
                <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="http://www.beeseven.net">Beeseven</asp:HyperLink>
            </div>
        </div>
        </form>
    </body>
    </html>
    [/CUT]
    site.master.cs
    [CUT]
    using System;
    using System.Collections;
    using System.Configuration;
    using System.Data;
    using System.Linq;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;
    using System.Xml.Linq;
    public partial class Site : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }
        protected void LoginStatus1_LoggedOut(object sender, EventArgs e)
        {
            //FormsAuthentication.SignOut();
            //on raz! le SiteCourant!
            //puis on foue le camp, comme une pouffiasse!
            Response.Redirect("~/Default.aspx", false);
        }
        //protected void LoginStatus1_LoggingOut(Object sender, System.Web.UI.WebControls.LoginCancelEventArgs e)
        //{
        //Message.Text = "LoggingOut event. Don't go away now.";
        //e.Cancel = true;
        //}
        protected bool IsAdminUser()
        {
            //return HttpContext.Current.User.IsInRole("Admin");
            if (HttpContext.Current.User.IsInRole("Admin") || HttpContext.Current.User.IsInRole("Administrators") || HttpContext.Current.User.IsInRole("Administrateur"))
                return true;
            else
                return false;
        }
    }
    [/CUT]
    Dans l'environnement de développement, tout fonctionne très bien, aucune erreur de signalée ; mais dès que je déploie chez le client, j'ai cette erreur : 
    [CUT]
    Erreur du serveur dans l'application '/'.
    --------------------------------------------------------------------------------
    La ressource est introuvable. 
    Description : HTTP 404. La ressource recherchée (ou l'une de ses dépendances) a peut-être été supprimée ou renommée ou bien elle n'est plus disponible temporairement. Vérifiez l'URL ci-après et assurez-vous qu'elle est correcte. 
    URL demandée: /agen/default.aspx
    --------------------------------------------------------------------------------
    Informations sur la version : Version Microsoft .NET Framework :2.0.50727.3053; Version ASP.NET :2.0.50727.3053 
    [/CUT]
    et pourtant je vois très bien ma page default.aspx... 
    je ne vois pas très bien ce que j'ai pu oublié en chemin. Quelqu'un peut-il m'aider à sortir de ce piège asp.net ??
    jeudi 15 septembre 2011 13:50

Toutes les réponses

  • Bonjour,

    Dans quel répertoire (physique) se trouve votre fichier web.config ? Et dans quel répertoire se trouve le fichier default.aspx que vous souhaitez afficher ?

    Cordialement


    Gilles TOURREAU - MVP C#
    Architecte .NET/Consultant/Formateur chez Winwise
    Blog : http://gilles.tourreau.fr
    - MCPD : Enterprise Developper / Windows Developper 3.5 / ASP .NET 3.5
    - MCITP : SQL Server 2008 Developper
    - MCTS : ADO .NET 3.5 / SQL Server 2008 Developper / Windows Forms 3.5 / ASP .NET 3.5
    jeudi 15 septembre 2011 20:13
    Modérateur