We help IT Professionals succeed at work.

Deploy the web app to website anytime and don't interrupt all of online users

jeff Lee
jeff Lee asked
on
Medium Priority
72 Views
Last Modified: 2020-02-27
Hi,

   I develop web application with Microsoft Visual Studio and ran it locally.When I deploy the web app to website,
it will interrupt all of online users.So I must deploy the web app to website at midnight.
I want to deploy the web app to website anytime and don't interrupt all of online users.Is it possible? Thanks a lot.
Comment
Watch Question

David Johnson, CDSimple Geek from the '70s
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
a person browsing a website is normally stateless so if you replace a page while someone is loading it they probably won't even notice it. very few changes require the site to be restarted. Even when a site is restarted which happens a a few times every day when the apppool recycles. Unless you are doing database changes which modify the connection settings where the site has to be restarted.. Again in 99.9% of the use cases you can modify your website at will

Author

Commented:
Hi David Johnson, CD,

    When I deploy the application to website and I don't change database every time,

>>>>>>very few changes require the site to be restarted
But all of users are being forced to interrupt their job,and they must login again. it's true. Why? Thanks.
Chief Technology Ninja
CERTIFIED EXPERT
Distinguished Expert 2019
Commented:

Your users are automatically logged out,this can happen in couple of scenarios.


Can you pleas tell me:

1. Are you overwriting web.config as well?

2. Are you using a persistent session store? https://docs.microsoft.com/en-us/previous-versions/aspnet/ms178586(v=vs.100)


Regards,

Chinmay.

Author

Commented:
Hi Chinmay,

    Thanks for getting back to me.The users are not automatically logged out,When I deploy the AP,and then interrupt all of online users.

  >>>1. Are you overwriting web.config as well?
  No,I don't overwrite web.config.

  >>>2.Are you using a persistent session store?
  No, I am not use a persistent session store.

  So,have any other idea?

   best regards,

   jeff
David Johnson, CDSimple Geek from the '70s
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
then you must be changing the cookie somewhere

Author

Commented:
Hi David Johnson, CD,


    All right,I will check my code whether the cookie is changed. Thanks.

Author

Commented:
Hi,

    Many years ago I watched CSI-Crime Scene Investigation TV program,Some homicide detectives investigate deaths suspected to have been caused by criminal activities.When they rule out criminal activity from some one computer,they found that the user  still stay on someone website.The website show now updating the system,hold on please........something like that.

   To notice users I modify system settings right now,can I send some message to client from server when I deploy the application ? Thanks.
David Johnson, CDSimple Geek from the '70s
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:

that is because there still was a cookie on the users computer that the website queried and the cookie was still valid that showed the user as logged in.



Author

Commented:
Hi David Johnson, CD,

    I just use SqlDataSource,gridview,dropdownlist controls,and so on.The sql task runs sql statements or stored procedure from a package. I still have no idea about the cookies in my code.And  I don't use a persistent session store. like the following-it doesn't exist in web.config.
<sessionState
    mode="InProc"
    stateConnectionString="tcpip=127.0.0.1:42424"
    sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
    cookieless="false"
    timeout="20"
  />

 I don't use session command.  

>>>>>>that is because there still was a cookie on the users computer that the website queried and the cookie was still valid that showed the user as logged in.

  Would you further explain that? or paste the sample code.

  you are so kind of you. Thanks.