HELP: strange behaviour when visiting the ASP website the 2nd time: "Index was outside the bounds of

T

ton

Hi,

I've developed a ASP.NET web site. It wirks fine on my debug enviroment, it
works ok on my webserver it even functions on a virtual pc. Now I want to
install it on the clients server.
I'creted several tet programs before setting up the application on the
server. Everything works ok.
And after installing the application the first time we log on to the app it
wokrs. I can do all things users would like to do.
But then after logged of it doesn't work anymore. I get the following error:

Server Error in '/Appname' Application.
--------------------------------------------------------------------------------

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:
and so on.

I use to use Formsauthentication, but switch to none, but nothing helps.

The client works with SQL2000 of a Server 2003

Can anyone help?

Thanks


Ton
 
B

Brian Cryer

ton said:
Hi,

I've developed a ASP.NET web site. It wirks fine on my debug enviroment,
it works ok on my webserver it even functions on a virtual pc. Now I want
to install it on the clients server.
I'creted several tet programs before setting up the application on the
server. Everything works ok.
And after installing the application the first time we log on to the app
it wokrs. I can do all things users would like to do.
But then after logged of it doesn't work anymore. I get the following
error:

Server Error in '/Appname' Application.
--------------------------------------------------------------------------------

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:
and so on.

It sounds to me like an error in your code.

From the information you see logged you should be able to determine where
abouts in your code the error is coming from. If you can't pin it down to a
particular line then I suggest you put in some debug (logging a message to
the event log on each line would be crude but effective). Once you know what
line the error is being generated on then you should be able to work out why
and from that address the bug in your code.
I use to use Formsauthentication, but switch to none, but nothing helps.

It sounds like you don't know why the error is occurring. You need to
identify which line the error is being generated on and from that why and
from that what to do about it.
The client works with SQL2000 of a Server 2003

Can anyone help?

If you can't work it out for yourself then (and only after you've tried)
post the full error and the source code for the offending module.
 
T

ton

Thanx for your reply.
I'll add some entries in the evenlog to see which instruction gives the
error, but it looks strange to me that it only happens on this server and
not in my development enviroment or any other server I've tried.

I'll report my progress next week.

Thanx

Ton
 
B

Brian Cryer

ton said:
Thanx for your reply.
I'll add some entries in the evenlog to see which instruction gives the
error, but it looks strange to me that it only happens on this server and
not in my development enviroment or any other server I've tried.

I agree its strange, but I have seen subtly different behaviour between the
servers I use and my development environment. Frustrating, but it does
happen.
I'll report my progress next week.

Best of luck with it.
 
T

ton

YOU'RE RIGHT !

I can't explain why it works on different servers and not on the one of my
client but it didn't work because of an error.

I've added a sub
Public Shared Sub AddEvent(ByVal info As String)
Static teller As Integer
teller = teller + 1
Try
'Register the App as an Event Source
If Not EventLog.SourceExists("Compass") Then
EventLog.CreateEventSource("Compass", "Compass")
End If
EventLog.WriteEntry("compass", info, EventLogEntryType.Warning,
teller)
Catch Ex As Exception

End Try
End Sub

And on several places I can follow where the program got. And where it
stopped there was the error.
But I could see it much earlier if I had beleved the message when running
the website on the server itself:
Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateIndexGet(Object
Instance, Object[] Arguments, String[] ArgumentNames) +22
dbRecordNET.Session.Loggen(Boolean& Logbook, Int16& LogType, String&
LogInfo, Boolean ForcedLogging) in
C:\vb300\Web\dbOLEserver.NET\Session.vb:895
dbConnect.dbConnect.CreateChildControls() in
C:\vb300\Web\dbConnect\dbConnect.vb:54
System.Web.UI.Control.EnsureChildControls() +87



The exact line in the code of a DLL LINE 895 (written in VB) was mentioned,
followed by the webcontrol who made the call (inclusive the line number 54).
So when I called the eventlog sub at this point the place was confirmed in
the eventlog. I still can't figure out why it did work on the other servers.

Thanks Brian !


Ton
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top