Erros with the data.ashx file

I am following the instructions in SchedulerNet.chm, and using VS2013.

Once I create the data.ashx file, I copy the code I am suppose to insert in data.ashx.vb file, and convert it from C# to VB at telerik.com. After pasting it into data.ashx.vb, the IHttpHandler and the SchedulerDataContext have errors.

See screen shot --> screencast.com/t/ubhO2SwfvL9

Any ideas?

Hello,
from the context, SchedulerDataContext is a LinqToSql context class, which seems to be not defined in your project.
In a sample projects the related code files are located Scheduler.ASP.NET.VB/Data/ folder.
Please make sure that the class is defined in your app, and the related namespace is added to the data.ashx

You may check the code of the data file which works in a sample project

[code]Imports System.Web
Imports System.Web.Services
Imports DHTMLX.Scheduler
Imports DHTMLX.Scheduler.Controls
Imports DHTMLX.Scheduler.Data
Imports DHTMLX.Common

Public Class Data
Implements System.Web.IHttpHandler

Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest

    Dim dataResult As SchedulerAjaxData
    If context.Request.QueryString("recurring") IsNot Nothing Then
        dataResult = New SchedulerAjaxData((New SchedulerDataContext()).Recurrings)
    Else
        dataResult = New SchedulerAjaxData((New SchedulerDataContext()).Events)
    End If
    context.Response.ContentType = "application/json"
    context.Response.Write(dataResult.ToString())

End Sub

ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
    Get
        Return False
    End Get
End Property

End Class[/code]

I have noticed that the instructions I am following are for MVC. Where do I find the instructions for webforms, or doesn’t it matter?

LinqToSql is defined. The sample VB project will not compile either. Can you send me a ASP.NET/VB.NET webform sample? I can take it from there.

Hi,
the Scheduler.ASP.NET.VB example from the trial package should work. I’ve just check the version from the site - it runs correctly in Visual Studio 2010-2013

s3.amazonaws.com/uploads.hipcha … NET.VB.zip

Note, that if you run the sample on IIS, probably you’ll need to change the database connection string in web.config. The default connection string for attached mdf file may not work on iis. As a simple solution you can attach the mdf to mssql server