I am creating a little Website which is basically a leaderboard from a specific game.
Im using C#6 - 4.6.
I am using a Webhosting by 1and1.
My question/problem:
The leaderboard has to update itself every 10 minutes. I am using an API to get the newest informations and then save it into a mysql db.
I cannot use cronjobs(using Windows hosting) and i cannot create scheduled tasks (Only webhosting and not a server...).
I was talking to support, but they could not help me because of lagg of knowledge in c# and win hosting.
So i tested something in my Visual studio: I created a seperate Thread which does the update, wait for X minutes and then does it again (infinit, until i stop it).
Works like a charm on my pc, but when i publish it to the server, the thread starts executing and actually writes that into the log, but after around 10 seconds there is no more respond from the thread.
Everything from that thread is running serverside.
Can someone explain this to me or has a better idea on how to solve it?
If you need any code snippets, please let me know!
Thanks in advance,
Markus
Related
I'm currently developing a Platformer using Monogame in order to learn C# again because I haven't used it for 2 years. I'm using Microsoft VSTS to remotely have it in a Git repository.
My brothers are going to be my beta testers and before I give them the game I'd like to implement automatic updates.
I'd like to create an installer that they use to install the game but after that the game automatically checks for updates at launch.
Is it possible to do that using Git as version control and only download changes every time it launches instead of a complete reinstall?
How would I go about doing something like that? I've googled a lot but haven't found a good answer yet. This is something I wanted to do years ago when using C# as well but never found a solution.
Any help would be appreciated!
Thanks in advance!
Try clickonce.. it may help you.if you are trying to do automatic update on client installation whenever new version is deplayed in application server or network share
I would like to find some tool that would let me run scheduled c# job online, for example every night at 2 am.
I need to run some scripts every day, but I don't want to do it manually, also and I don't always have my computer around.
Does anyone know any tool like this?
BR
Try writing a .exe that create HTTP request. Use Windows Task Scheduler to schedule that .exe to run on a schedule.
I'm currently running VS2013 Update 3, I'm building an app and i;m trying to mimic the Rate My App that shows up rate message dialog in b/w specified intervals.
My problem is that i've made a setting using ApplicationData.current.loclasettings and it is an integer.
and i want to see the settings number being updated every time i close and run the app to ensure the logic is perfect.
but i'm unable to do it. Every time i deploy the app from vs it replace the original app and thus erasing all the settings that have been previously saved.
I've tried to use attach a process but it doesnt work on windowsphones.
Well after a bit of research and going through the documentation it is clear that there is no way you can attach a process to the app that is already running on the phone.
At least for me there was no other way because Microsoft kept the USB debugging thing a little bit undocumented or not documented at all.
So, who ever are looking forward to first launch the app on a connected windows phone and then start the the connect to a process and select the appropriate device for communication , story it is not possible, at least the build that i;m using doesn't support. may there might be a better solution in the future.
I'm building a big application with a lot of modules, i want to monitor them. Every module has its own different parameters that I'm interested in, ranging from performance, to logical statuses of components.
Eventually i need to concentrate all this information, and to be able to display it. Is there a framework i can use to achieve this? im using .net 3.5
You could try Munin. Once you install it - you simply write some plugins - small programs that will grab values from your application. And print them to command line in the form of values and labels. For example:
NoRDNS.value 10
Breakin.value 1
LogPassPAM.value 0
NoID.value 0
LogPass.value 100
InvUsr.value 23
LogKey.value 0
RootAttempt.value 0
Floats are OK too.
Munin will call the plugins periodically (every 10 minutes by default) and plot beautiful PNG graphs over time, track the min/max/average info, and organize everything in static HTML pages.
For you, probably the biggest problem with Munin would be setting it up on Windows. I never tried it on Windows - for me it works on Linux. Fortunately official website does have some options for Windows - in particular the munin-node-win32 program. You would need it.
Unfortunately, munin-node-win32 will only collect the data. To store (as RDD) and render the graphs (as PNG) you would need the Munin server. That can run locally or remotely. For running it locally, Cygwing may be and option but a sure way it to setups a virtual machine (see QUEMU or VirtualBox) running a simple setup of Ubuntu or Debian. In there, setting-up the Munin server is very easy - simply, run:
sudo aptitude install munin
and edit /etc/munin/munin.conf - placing the local IP address of the host where your application and munin-node are running. You don't even need to restart anything - Munin will be already configured in CRON so it will read the config file and do its job every 10 minutes as long as the VM is running. Just in case something goes wrong - the logs will be in the usual /var/log folder.
It looks pretty involved but it's easier than writing your own monitoring and graphing framework. I have a close relative who re-invented the wheel and wrote a monitoring/plotting system from scratch in .NET but I would trust Munin much more than his code.
At the end of the day you would point your web-browser to a private network IP address of the VM and get a nice performance report that looks like this.
Try wolfpack.codeplex.com - .net windows service based monitoring framework - fully extensible & ships with loads of plugins!
Provides passive monitoring (polling for data) and active - you app can pump data/kpis/stats into wolfpack. It also provides a geckoboard data api so you can get rich business dashboards in an instant.
PS: I wrote wolfpack!
You can use appfirst product. They have a way of discovering network flow and display what you described. This might solve your question.
I have an application for PDAs with a long running process, and I'm getting the problem that the PDA is going to sleep before the process has completed.
I haven't got any control over the power settings on the PDA, does anyone know a good way for my application to stop the PDA from going to sleep?
Many thanks
Have a look at:
http://www.pinvoke.net/default.aspx/coredll.SystemIdleTimerReset
You need to make a function that calls SystemIdleTimerReset, SHIdleTimerReset and simulates a key touch. Then you need to call it on a regular basis from within your application.
For an example in C++, look here:
Disable sleep mode in Windows Mobile 6