Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it
    Registrato dal
    May 2001
    Messaggi
    185

    Protezione tramite web.config con login

    Ho inserito nel mio sito una cartella contenente un minisito in asp.net, e in questa parte ho implementato una logica di protezione tramite il web.config e la protezione tramite forms
    quindi la struttura del mio sito e con si formata:

    root
    |
    |-tntgiallo
    |default.aspx
    |login.aspx
    |web.config(1)
    |---secure
    |web.config(2)
    |prova.aspx

    Premetto che per indicare nel forum il web config ho dovuto sostituire il tag "<" ">" con un tag "|".


    Nel primo web config ho indicato che l'accesso a tntgiallo é consentito a tutti in questo modo:

    |configuration|
    |system.web|
    |authentication mode="Forms"|
    |forms name="tntgiallocookie" loginUrl="login.aspx" protection="All" timeout="60"|
    |/forms|
    |/authentication|
    |authorization|
    |allow users="*" /|
    |/authorization|
    |/system.web|
    |/configuration|

    e nella cartella secure ho protetto la cartella mettendo un altro web.config piu annidato e cosi formato:
    |configuration|
    |system.web|
    |authorization|
    |deny users="?" /|
    |/authorization|
    |/system.web|
    |/configuration|

    Quando pero entro nella pagina di default.aspx, inserendo questo indirizzo, il server mi risponde in questo modo:

    --------------------------------------------------------------------------------------

    Server Error in '/' Application.
    Runtime Error
    Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

    Details: To enable the details of this specific error message to be viewable on remote machines, please create a |customErrors| tag within a "web.config" configuration file located in the root directory of the current web application. This |customErrors| tag should then have its "mode" attribute set to "Off".

    |!-- Web.Config Configuration File --|

    |configuration|
    |system.web|
    |customErrors mode="Off"/|
    |/system.web|
    |/configuration|


    Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's |customErrors| configuration tag to point to a custom error page URL.

    |!-- Web.Config Configuration File --|

    |configuration|
    |system.web|
    |customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/|
    |/system.web|
    |/configuration|
    -----------------------------------------------------------------------------------------

    Cosa devo fare???? e la protezione tramite forms funziona du domini aruba?????
    grazie.
    Spero di essere stato il piu chiaro possibile......

  2. #2
    Utente di HTML.it
    Registrato dal
    May 2001
    Messaggi
    185

    urlo per riprodurre l'errore


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.