S
S
sisharpacc2014-10-23 16:20:08
C++ / C#
sisharpacc, 2014-10-23 16:20:08

C#: why Session = null, but not always?

Hi all!
Web project in VisualStudio 2013. Functionality partly on .aspx files, partly on a web service (.asmx). So the problem is that the Session object is available in the .aspx.cs files, and without any imports. And in the web service file Session == null.
Tell me why there is no single session. I understand that the mechanism behind .aspx creates this object somewhere and initializes it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Dubina, 2014-10-30
@struggleendlessly

session is initialized separately naturally. And on the service, most likely it is checked in order not to let unlogged users where it is not necessary.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question