Currently, I have a web client Shiny application that is run on a virtual server and allows users to access the app via a website if they are logged onto the company network. I want my application to update its data every 24 hours using invalidateLater(24*60*60*1000, session), however, since the databases are very large, I don't want this command running every time a user accesses the application, making the user have to wait 3-4 minutes before they get to use the app. Is there any way I can schedule an update for refreshing my data without having the app update (and wait) every time a new session starts?
Related
I have made a WPF Desktop application that fetches data from an API (on every launch) provided by the website over the Internet and updates its UI accordingly. Now I want to change that. I want to put the application's fetching functionality on the cloud which regularly gets data from API and store it in a SQL SERVER (or any) database. Now I want the application on the client side to get data from the database and not from the API itself (can be on every launch or when there is a change in data).
WHATS THE PROBLEM THEN ?
When thinking of a desktop application over the cloud on a windows virtual machine it feels ok and I understand how to implement it.
But when thinking of a web application the server is supposed to respond to client request and then perform some piece of code to give output/Response. Which I don't need I wan't the code to just run weekly or monthly without client asking.
WHAT I WANT ?
I wan't the server to up 24/7 and updating the database every week.
How usually such kind of thing is implemented in general. Let say for example stack overflow. Don't they perform certain task independent of the client on their servers.
I have an Azure Web App with autoscaling configured with a minimum of 2 instances. Database is SQL Azure.
User will make changes to the data e.g. edit a product's price. The change will make it to the database and I can see it in SSMS. However, after user refreshes the page, the data may or may not get updated.
My current theory is something to do with having multiple instances of the web app, because if I turn off autoscale and just have 1 instance, the issue is gone.
I haven't configured any sort of caching in Azure at all.
It sounds like what is happening is the data may or may not appear because it is stored in memory on the worker server (at least temporarily). When you have multiple worker servers, a different one may serve the request, in which case that server would not have the value in memory. The solution is to make sure that your application's code is re-fetching the value from the database in every case.
Azure Web Apps has some built in protection against this, called the ARR affinity cookie. Essentially each request has a cookie which keeps sessions "sticky". i.e. if a worker server is serving requests to a certain user, that user should receive subsequent requests from that server as well. This is the default behavior, but you may have disabled it. See: https://azure.microsoft.com/en-us/blog/disabling-arrs-instance-affinity-in-windows-azure-web-sites/
I need some help understanding how I should architect an application. Basically it has two parts.
The web app (asp mvc): A user logs into the app, records some data and logs off. The data (login info, user recorded data) is stored locally on my server. It is very simple.
The background process: I need a service to receive and send data that is connected with this web app (from #1). I have a 3rd party server that will send user login information (in real time) to my server in which I need to use to update my local DB (this is the same DB that the web app uses for login info). Secondly, I need to run a timed interval process to query the user recorded data plus perform simple logic on it and then send the outcome to this 3rd party server. These steps are all via xml docs.
I am not exactly sure how to attack this problem. I figured I could build a separate web service to do this (it would live on the same server as the web app). Or I could run some sort of webbackgrounder (https://github.com/NuGet/WebBackgrounder) task solution that is attached to my web app. Or lastly I could create a SSIS package to do this. Which route should I go? Thank you for the advice.
I have a little asp.net application that I have hosted on remote server. This application is supposed to send email notification (through gamail server) on a certain time set by user.
My question is, is there any way to achieve this goal as the user shall open the application via browser, set notification and close the browser. Does application on server still keeps running?
Please advise how to achieve this goal.
Thanks
Given the time is variable I would recommend writing a windows service which checks the current time at regular intervals against the set time from the website. This service will do nothing but fire off your emails which keeps your website completely independent.
I did something similar in the past where I had to send email/SMS notifications at various times, just be wary about how you check the time. The user will be setting local time which means if you are storing your dates in UTC format (which you should be) you may need to convert the timestamp back to users local timezone before comparing.
You can simply write Console application and add it in Schedule Task (if you want it to run after intervals), which is more trusted way of doing it.
I have just discovered that we only need to add Global.asax file (right click project in server explorer and Add New Item>> Add Global Application)
Just put your email code in the file. When hosted, it runs through IIS, even though browser is closed.
I m developing web application using ASP.NET and I want to close the current user session if the computer is idle for 5 minutes. Idle not means for web application only, Its full system that means if no keystroke received from keyboard for 5 mins.
I got some info thru Google about Idle Tracker in VC++ but I dont know how to use that DLL in my web application. Link here.
Please guide me how to achieve this. I want to get the total computer active time and idle time thru asp.net for my employees productivity report.
ASP.Net is a bad choice for this requirement. ASP.Net runs on the server, while you want to track some client side events.
For security reasons, a web page can't have such privileges without the use of ActiveX or browser plugin, but it's complex to write, complex to deploy and a big opened window to security breaches.
You should create a classic desktop application, or search for an option in the GPOs, there's maybe something.
The simple solution I can suggest is :
Create a small script file that logoff the user (search for the logoff command line)
Create a scheduled task that :
triggers when a specified amount of idle time has been reached
launch the script file you wrote
Deploy the scheduled task to the users using whatever method you want
If you choose this approach, I recommand you to move to http://superuser.com or http://serverfault.com, which are correct place for such cases