i found this
http://www.syncfusion.com/FAQ/aspnet/WEB_c9c.aspx#q45q
which states that the session object is not available in the Application_OnAuthenticateRequest handler inside global.asax.
I wonder if it is the same for the application_onerror event?
Vicky....
"I used to have a handle on...
I am back
I am still trying to fix this issue
HttpContext.Current.Response.Write(HttpContext.Current.Session)
shows nothing
and
HttpContext.Current.Response.Write(HttpContext.Current.Session.Count & "<BR>")
gives the
Object reference not set to an instance of an object.
error.
Don't...
sorry mate i have to go now and I will not be back infront of a computer for a week (yeah!)
thanks for all your help....
when I get back i will keep trying to figure it out....
Vicky....
"I used to have a handle on life...then it broke
tried putting
HttpContext.Current.Response.Write(HttpContext.Current.Session.Count)
in the page_load of an aspx file
and it displays fine
Vicky....
"I used to have a handle on life...then it broke
ok I have put all the code in a code behind file, which works until I add the
HttpContext.Current.Response.Write(HttpContext.Current.Session.Count)
and I get the same error again...
Vicky....
"I used to have a handle on life...then it broke
Object reference not set to an instance of an object.
do you mean creating a code behind file for the global.asax file?
Vicky....
"I used to have a handle on life...then it broke
I get the same error
Object reference not set to an instance of an object
Excuse my ignorance - but I don't know how to mark it for debuggging. I have to use Dreamweaver and I have not worked out how to do that.
I have a try, catch block - which shows me the error. I test be taking the line...
it dies as soon as it hits
Dim o As Object = HttpContext.Current.Session.Item("client_id")
with the same error message
Object reference not set to an instance of an object.
Vicky....
"I used to have a handle on life...then it broke
I am certain that the error occurs on that line and I know that the session variable exists as I am using it throughout the application.
I have also tried
Dim ClientID as string = HttpContext.Current.Session("client_id").ToString
and I get the same error
If try
Dim ClientID as string =...
Hello all,
I have a procedure in Application_onError in the global.asax file that sends an email to the Administrator and then redirects to an error page.
In the email it also sends some information that has been retreived from session variables.
This used to work fine. Now it doesn't - the...
That tentatively seems to work although I am really unsure why the system has now decided to run the application_onerror event now that all it does is the Server.Transfer. Previously I had it sending an email then doing a Server.Transfer
However - from what I read I thought that the order of...
I seem to be having an awful lot of trouble with error handling in ASP.NET when it should be pretty simple.
I have an Application_OnError Sub in the Global.asax file that sends the error message to me then redirects to the generic error page.
I also have the Custom Errors turned on in the...
Is it something to do with doing server-side validation? all built in validators work ok. I need to do server side validation as it has to go back to the database to check values.
Vicky....
"I used to have a handle on life...then it broke
I have the real validation code doing all kinds of stuff which all works fine - but it would never show the error message
So I just put in the test_Valid code and set args.IsValid = False as shown above.
Vicky....
"I used to have a handle on life...then it broke
Hello all,
I have a Custom Validator in a datagrid to check the validity of a field in a edititemtemplate. However the error message refuses to display. (Even if I deliberately set IsValid to False as shown below)
I have exactly the same type of custom validator in the footer of the datagrid...
It's amazing what a good nights sleep can do.
It would seem that you cannot do this within the EditCommand that it has to be down within the OnItemDataBound Command. Then check
if e.Item.ItemType = ListItemtype.EditItem
Vicky....
"I used to have a handle on life...then it broke
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.