How To Run Scheduled Jobs From .NET Without Requiring A Windows Service
Nov 21, 2010How to run scheduled jobs from ASP.NET without requiring a Windows Service to be installed on the server?
View 1 RepliesHow to run scheduled jobs from ASP.NET without requiring a Windows Service to be installed on the server?
View 1 RepliesI recently reinstalled Windows (on an SSD!) and I'm in the process of setting up IIS and all my web projects. One of my MVC project keeps asking for authentication on everything, including on resources like .css files and images. I'm using the default MVC template login with a custom provider that I'm using for dev purposes. I've tried rolling back my web.config to before I moved the project file and re-set IIS, but that didn't make much of a difference -- aside from changing authentication mode from Windows to Forms. Can you see anything wrong with my config?
<authentication mode="Forms">
<forms loginUrl="~/Account/LogOn" timeout="2880" />
</authentication>
<membership defaultProvider="SuperSimpleMembershipProvider">
<providers>
<clear />
<add name="SuperSimpleMembershipProvider" type="Website.Helpers.SuperSimpleMembershipProvider" />
</providers>
</membership>
I don't have any <authorization> element or anything else related to login, since I'm doing everything via MVC. Update: Tried <authorization><allow users="*"/></authorization>, still not working.
How can I add a Task in Windows Scheduled Tasks using Asp.Net.
How to execute asp.NET code in scheduled task of windows?
View 5 RepliesI have a windows shared hosting and i need to run some scheduled c# executable every day for create sitemap, send newsletter,etc...The provider tell me that i can't run executable for security reason.Whay can i do?The provider suggest me to buy a VPS, but do not think it makes sense to spend more money just to run some scheduled task.
View 3 RepliesAs indicated in the Subject, I have a web application (say APP) that should feature an e-Mail Notification Service (ENS). Activation of the Service is controlled by a Button in a dedicated page where some parameters are also included to set running Period (FromTime - ToTime), Interval, Recipients, etc.
When said button is clicked, it should maintain those parameters into database then launch ENS. Since ENS is expected to run for good according to set parameters, it logically should run as an external application/service, independent from APP.
When ENS starts, it needs to consult database to fetch parameters, then schedules its Timer to periodically check database for some transactions that when found, should trigger ENS to dispatch e-Mails to concerned Recipient(s).
CHALLENGES:
1. Launch ENS as an external application on button click from APP.Achieved by using System.Diagnostics.Process class. However, I encountered a problem in verifying if the process is already running before starting it. The root of the problem lies in
ProcessName property. Since ALL web applications must be launched via IE, hence, have
iexplore as their ProcessName, which is also applicable to all processes started through IE, it is very likely to have multiple processes utilising IE. How to check which is which? I couldn't figure out that.
Eventually, I ended up with a workaround: when the Process is started from APP, capture its ID and save it to database, then use this ID with GetProcessById() method for later verification. When the Process is terminated, reset stored ID in database.
2. What sort of application should ENS be: Windows Application or Web Application?
In either way however, ENS will always run invisible in the background being a Process. If this is the case, how about creating it as a Windows Service instead?
I did a lot of reading but still confused. However, the choice is limited now to either Web Application or Windows Service. Which one is more convenient to the task in hand?
3. What Timer to use?
I tried System.Timers.Timer in a test web application but it didn't fire! Then I used ASP AJAX Timer and it worked pretty well (I still need though to try running it from APP to judge its functionality). I came across some recommendations to use System.Threading.Timer but haven't tested that yet. Would it worth the trial?
4. ENS as a Windows Service.
If I create ENS as a Windows Service, would I be able to communicate with database? How would this influence the Timer to use?
I have a asp.net web site, I would like a page on that site to be able to invoke a Windows Scheduled task or a batch file on a server different to the IIS server?
Is it possible?
Iam using ftp client wrapper class for accessing ftp.
iam able to download files from ftp when used in windows application
when i try to use the same code with windows service i get an error
the error is
"The underlying connection was closed: An unexpected error occurred on a receive. "
this error i get on directory listing
the stack trace is:
[Code]....
Note:
FTP is getting connected throgh service
FTP is getting connected throug FileZilla, internet explorer
soruce code:
[Code]....
When i create a Windows Service for getting information from a Web Application(ASP.NET c#) for scheduling some task in the client machine.
To consume WCF from the web application. I added WCF reference to Window Service project as a service reference, everything seems fine. It updated app.config file, added service reference etc.
it was not working.
[Code]....
I have a web application - .net 4. The client is having a requirement that he want to send email to his users on a regular basis about his new courses etc.
The webapplication created will hosted on a "Shared hosting environment" with no excess to windows services - file system other than the web root folder through FTP.
Due to shared hosting i cannot create a windows service for him which will check the database - if there are any scheduled mail to send every 5 min.
So my question is - Is there anyway i can run a wcf web service or any other web based service or page or handler which can keep running and automatically checks the database for any new scheduled mails - if yes start sending it automatically in an different thread.
looking for a good opensource code for a jobs website. Do you know any?
View 1 RepliesThe application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
View 2 Replies.NET4.0 / VS 2010
The treeView never populates past Jobs.I have a SQL table with the following:
Node NodeName ParentNode
0 Jobs 0
1 Child1 0
2 Child2 1
3 Child3 1
4 Child4 3
5 Child5 4
6 Child6 4
private void FillTree()
{
con = new System.Data.SqlClient.SqlConnection();
dsl = new DataSet(); [code]....
I think it has something to do with the Root and Jobs being at Node0. I tried to do and conditional statement to skip the parentNode = "Node0" and NodeName = "Jobs" but for some reason it never sees the NodeName as "Jobs" in the conditional statement.
string parentCondition = ("Node" + (theRow["ParentNode"].ToString()));
string nodeCondition = (theRow["NodeName"].ToString());
if ((parentCondition.Equals("Node0")) & (nodeCondition.Equals("Jobs")))
{
}
I'm trying to get Quartz.net working by embedding into my .Net MVC2 application. I know this is not ideal, but I'm just trying to get it up and running before moving it over to a service. I can't get my jobs to fire off, but I think I'm configured correctly. In my Global.asax.cs:
protected void Application_Start()
{
Quartz.IScheduler scheduler = BuildQuartzScheduler();
}
[code]...
I'm trying to run my SSIS packages as a step inside a sql agent job.This runs normally when the package uses the SAME database as used to create my job.The problem occurs if I create a job to run the package and this package must execute queries in another database. Probably authentication problem. So how to authenticate my package and the job runs normally ?
View 1 RepliesWhat is the recommended "cleanest" way to manage a partial that appears on many views and also requires a viewmodel (assume it needs to get some data from a DB).
View 2 RepliesIs it possible to specify that multiple roles are required inside the authorization element of the web.config file? I currently have this block in one web.config of my site for a specific directory:
<authorization>
<allow roles="Global, Region" />
<deny users="*" />
</authorization>
I've just identified a special case where a person with two lower-level permissions than Global and Region should also have access to this directory. Roughly, I want something like this:
<authorization>
<allow roles="GlobalManager, RegionManager, SiteManager && FooSite" />
<deny users="*" />
</authorization>
I realize I probably should have a new role for this scenario, but I'd like to avoid that.
I'm not sure how much of a novice-level question this is. But it seems a fairly basic and common task. So here goes...
I am building a web application that will require some pages, but not all, to use a SSL (https:). How do I designate a particular page to be one or the other? Or do I need to create two separate projects and just have them pass the user back and forth as needed?
I am using Visual Studio 2008, with the Web Site Administration Tool handling users and roles. However I will also be handling very secure data such as social security numbers and the like.
using vb.net 2005.
what is the best and easiest way to test a windows service while developing it?
My students are working on an ASP.net VB application for a Web Programming competition and we are having problems with a page where we want an URL string to return all values from our database. Here is the page: [URL] If you use the jobs by category menu on the left side, if you select a job category (ie retail) it will pull up all the jobs from that category. By using a query in the URL like this: [URL] What we need is an option that would pull up all of the records regardless of category. So we made a menu option that passes the value "all". Like this: [URL] We use this information for the dataset we created (we're using Dreamweaver, ASP.net VB and and Access Dbase). We made a dataset SQL as follows:
SELECT *
FROM jobs, businesses
WHERE jobs.contactlogin=businesses.contactlogin and jobcategory = ?
ORDER BY jobs.dateposted DESC
This works fine if a value is passed. For example if "retail" is picked from the menu it passes the value just fine and returns all jobs that have "retail" as the job category in the database. My problem is, how do I modify the above Select statement to show all jobs in the database if the value "all" is passed for the jobcategory. My first thought was to create an If statement that says something to the effect of:
If jobcategory = all THEN
SELECT *
FROM jobs, businesses
WHERE jobs.contactlogin=businesses.contactlogin
ORDER BY jobs.dateposted DESC
ELSE
SELECT *
FROM jobs, businesses
WHERE jobs.contactlogin=businesses.contactlogin and jobcategory = ?
ORDER BY jobs.dateposted DESC
END IF
But I haven't been able to figure out the correct syntax. I also tried making this work by using a query in MS Access:
SELECT *
FROM jobs, businesses
WHERE jobs.contactlogin=businesses.contactlogin
AND (jobcategory = @jobcategory or @jobcategory = 'all')
ORDER BY jobs.dateposted DESC;
(which does work within MS Access) and calling the query in the Dreamweaver dataset but apparently MS Access can't do that.This seems like it should be easy but so far this problem is kicking my butt.
I'm bangin' my head against the wall here. I'm not even sure what I want to do is possible.
I have developed an ASP.NET app that will only be run on my local network (which incorporates a Windows Domain). It's running on IIS 7.5.I want to do this:
[Code]....
My problem is this: If I don't turn off Anonymous Authentication and ASP.NET Impersonation, I don't get the results I'm looking for. (if Anonymous is allowed, I get an empty string returned for username, and if ASP.NET impersonation is allowed, then "username" is always whatever account is associated with impersonation, like "Network Service"). If I turn those off and then turn Windows Authentication on, it works, but only after a dialog box presents itself asking for the Windows Credentials.
What I'm trying to do is NOT require the users to log in. Since they've already logged into the domain when they signed on their computer, I'd like to just allow them access to the ASP.NET application I've written, and identify who they are (based on their previous Windows login) using the line of code above. I don't need them to re-authenticate, because they're already authenticated from their domain login.I can't figure out what I'm doing wrong, or how to accomplish this. It seems the closest I've gotten to what I want so far, is to turn off all authentication EXCEPT for Windows Authentication. It works then, but only if the user first types in his/her username and password again in a dialog box. Is there any way to avoid having them type in their username and password again, but still be able to identify their domain username?
We have two servers, both are containing a local application connecting to local web service, applications and services are identical on both servers. One of the servers work just fine, The other one is just dead, I have impression the the security configuration are different on those servers. What prevents an application X from connecting a web-service, given that another application y on the same server can connect to it. and X is a windows service. What I should check, what is chances?
View 2 RepliesI need to read the data from the COM port in a web application, so I have written a Windows Service for reading data from serial ports. Now I need to access that data in a web application. Can anyone tell me how to access it? Is using threads the best way to do this or not? What other possible ways are there?
View 3 RepliesI wanna embed the windows service in the web application. I have seen few posts in the web. where they generate separate exe for the windows service and use it as an installable.
The same process i tried doing it but it threw an OS error in my server which is windows 2000 and didnt supported the executable.
However the website of mine runs fine in the same server. Thus i was thinking if i cd embed the same code in the web application.
Also, in my case the website of mine takes job for simulation. These jobs are taken for simulation execution and nearly takes 12hrs for completion and if they are not completed within twelve hours then they are supplied extra twelve hours to complete the simulation jobs.
The simulation executables are a series of executable and bat files.
The results of the simulation gets updated in the tables of MySql and hence are displayed to the user.
I need a windows service. This service will start when userId insert on myDatabase.And after I want to handle this userId send
to my web service.If webservice return true I insert this userId another table on mydatabase. How can I write this?