locked
set session in httphandlers RRS feed

  • Question

  • User-818494779 posted

    Hi , 

    I tried to do this :

    tumbnail.Save(context.Server.MapPath("~/images/classifieds/"+ "nail_"+newFileName));

    but getting null reference error. how to set session in httphandlers

    Sunday, November 4, 2012 2:35 PM

Answers

All replies

  • User1779161005 posted

    The handler needs to implement IRequireSessionState or IReadOnlySessionState. No members -- they're just flag interfaces.

    Sunday, November 4, 2012 4:12 PM
  • User-818494779 posted

    The handler needs to implement IRequireSessionState or IReadOnlySessionState. No members -- they're just flag interfaces.

    Im getting this error : 

    Error 1 The type or namespace name 'IRequireSessionState' could not be found (are you missing a using directive or an assembly reference?) 

    But its in the main project and system.web is already referenced in that project

    Monday, November 5, 2012 2:34 AM
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, November 5, 2012 2:47 AM
  • User1779161005 posted

    What's your handler code that implements the interface look like?

    Monday, November 5, 2012 8:42 AM