When a DLL goes up in the "bin" folder all users lose session

Asked

Viewed 543 times

5

Every time I upload a DLL from my site, I take down all users who need to session to remain logged in the administration.

I was using the build that turns everything into . dll and . Compiled but when compiling to . aspx + . dll also happens the same thing.

ex:

Subo the DLL responsible for the entities falls everyone.

This is normal in ASP.NET ?

I must change the security system in the administration to not use Session?

I’m compiling it wrong ?

(Precompile During Publishing > Allow Precompiled site to be updatable)

In ASP Classic I could change multiple files without knocking down the session! this is a limitation of ASP.Net or I’m doing it wrong?

  • 3

    This is by-design expensive... if you want the sessions to be persistent you will need to use a database-based or external session server-based session provider.

  • Session via database, this out of question...does not compensate.. the problem is that I have over 200 DLL and if I modify only 1 drops everyone.

  • 1

    You could then use an external, out-of-process session server. The session in your case disappears because it is in-process, and when changing a DLL the process is restarted by the IIS.

  • Is there a way to log in without using Session? any internal components? today basically record in Sesssion the permission for it to continue logging in

  • Yes, via cookie. It is possible to record authorization information in the authentication cookie, encrypted of course.

1 answer

5


To use the external session server (out-of-process), you have to:

  • ensure that the session server is active

    The ASP.NET session server is installed as a Windows service

    In the Windows Applications Run Box (Windows + R) typhoon services.msc and locate the service ASP.NET State Service... that’s it, it has to be active.

  • configure the web.config

    <configuration>
      <system.web>
        <sessionState mode="StateServer"
          stateConnectionString="tcpip=localhost:42424"
          cookieless="false"
          timeout="20"/>
      </system.web>
    </configuration>
    

Reference:

http://msdn.microsoft.com/en-us/library/vstudio/ms178586(v=vs.100). aspx

  • OK, I went to give a read on the subject, is there any problem like, after X days the guy opens the page and continues with Sesssion? i set the time to expire?

  • That would not be a problem so to speak, and yes you, configure it there in the parameter timeout="20".

  • Is there any side effect of this solution ? "State Server Mode" ? Increased RAM consumption ? Slowness? etc

  • 1

    The only side effect I remember is that all objects stored in the session must be serialized. Otherwise, it is the same as using in-process sessions, only now, they will be stored in the memory of another process. The slowness will be that of communication latency + serialization/deserialization, which in localhost should be close to zero.

  • Putz...I’ll have to change the entire application to serialize/deserialize the Sessions? :|

  • What you are saving in the session yes... unfortunately, ASP.NET allows live objects only in the in-process session. For me this is a terrible mistake made by ASP.NET, because no alternative will allow saving living objects.

  • 1

    Lucky for me I only recorded one class inside Session (at least that’s what I saw) so I just put [Serializable] in the class and started running.. I’ll test, plus.. seems to be the solution.

Show 2 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.