Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Creating DNN Scheduler with DotNet Express editionCreating DNN Scheduler with DotNet Express edition
Previous
 
Next
New Post
5/17/2006 12:06 AM
 

Hi All,

Can anybody help me to create and deploy DNN Scheduler in c#. I have Dotnetnuke Sheduler.pdf file which comes along with DNN 4.0.2 documents but this is not clear about creating and deploying scheduler.

With the help of Dotnetnuke Sheduler.pdf  i created TestScheduler.cs and placed in components folder. Application copiled successfully. But when i tried to add scheduler through Host>Sheduler module i am getting an error message popup saying "WebDev.WebServer.exe has encounterd a problem and need to close. We are sorry for inconvenience." with Debug and close option. By clicking on close button browser shows Page not found page.

TestSchedule.cs

namespace MyNamespace
{
    public class TestSchedule : DotNetNuke.Services.Scheduling.SchedulerClient
    {
        public TestSchedule(DotNetNuke.Services.Scheduling.ScheduleHistoryItem objScheduleItem)
        {            
            this.ScheduleHistoryItem = objScheduleItem;
        }
        public override void DoWork()
        {
            try
            {
                this.Progressing();

               //Call private method to log the infomation.
                Writelog("This is from scheduler. " + DateTime.Now.ToLongTimeString());
                this.ScheduleHistoryItem.Succeeded = true;
                this.ScheduleHistoryItem.AddLogNote("Scheduler run successfully");
            }
            catch (Exception ex)
            {
                this.ScheduleHistoryItem.Succeeded = false;
                this.ScheduleHistoryItem.AddLogNote("Exception " + ex.Message);
                this.Errored(ref ex);
            }
        }
    }  
}

Thanks in advance.

SMP Kishore

 
New Post
6/6/2006 10:27 AM
 

Hi,

I am trying to help. I feel it is easy to create a DNN schedule process, comparing to other DNN modules.

What components folder are you referring to? \bin ?

Try using VS 2005 to create a separate class project with reference to DNN, compile it into DLL and copy the dll into the \bin folder of the DNN web site.

I hope this is useful to you.

skypekid

 
New Post
6/6/2006 2:45 PM
 
You didn't implement MyBase.new().

I tried adding the following task to the DNN Scheduler but when it runs I'm getting the following exception error message:

EXCEPTION: System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it

My local account username and password are apparently not working for authentication. Does anybody know a method to do a WebRequest without knowing a system administrator's username and password? My real username and password below were altered brlow for security reasons.

================

using System;
using System.Collections.Generic;
using System.Text;
// using System.Reflection;
using System.Net;
using System.IO;


namespace KeepAlive
{
public class KeepWebSiteAlive : DotNetNuke.Services.Scheduling.SchedulerClient
{
public KeepWebSiteAlive(DotNetNuke.Services.Scheduling.ScheduleHistoryItem objScheduleHistoryItem)
{
base.SchedulerEventGUID = "";
base.aProcessMethod = "";
base.Status = "";
base.ScheduleHistoryItem = new DotNetNuke.Services.Scheduling.ScheduleHistoryItem();
this.ScheduleHistoryItem = objScheduleHistoryItem;
}
public override void DoWork()
{
try
{
this.Progressing(); // Optional

// access web site
WebRequest req = WebRequest.Create("http://www.aoballoons.com/DNN/KeepAlive.aspx");
req.PreAuthenticate = true;
NetworkCredential networkCredential = new NetworkCredential("xxxxxxx@aoballoons.com", "yyyyyy");

// Associate the 'NetworkCredential' object with the 'WebRequest' object.
req.Credentials = networkCredential;

WebResponse resp = req.GetResponse();
Stream s = resp.GetResponseStream();
s.Dispose();
// resp.Close();
// req.Abort();

this.ScheduleHistoryItem.Succeeded = true; // Required
this.ScheduleHistoryItem.AddLogNote("Accessed web pages to keep them alive");
}
catch (Exception exc)
{
this.ScheduleHistoryItem.Succeeded = false; // Required
this.ScheduleHistoryItem.AddLogNote("EXCEPTION: " + exc.ToString()); // Optional

// notification that we have errored
this.Errored(ref exc);

// log the exception
DotNetNuke.Services.Exceptions.Exceptions.LogException(exc); // Optional
}
}
}
}
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Creating DNN Scheduler with DotNet Express editionCreating DNN Scheduler with DotNet Express edition


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out