Running A .NET Program As A Background Service?
Nov 23, 2010
Here is the simple scenario that I want to apply; There is a .NET application(console or windows) appA and this code updates a large global variable(+50MB) in the project every 30sec. I have another application appB which is a .NET web application and I want to be able to access the updated value of global variable in appA from appB whenever I want.
View 3 Replies
Similar Messages:
Mar 29, 2014
I want to know how to run a program whenever i power on my computer , the program must run in the background automatically.
View 1 Replies
Feb 11, 2010
I am learning C# in Visual Studio (VS), and in VS i have successfully made different 'projects' under the 'solution' for each fo the samples in my C# book as can be seen here:
[URL]
the thing is when i press the green play button to run the debugger/program, it always executes "ConsoleApplication1" (look at the above image) when i want to try out the new application i wrote (named ConsoleApplication3)
How do i do that?
View 1 Replies
Jan 14, 2012
I'm trying to make a Web Page in ASP.NET that functions like a TcpListener or a Socket so basically you could "connect" to other people accessing that Web Page.
It also can't be a constantly running program that's accepting clients and would crash if the program was closed.
Just wondering if this is possible and where to look.
View 1 Replies
Jan 21, 2010
I was thinking to create a timer to display the elapsed time for a long running task in my asp.net application. I was able to create the timer to run using javascript but i have a problem with it, that is, how can i maintain the elapsed time so that even the user navigate away from the page, the timer will still running and when user return to that page again, he/she still can see the timer running. Beside that, another user that access that page from another computer will also see the timer running. How i can achieve this??
View 1 Replies
Mar 28, 2011
Is it possible to run a web service as a particular user/service account in the same way a Windows service can?I have a service account used for connecting to the DB and want to run the webservice under this account as the users using the webservice won't have DB access.The way I see to do it is to include the Impersonate option in the Web.config file, but is there any better way to do this?
View 1 Replies
Feb 4, 2011
In my website, I am using thread to perform a repetitive process in background. Now the process takes around 30 to 45 seconds to update the database.
Basically the function performs the following:
1) Download the CSV from a website.
2) Parse the CSV and update the database tables.
I want to optimize the performance and decrease the time it takes to 15 seconds.
How can I do this?
EDIT:
Here is the Code:
[code]....
View 1 Replies
Jan 18, 2011
I am working on a web service program but is stuck. i dont know what to do after I use the foreach statement to retreive my data.
using System;
using System.Collections;
using System.Collections.Generic; [code]....
View 5 Replies
Oct 18, 2010
I want to be able to run an ASP.NET application when a file is upload via FTP. I understand how to use the filewatcher class to monitor the directory but I don't know where to put the code so it is always running.
Files will be uploaded once per month for each group of users of the system and the next time the user logs on after the upload I would like the application to reflect the new data. I don't want to check for a new upload when each user logs on because the processing could take a log time.
The uploads are automatic from multiple other computer systems and not done by any user.
The Application is hosted (by GoDaddy) so I don't have full control of the server.
Is there any way to have a process running all the time in the background and if so how? The application is written in VB.net.
View 1 Replies
Aug 3, 2010
Bit of a long shot, but is there a way in ASP.NET to dynamically get the website's URL [URL] when there is no HttpContext.Current available.
There is no HttpContext because the code is running in a background thread* (but under the ASP.NET AppDomain). I have a background process that sends emails out every evening, and needs to include the Web address, but I don't want to hard code it because of deployments and testing (it changes from [URL] to[URL] and then to [URL] for the live site).
View 2 Replies
Aug 3, 2010
I have a web application that initializes a third-party com application to perform few calculations. The website is deployed on a windows 2008 server (standard edition).
The problem I have been facing is that when I am logged in to the server (Remote Desktop Connection only as the server is not local), the com application initializes fine. But when I log-off or just close the remote desktop connection, the application doesn't get initialized. I have searched for a solution and found this:
[URL]
I created the scheduled task as I didn't know how to create the windows service (the description at
http://support.microsoft.com/kb/251192 is too confusing), and got the application to run when windows starts before even the user logs-in. But in even in this case, the application doesn't work unless the user is logged in and when I log-in, a second instance is created (with exactly the same user (admin)) and the original instance is never used.
I cannot get the application to run without logging off or atleast having to close the remote desktop connection.Is there anything I am doing wrong?
View 1 Replies
Feb 3, 2011
In my website I am using thread to perform the function which downloads the CSV from a website and parses the data into the database.
Now if I am not able to stop the thread then what could be the impact on the performance?
Also If I unknowingly start another thread then would it impact my website's performance?
View 3 Replies
Apr 1, 2011
We have an ASP.NET / Silveright web application. The silverlight client displays user specific data in a graphical form - it requests the data from the server: Problem: Getting this data is expensive, due to the underlying database queries that the server has to perform - so the client has to wait... Optimisation Idea: We run the database queries at regular intervals on the server, writing the results to a 'userdata' table in a database 'close' to where the ASP.NET server runs. The process of running the queries and writing the data to the tables is performed by a 'data collection' service, which is separated from the ASP.NET server.
When the client requests data the server retrieves it from a 'userdata' table. This should be nice and quick - we probably have the 'userdata' tables on the same machine as the ASP.NET server. We also have the added benefit that the client sees data even if the underlying database is offline. Of course the data is not live - but all data is potentially old as soon as it reaches the client. So now my Problem: The 'data collection' service needs the user credentials in order to perform these database queries (because each user gets different results for the same query).
How can I store user credentials in a database, in an acceptable 'secure' way? Such that the 'data collection' can impersonate a user to perform the database queries. Our initial scenario is based upon using windows integrated login to the database.
View 1 Replies
Aug 25, 2010
I have Requirement to update the label text as we are processing the code (Long running).
Example:
I have Label and button on aspx page.
On button Click Iam calling the AppCode which is going to do long work for me.
I want to update the label text from the appcode (which should reflect in the page then and there.)
I have tryed to pass the text value to the label but it shows the changed text only after the event for the button click is finished.
I tryed using timer but as soon as i click the button the refreshing stops.
I tryed progress template and UpdateProgress without success. (I know we can update at the start and end of proccess using this)
I dont want to use iframe (I know we can do using iframe)
View 3 Replies
Sep 9, 2010
I try to install vistual 2005 on Win 7 On meantime I have net1.0 sp3 developer ;net Framework 2.0 , Microsoft Device Emulator version1.0 -ENU,Microsoft Visual J#2.0 Redistributable Package( can I uninstall This package)the studin 2005, but when I try to install the update (VSBsp1-KB926747-x86-INTL) i get hte error:The update patch cannot be installed by the Windows Installer service because the program to be updated may be missing, or te upgrade patch may update a different version of the program, verify that the program to beupgraded exists on your computer and that you have the correct Upgrade patch how to deat with this problem??
View 6 Replies
Mar 11, 2011
I have an web application which needs some calculations and processing on data. This job is a long running job(few hours). Job is initiated by user.
Requirement.
User Clicks on Process Data.
Some functions are called to start data processing.
Data Processing runs for hours.
User is given feedback of percentage completed etc.
Even if user logs off and then again log on he should get this feedback.
The requirement is somewhat similar to Spiceworks. Where it runs in background to detect the devices/computers in network and the user is notified in his page about the progress. But spicework uses windows service. We don't want to us windows service.
Now the question is.
What if user closes the page, will the task still run in background. This task has to be completed fully.If terminated in between output will not have any meaning. How to actually to design this long running process. In ASP.Net environment. Also is there a way to show all/same user who logs in the status of processing.
View 1 Replies
May 21, 2010
The following code is part of a WCF service. Will eventWatcher take up a thread in the ASP .NET thread pool, even if it is set IsBackground = true?
[code].....
View 1 Replies
Dec 7, 2010
am having a web service that fetches some couple of results. When i run the service independently in my firefox, it returns the required result. But when i use Ajaxautocomplete in my page, it returns no result. The page is binded to a master page and is in a folder thats attached to the root folder....i.e. My page is in ~/Students/Default.aspx. My Service is also in a folder where i prospect to put future services...i.e. ~/Services/WebService.asmx.Here is a code for my webservice
[Code]....
Here is how i call the service in my Default.aspx page
[Code]....
View 3 Replies
Apr 5, 2010
I have an application where I want to send an email reminder for an appointment 24 hours prior to the event. Users would log in and insert appointments. I would think I would want a background thread running on the server that would regularly check the database (say every hour) and generate an email if there is an event is due within the next day. From what I have read it seems like a Web service might do this. I guess I have a few questions
1) am I on the right track - is this an application for web services
2) can anyone point me to a good resource which can help me create the web service I would need. I would prefer if it is in VB and not C#.
View 11 Replies
May 18, 2010
I'm trying to learn AJAX but I am having trouble getting things working. I downloaded an example app from the web that was written in C# and have got it working perfectly, the next stap was to convert it into VB but for some reason this does not work. I keep getting a "Error: 'myServices' is undefined " error message on the web page. Try as I might I cannot cure this and I know it is something so simple i'm just looking past it.
I'm trying to get some autotext functionality working but I've cut the code right down just to try and get it working, everything seems to work fine apart from the webservice call which returns the 'undefined' error. If I click the button on the web page the code behind is invoked and the webservice code is also run without problems. I just can figure out why I can't run the webservice directly from the web page.
The code
Default.aspx html/javascript
<%@ Page Language="VB" AutoEventWireup="True" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
[code]....
View 3 Replies
May 6, 2010
I'm trying to debug a co workers application that calls a web service to encrypt data.
But when I get to the line
bool login = Security.Login(username, password);
[Code]....
View 2 Replies
Sep 9, 2010
I am trying to have a marker show whether or not a particular service within the services.msc is running on a remote server(s). I have a service called Yardi Services on a virtual server. I want to be able to show on a dashboard I am creating for work, whether this service in running or stopped. For some reason this service will randomly stop though I have a auto restart on error. I am assuming that I would need to create a web service or use WMI?
View 2 Replies
Apr 16, 2010
here's my issue. I'm trying to run service based applications from Visual Studio. My previous workstation died, and I got a replacement, and I can no longer run the service based apps from Visual Studio, so obviously there's something that I neglected to reload. The specific error I'm getting is:
Cannot start service from the command line or a debugger. A Windows Service must first be intstalled ( using installutil.exe) and then started with the ServerExplorer, Windows Services Administrative tool, or the NET START command.Going through debugger, I eventually get the error "Service <appname> was not found on computer .."The DOS environment does not seem recognize the installutil.exe command.
View 2 Replies
Jun 10, 2010
How can we know from the client, whether web service is running or not? I mean through the code
View 1 Replies
Jan 12, 2011
I would like to makea windows service. whenever the user of my ASP.NET application has to do a time-consuming task, the IIS would give the task to the service which will return a token(a temporary name for the task) and in the background the service would do the task. At anytime, the user would see the status of his/her task which would be either pending in queue, processing, or completed. The service would do a fixed number of jobs in parallel, and would keep a queue for the next-incoming tasks. In addition there would be a WinForms application for system administrator that would allow adding special ADMIn tasks such as "Clean orphaned files" or "archive data of inactive users".
Can you point me to something that can jump start me on this as a whole concept - I know I can google for windows services and I am able to do it myself from scratch but time is of the Essence so maybe you know of something that is already there and i can use block to build out of.
View 1 Replies