asp.net MVC automatic sending mail every day (without windows service) [closed] - c#

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am searching for the best way to create a automatic mail system which fires every day (e.g. 00:00:00) and sends a list of mails.
Which is the best option to perform this task without slow down my application or harm to the server.
I don't want to use windows service to achieve this task. because i am using a shared windows hosting and they don't allow me to run it on the server
Thank you.

Which database do you use ? If its MS Sql Server You can use
THE sp_send_dbmail as a part of a stored procedure to send email.
http://technet.microsoft.com/en-us/library/ms190307.aspx
You can then set up the stored procedure as a Sql Server Agent job to run at regular intervals as shown below
http://www.c-sharpcorner.com/UploadFile/raj1979/create-and-schedule-a-job-in-sql-server-2008/

You could put WCF service with Quartz.NET http://quartznet.sourceforge.net/ aboard on the same IIS or on another machine.
This approach also allows you to have API to control your scheduler.
Regrads.

Related

ASP.NET Routine to make a Select everyday at midnight [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
So, I'm creating a system in ASP.NET using SQL Server that sends email notification to people about their expiring documents. The user inputs the date of the document and it will warn the user about it's due time 5 days before.
I thought about creating some routine that runs everyday at midnight and (SELECT *) comparing the actual date and the due date. Should I create a Stored Procedure on SQL? Or something in my .CS file that runs with Microsoft Task Scheduler?
As far as I can see it, you don't need an ASP.NET app for this. You can simply have a SQL job running on your SQL Server that runs at midnight, runs your SP (stored procedure) which sends the appropriate email as required. SQL Server has facilities to send emails via SMTP.
If however you want to create something more sophisticated in ASP.NET I would definitely look into using Hangfire, which allows you to have jobs running in background in an ASP.NET application (or not). Hangfire can handle pretty complex job scenarios, have a look here: http://hangfire.io

Which is better, a scheduled task or windows service? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I have created a console program that transfers data from a database to a server. This program must run every day at a certain time. At first I thought of a scheduled task but the problem is that it depends on a user being logged in. However, as it is rather tricky and the service has to run every day, I came to the Windows service through my research.
However, most of the information comes from 2009 and 2010 and may already be outdated? I also found a guide explaining how to create a scheduled service:
https://www.aspsnippets.com/Articles/Simple-Windows-Service-that-runs-periodically-and-once-a-day-at-specific-time-using-C-and-VBNet.aspx
Is that still best practice to do it that way? What would you recommend?
Your first thought was right, use a scheduled task and select the 'Run whether user is logged on or not'.
If you use a Windows Service you have to code the trigger yourself which could be fraught with errors.
If you'd like something more 'enterprise' I'd suggest looking at Quartz.NET. It's an open source scheduling library, although it's probably overkill for what you're trying to achieve.

Can SignalR be used with ANY database? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I need to implement push technology in my application. I need to display data on the web page as it gets inserted in the database in real time.
I am using ASP.NET MVC with IBM Informix as backend database. I am trying to figure out if it is possible to use SignalR with Informix?
Does SignalR have any dependency on the backend database? Or could it be used with any database?
Signal R is a system for real time (ish) communication over an HTTP connection and your database is for data storage. The two are solutions to completely separate problems, and there is no dependency between them. You can write code to link up these two parts of your application.

Timer for sending request at some time period [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have specific trouble: I'm using Yandex.Disk cloud storage and working with this by Yandex.Disk REST API. I have some functionality for syncing data and saving to db. Specially it's file name, file md5, file download url. But trouble is that download url is temporary. And I'm looking for solution, to have ability for apdating download url for all saved in db files, each 24 hours. First solution I found is another project that will be launching by windows task scheduler, but my hosting provider not giving this ability. Help me please to find good solution for this.
You can probably use hangfire http://hangfire.io/ to create a recurring task within your ASP.NET application.

Retrieve the user requests from a website using a desktop application [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I had made a site for client in which users can make request for songs, there's a database having songname, by whom, written by, sang at etc. The site is hosted and working fine.
The way the admin gets to know what is asked for is by using the website but now he wants that there be a desktop application which displays all the requests so he does not have to log in and use the website
I do have an idea to get this done, but I am hoping for a well known established way. I am using C# asp.net.
I think you can create an Http Handler. This handler will listen to the request and you can log them in a database, and the windows application will read from the database.
You can simply use Timer in windows application.
Set your Timer to either 1 min or 2 min as per your need.and on its Tick event you check the live database whether is there any new request come or not..
If new request come then you can show some notification or something like this...

Categories