Asp.NET Asp Error: Click button

1

I have a screen where I have some buttons and clicking on the buttons gives me the error on the screen:

  

"Index was out of Range Must be non-negative and less than the size of   the collection. "

The strange thing is that in the click event of these buttons there is a try/catch , and inside the catch a method that logs the errors occurred in the system.

In summary: "Click" button event is not coming.

To make it difficult, the error only occurs in production, not in development .. and I can not access the production environment.

By doing some tests here I found that if I access the system page using "https" the buttons work normally, already with the "http" of this "index was out ..." error. This error has been occurring since the last rise in production.

    
asked by anonymous 15.09.2015 / 18:20

1 answer

0

The error is characteristic of trying to access some position of the Array with a negative index.

If the event does not arrive in the click, it is because before the Click event runs in the Page stream, the Page_Load strong>. So there may be some code in this event that is causing the error.

If you post your code, we can solve it more accurately.

    
15.09.2015 / 18:36