continously running thread in asp.net web application - c#

i want a continously running thread in my web application for sending mail to admin if the logged complaint of the user in not solved by technician within 24 hours.
i am able to send mail to administrator
i just want a watch on database for unsolved issues with timespan of more than 24 hours and inform to administrator about the same
how can i perform it. any ideas

Create an aspx page/asmx service to check the database and send email providing appropriate check in the page/service. This page/service can then be called using PowerShell script on the server, and that powershell script can be scheduled to run in task schedular using specified intervals. Hope this shall acheive what you wants.

The right way to do it would be to write a Windows Service which will monitor the database and send emails out.

If your asp.net web application uses sql server, which i imagine it does, i would reccomend creating a sql agent job which executes some sql with the business logic you desire, and sends emails using the built in sql server email sending functionality
SQL Server Agent Mail

1) Windows service which will monitor the table
2) SQL Job

Related

send emails automatically at a particular time without running application

I need to automatically email the contents of a datatable daily at a particular time(10AM and 8PM). Without running the application how will i achieve this.. Please help me.. How to autogenerate emails at a particular time
You can use sql mail write a stored procedure that runs on a schedule using job services. Don't need c# and console app is a pain to build deploy and another app to manage.

Suggestion on long running process

My requirement is to create a website in which any number of user can login and click on a button. The task inside that button click will be a long running process (May take hours or days to finish the task). User can logout from the website and can login occasionally to check the status of the task.Is it good to use the idea in this article. Please give some suggestion on this.
Thanks.
MSMQ or SQL Service Broker used to communicate with a Windows Service.
asp.net page sends start request
------------MSMQ------------>
Windows service picks up message
and starts the long running job.
As progress is made, it can be
recorded in a "Jobs" table
client checks status from the Jobs table
IIS app pool recycles
.... days pass
Service completes work, and records
the job as Completed
Service might send email notification
with a link to the webpage
client can later retrieve the rendered job
If you really must stay within IIS, I would still use MSMQ or SQL Server, but you would just have to put your service code in Application_Start.

Send Mail Automatically in asp.net

Few days ago I have a website in which i send mail automatically by using Task Scheduler.
I have Created a console based application in it and send mail using task Scheduler at regular interval. But Now the site owner is moving that site from virtual hosting to shared hosting.
And they are not allowing to schedule task. Neither they are providing Sql Server agent and not allowing to Create Window Services so what option i have to send mails at regular interval.
and also i have created that site like a year ago so it will be difficult to make much changes in that site.
Can anyone suggest me what option i have to send mails.

Communication between Client and Server running on two different machines in C# using Visual studio 2010

i need Communication between Client and Server running on two different machines in C# using Visual studio 2010
The main app that is the client app needs to tell the server app on the server to start and stop process. and server app needs to tell the main client app when process has been completed and also of any errors
please give me some suggestion , what is best to use for my application .
The easier form of doing that, I would think on having a database in the middle for communication between the client app and the server.
On the server you would have a service on continuous running, and querying the DB if he should start the process (code) or not. The server will mark that task as Started, and when it finished, it would mark Finished. The client, only need to add new records to a table where the server will look for.

Report Server Web Service: Connecting Subscription to schedule

I'm currently in the process of developing a front facing ASP application for a client which is wired up to the ReportService2010.asmx web service. We are using SQL Server 2008 R2.
I have figured out how to fetch all schedules and create them on our end through the interface, but I can't figure out how to then create a subscription that is then connected to that schedule so that it runs at the time.
Can someone help me please?
In the end I found that unless some custom assemblies are added to the report server, subscriptions do not connect to schedules and are two different things.

Categories

Resources