Visualizzazione dei risultati da 1 a 5 su 5

Discussione: file aspx non trovato

  1. #1

    file aspx non trovato

    ho trasferito con FTP un file aspx (è un sendmail), che, tramite il software FTP vedo che è nel server, ma quando invio il form, Explorer mi dice che il file non può essere trovato (Error 404).
    Da cosa può dipendere?

    Ho inserito anche un file CONFIG che ha queste caratteristiche:
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    <appSettings>
    <add key="SmtpServer" value="smtp.aruba.it" />
    <add key="MailFrom" value="info@prometeourbino.it" />
    <add key="MailSubject" value="Scheda valutativa compilato nel sito www.prometeourbino.it" />
    </appSettings>
    <system.web>
    <!-- DYNAMIC DEBUG COMPILATION
    Set compilation debug="true" to enable ASPX debugging. Otherwise, setting this value to
    false will improve runtime performance of this application.
    Set compilation debug="true" to insert debugging symbols (.pdb information)
    into the compiled page. Because this creates a larger file that executes
    more slowly, you should set this value to true only when debugging and to
    false at all other times. For more information, refer to the documentation about
    debugging ASP.NET files.
    -->
    <compilation defaultLanguage="c#" debug="true" />
    <!-- CUSTOM ERROR MESSAGES
    Set customErrors mode="On" or "RemoteOnly" to enable custom error messages, "Off" to disable.
    Add <error> tags for each of the errors you want to handle.

    "On" Always display custom (friendly) messages.
    "Off" Always display detailed ASP.NET error information.
    "RemoteOnly" Display custom (friendly) messages only to users not running
    on the local Web server. This setting is recommended for security purposes, so
    that you do not display application detail information to remote clients.
    -->
    <customErrors mode="RemoteOnly" defaultRedirect="ErrorPage.htm" />
    <!-- AUTHENTICATION
    This section sets the authentication policies of the application. Possible modes are "Windows",
    "Forms", "Passport" and "None"

    "None" No authentication is performed.
    "Windows" IIS performs authentication (Basic, Digest, or Integrated Windows) according to
    its settings for the application. Anonymous access must be disabled in IIS.
    "Forms" You provide a custom form (Web page) for users to enter their credentials, and then
    you authenticate them in your application. A user credential token is stored in a cookie.
    "Passport" Authentication is performed via a centralized authentication service provided
    by Microsoft that offers a single logon and core profile services for member sites.
    -->
    <authentication mode="Forms">
    <forms name=".NSPAUTH" loginUrl="~/Admin/Login.aspx" protection="All" />
    </authentication>
    <!-- AUTHORIZATION
    This section sets the authorization policies of the application. You can allow or deny access
    to application resources by user or role. Wildcards: "*" mean everyone, "?" means anonymous
    (unauthenticated) users.
    -->
    <authorization>
    <allow users="*" />
    <!-- <allow users="[comma separated list of users]"
    roles="[comma separated list of roles]"/>
    <deny users="[comma separated list of users]"
    roles="[comma separated list of roles]"/>
    -->
    </authorization>
    <!-- APPLICATION-LEVEL TRACE LOGGING
    Application-level tracing enables trace log output for every page within an application.
    Set trace enabled="true" to enable application trace logging. If pageOutput="true", the
    trace information will be displayed at the bottom of each page. Otherwise, you can view the
    application trace log by browsing the "trace.axd" page from your web application
    root.
    -->
    <trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
    <!-- SESSION STATE SETTINGS
    By default ASP.NET uses cookies to identify which requests belong to a particular session.
    If cookies are not available, a session can be tracked by adding a session identifier to the URL.
    To disable cookies, set sessionState cookieless="true".
    -->
    <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
    cookieless="false" timeout="20" />
    <!-- GLOBALIZATION
    This section sets the globalization settings of the application.
    -->
    <globalization requestEncoding="utf-8" responseEncoding="utf-8" />
    </system.web>
    </configuration>

  2. #2
    Utente di HTML.it
    Registrato dal
    Sep 2002
    Messaggi
    4,127
    strano ..
    sicuro ke nn dimentiki di scrivere qualke cartella?
    è installato .net?

  3. #3
    sì, è tutto installato. Tra l'altro, un altro identco form associato ad un altro identico file aspx funziona perfettamente: ho controllato e ricontrollato il codice HTML per due ore e non sono arrivato a nulla.
    A questo punto vi dico, che tutto il codice HTML è on-line:

    www.prometeourbino.it/schedavalutativaforno.htm

    ed il codice ASP.NET è questo:

    <%@ Page language="c#" AutoEventWireup="true"%>
    <%@Import namespace="System.Web.Mail" %>
    <script runat="server">
    protected void Page_Load(object sender, System.EventArgs e)
    {
    string visiva= Request.Params["visiva"];
    string visivanote= Request.Params["visivanote"];
    string sensotenuta=Request.Params["odore"];
    string sensoconsistenza=Request.Params["odorenote"];
    string sensogusto=Request.Params["consistenza"];
    string sensoretro=Request.Params["consistenzanote"];
    string sensocomplessivo=Request.Params["liquidi"];
    string sensonote=Request.Params["liquidinote"];
    string sensonote=Request.Params["sensogusto"];
    string sensonote=Request.Params["sensoretro"];
    string sensonote=Request.Params["sensocomplessivo"];
    string sensonote=Request.Params["sensonote"];
    string complessivo=Request.Params["complessivo"];
    string complessivonote=Request.Params["complessivonote"];
    string nome = Request.Params["nome"];
    string cognome = Request.Params["cognome"];
    string negozianteoconsumatore = Request.Params["negozianteoconsumatore"];
    string negozio = Request.Params["negozio"];
    string indirizzo = Request.Params["indirizzo"];
    string email = Request.Params["email"];
    string tel = Request.Params["tel"];
    string fax = Request.Params["fax"];


    System.Text.StringBuilder sb = new System.Text.StringBuilder();
    sb.Append("*************************************** **********************************************\n") ;
    sb.Append("Dati e testo del messaggio:\n");
    sb.Append("*************************************** **********************************************\n") ;
    sb.Append("*************************************** **********************************************\n") ;
    sb.Append("Valutazione visiva: \n");
    sb.Append(visiva);
    sb.Append("\n");
    sb.Append("----------------------------------------------\n");
    sb.Append("Note e osservazioni su valutazione visiva: ");
    sb.Append(visivanote);
    sb.Append("\n");
    sb.Append("*************************************** **********************************************\n") ;
    sb.Append("*************************************** **********************************************\n") ;
    sb.Append("Valutazione olfattiva: \n");
    sb.Append(odore);
    sb.Append("\n");
    sb.Append("----------------------------------------------\n");
    sb.Append("Note e osservazioni su valutazione olfattiva: ");
    sb.Append(odorenote);
    sb.Append("\n");
    sb.Append("*************************************** **********************************************\n") ;
    sb.Append("*************************************** **********************************************\n") ;
    sb.Append("Valutazione della consistenza: \n");
    sb.Append(consistenza);
    sb.Append("\n");
    sb.Append("----------------------------------------------\n");
    sb.Append("Note e osservazioni su valutazione della consistenza: ");
    sb.Append(consistenzanote);
    sb.Append("\n");
    sb.Append("*************************************** **********************************************\n") ;
    sb.Append("*************************************** **********************************************\n") ;
    sb.Append("Valutazione dell'assorbimento liquidi: \n");
    sb.Append(liquidi);
    sb.Append("\n");
    sb.Append("----------------------------------------------\n");
    sb.Append("Note e osservazioni su valutazione dell'assorbimento liquidi: ");
    sb.Append(liquidinote);
    sb.Append("\n");
    sb.Append("*************************************** **********************************************\n") ;
    sb.Append("*************************************** **********************************************\n") ;
    sb.Append("Valutazione sensoriale all'assaggio:\n");
    sb.Append("----------------------------------------------\n");
    sb.Append("Valutazione sensoriale all'assaggio - gusto: \n");
    sb.Append(sensogusto);
    sb.Append("\n");
    sb.Append("----------------------------------------------\n");
    sb.Append("Valutazione sensoriale all'assaggio - retro gusto: \n");
    sb.Append(sensoretro);
    sb.Append("\n");
    sb.Append("----------------------------------------------\n");
    sb.Append("Valutazione sensoriale all'assaggio - complessivo: \n");
    sb.Append(sensocomplessivo);
    sb.Append("\n");
    sb.Append("----------------------------------------------\n");
    sb.Append("Valutazione sensoriale all'assaggio - note: \n");
    sb.Append(complessivonote);
    sb.Append("\n");
    sb.Append("*************************************** **********************************************\n") ;
    sb.Append("*************************************** **********************************************\n") ;
    sb.Append("Dati del valutatore:\n");
    sb.Append("----------------------------------------------\n");
    sb.Append("Nome : ");
    sb.Append(nome);
    sb.Append("\n");
    sb.Append("Cognome : ");
    sb.Append(cognome);
    sb.Append("\n");
    sb.Append("Negoziante o consumatore: ");
    sb.Append(negozianteoconsumatore);
    sb.Append("\n");
    sb.Append("Negozio: ");
    sb.Append(negozio);
    sb.Append("\n");
    sb.Append("Indirizzo: ");
    sb.Append(indirizzo);
    sb.Append("\n");
    sb.Append("EMail: ");
    sb.Append(email);
    sb.Append("\n");
    sb.Append("Telefono: ");
    sb.Append(tel);
    sb.Append("\n");
    sb.Append("Fax: ");
    sb.Append(fax);
    sb.Append("\n");
    sb.Append("----------------------------------------------\n");
    sb.Append("Consento al trattamento dei miei dati personali\n");
    sb.Append("*************************************** **********************************************");
    sb.Append("*************************************** **********************************************");

    MailMessage Message = new MailMessage();
    Message.BodyEncoding = System.Text.Encoding.UTF8;
    Message.To = "info@prometeourbino.it";
    Message.From = System.Configuration.ConfigurationSettings.AppSett ings["MailFrom"];
    Message.Subject = System.Configuration.ConfigurationSettings.AppSett ings["MailSubject"];
    Message.Body = sb.ToString();

    bool ok = false;
    try
    {
    SmtpMail.SmtpServer = System.Configuration.ConfigurationSettings.AppSett ings["SmtpServer"];
    SmtpMail.Send(Message);
    ok = true;
    }
    catch(Exception)
    {
    }
    if (ok)
    {
    MessageLabel.Text = "La scheda di valutazione è stata inviata correttamente.";
    }
    else
    {
    MessageLabel.Text = "Si è verificato un errore: ritentare più tardi.";
    }
    }
    </script>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
    <HTML>
    <HEAD>
    <title>SendMailforno</title>
    <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
    <meta name="CODE_LANGUAGE" Content="C#">
    <meta name="vs_defaultClientScript" content="JavaScript">
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
    <link href="prometeostyle.css" rel="stylesheet" type="text/css">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">
    <!--
    a:link {
    color: 6C2C2A;
    text-decoration: none;
    }
    a:visited {
    text-decoration: none;
    color: F36523;
    }
    a:hover {
    text-decoration: none;
    color: D9A4A4;
    }
    a:active {
    text-decoration: none;
    }
    a {
    font-weight: bold;
    }
    -->
    </style></HEAD>
    <body>
    <form id="Form2" method="post" runat="server" class="prometeostyle">
    <asp:Label id="MessageLabel" runat="server"></asp:Label>
    </form>
    <script>


    function chiudi(){
    window.close()
    }


    function apri(){
    window.open("http://www.prometeourbino.it/schedavalutativainizio.htm","","top=0,left=0,width =380,scrollbars=yes")
    window.close()
    }

    </script>
    <p class="prometeostyle">&lt;- procedi ad un altra valutazione </p>
    <p class="prometeostyle">X chiudi questa finestra
    </p>
    </body>
    </HTML>

  4. #4
    Utente di HTML.it
    Registrato dal
    Sep 2002
    Messaggi
    4,127
    prova a caricare un'altra pagina aspx .. magari è il server nn abilitato a visualizzare pag aspx (anke se dubito)

  5. #5
    Utente di HTML.it
    Registrato dal
    Sep 2002
    Messaggi
    4,127
    ehm ..
    l'errore lo stai facendo tu, credo ..


    probailmente tu dici ad ogni pagina ke va in errore di andare a ErrorPage
    secondo me li ti va la pagina nin errore xkè mancano dei dati, ke ovviamente digitando l'url nn passo ..

    <customErrors mode="RemoteOnly" defaultRedirect="ErrorPage.htm" />
    questa riga riassume tutto quello ke ti ho detto sopra ..
    se la cambi con un altra pagina (sempre con lo stesso nome) ci scommetto ke ti viene fuori quella "nuova"

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.