Page 1 of 1

Object reference not set to an instance of an object!!!

Posted: Wed May 19, 2010 4:45 pm
by M.I.A
Hello

My problem, when i see my report result, i tried to save it in any format for example : xlsx, txt.....etc, i received this exception exactly on this line of code:

Code: Select all

if (doctorID == "" && Session["perAdmin"].ToString() != "True")  <<<------------------------ the exception come here
        {
            filterString += "AND StudentDoctorID = @DoctorID ";
        }
The exception is ("Object reference not set to an instance of an object").

The value of [perAdmin] session is assigned in the first page in my web project so no way to this session to be null, this is serious problem for me because i am in the final step in the project and i have to finish it.

Thank you.

Object reference not set to an instance of an object!!!

Posted: Thu May 20, 2010 1:35 am
by Jan
Hello,

This topic is not related to our product. It very hard to say why it not work. If you receive null reference exception than your code can't find "perAdmin" key in session. Check places in your code where you assign this key.

Thank you.

Object reference not set to an instance of an object!!!

Posted: Thu May 20, 2010 1:47 am
by M.I.A
Hello Jan

I though that related to stimulsoft project thats way i asked here, and also i use that session ["perAdmin"] session in many web pages in my project and everything ok except with save button.

Anyway i will check again or try to use another session.

Thank you.

Object reference not set to an instance of an object!!!

Posted: Wed May 26, 2010 12:23 am
by Jan
Hello,

I don't know how to help you. Our report engine don't use "perAdmin" session state. Exception occurs when you try get state of this session. Can you show full source code of your webpage?

Thank you.