• User

    Errore : String was not recognized as a valid DateTime

    Sono riuscito a ripristinare il backup del sito e database sul vps di aruba : www . defontemare . eu .
    Resta un piccolo problema pero',che neanche sempre appare (ho notato che appare quando la pagina dello shop impiega tempo a caricarsi).
    Ogni tanto quando clicco sulle pagine relative allo shop,esce questo messaggio di errore :

    **Server Error in '/shop' Application.

    String was not recognized as a valid DateTime. **

    **Description: **An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    **Exception Details: **System.FormatException: String was not recognized as a valid DateTime.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    Stack Trace:

    [FormatException: String was not recognized as a valid DateTime.] System.DateTimeParse.GetDayOfNN(DateTimeResult result, DateTimeRawInfo raw, DateTimeFormatInfo dtfi) +228 System.DateTimeParse.ProcessTerminaltState(Int32 dps, DateTimeResult result, DateTimeRawInfo raw, DateTimeFormatInfo dtfi) +46 System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) +471 System.DateTime.Parse(String s, IFormatProvider provider, DateTimeStyles styles) +30 System.DateTime.Parse(String s, IFormatProvider provider) +11 System.DateTime.Parse(String s) +7 Global.Application_Start(Object sender, EventArgs e) in C:\Inetpub\wwwroot\defontemare\shop\Global.asax.vb :78

    Da cosa puo' dipendere?


  • Super User

    In quel file c'è una stringa che dovrebbe essere datetime ma invee non lo è, probabilemnte dipende dalla impostazioni del server, se è italiano o inglese, inverte giorno con mese e quindi ad esempio 12/31/2008 nel caso di impostazione italiana non esiste e viceversa. Posta il codice e vediamo.