coulis
Messages postés121Date d'inscriptionlundi 20 octobre 2003StatutMembreDernière intervention24 juin 2010
-
19 oct. 2005 à 16:13
coulis
Messages postés121Date d'inscriptionlundi 20 octobre 2003StatutMembreDernière intervention24 juin 2010
-
20 oct. 2005 à 20:32
Bonjour à tous,
je viens de mettre un site en ligne et j'ai un problème par rapport un array dans mon global.asax.
Après transfert de mes modifs (dll et autres fichiers) sur le serveur, la premiere connection fonctionne sans problème. Si je referme mon navigateur et que je me reconnecte à nouveau, il génère l'erreur ci-dessous :
Server Error in '/' Application.
<HR width= "100%" color=silver SIZE=1>
Index was outside the bounds of the array.
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.IndexOutOfRangeException: Index was outside the bounds of the array.
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:
[IndexOutOfRangeException: Index was outside the bounds of the array.]
LibStats.NamesStatistique.Stats1.StatPage()
LibStats.NamesStatistique.Stats1.Stats(String RefConc, String NomStat, Int16 infocookie, String CodeLang, String navigt, String os, Int16 DecalHServeur)
auto_besancon.Global.Session_Start(Object sender, EventArgs e) in c:\inetpub\wwwroot\auto-besancon\Global.asax.vb:171
System.Web.SessionState.SessionStateModule.RaiseOnStart(EventArgs e) +132
System.Web.SessionState.SessionStateModule.CompleteAcquireState() +514
System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +697
System.Web.AsyncEventExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +66
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +173
Mon fichier global asax (l'erreur est en rouge)
Sub Application_Start(
ByVal sender
As
Object,
ByVal e
As EventArgs)
' référence du client
Application("RefConc") = "a724"
'a724
'récupération des paramettres du client du client
Dim dr
As SqlDataReader
Dim requete
As String "SELECT [N°VoitConc],[N°Departement],[N°Pays], EmailContact, ParcConc, AdresseSite, DecalHoraire FROM VoitConc WHERE (VoitConc.RefConc '" & Application("RefConc") & "')"
dr = LibData.AccesBD.GetReader(requete)
Sub Session_Start(
ByVal sender
As
Object,
ByVal e
As EventArgs)
'**** DEBUT STATISTIQUES *****
Dim CodeLang, USER_AGENT, navigt, os
As
String
CodeLang = Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")
USER_AGENT = Request.ServerVariables("HTTP_USER_AGENT")
If InStr(USER_AGENT, "Firebird")
Then
navigt = "Firebird"
ElseIf InStr(USER_AGENT, "Crazy Browser")
Then
navigt = "Crazy Browser"
ElseIf InStr(USER_AGENT, "AOL")
Then
navigt = "AOL"
ElseIf InStr(USER_AGENT, "opera")
Then
navigt = "opera"
ElseIf InStr(USER_AGENT, "Netscape")
Then
navigt = "Netscape"
ElseIf InStr(USER_AGENT, "MSIE")
Then
navigt = "MSIE"
Else
navigt = ""
End
If
If InStr(USER_AGENT, "Windows")
Then
os = "Windows"
ElseIf InStr(USER_AGENT, "Linux")
Then
os = "Linux"
ElseIf InStr(USER_AGENT, "MAC")
Then
os = "MAC"
ElseIf InStr(USER_AGENT, "SunOS")
Then
os = "SunOS"
Else
os = ""
End
If
'Récupération du cookie "dernieracces"
Dim infocookie
As Int16 = 0
Dim Cook
As HttpCookie
Cook = Request.Cookies("dernieracces")
If
Not Cook
Is
Nothing
Then
'cookies existe
'Verification du passage dans la journée par la date
If DateValue(Cook.Value) = DateValue(DateTime.Now.AddHours(Application("DecalHoraire")))
Then
'le client est déja passé dans la journée
infocookie = 1