Another Incorrect XML :) Banging my head

Ok i been banging my head over this and I walk away and now i am back for 5th time :slight_smile:
I keep getting error type Load XML description incorrect XML
I put breakpoints in my ashx file but they are never met, so makes me think something is wrong with my html… not sure.

Any help would be vastly appreciated :slight_smile: Thanks

I am using asp .net so I use the dhtmlxconnector to connect to my MSSQL database

Here is my ashx file

<%@ WebHandler Language=“VB” CodeBehind=“schedulerConnector.ashx.vb” Class=“RVCSC.schedulerConnector” %>

code behind

Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Web
Imports System.Web.Services
Imports dhtmlxConnectors
Imports System.Configuration



Namespace RVCSC
    <WebService([Namespace]:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
Public Class schedulerConnector
        Inherits dhtmlxRequestHandler

        Public Overloads Overrides Function CreateConnector(ByVal context As HttpContext) As IdhtmlxConnector
            Return New dhtmlxSchedulerConnector("Events", "EventID", dhtmlxDatabaseAdapterType.SqlServer2005, ConfigurationManager.ConnectionStrings("Samplesdatabase").ConnectionString, "FromDate", "ToDate", _
            "Subject as text, Details as details, Tags,doodle")
        End Function

    End Class
End Namespace

And here is my markup

[code]<%@ Page Language=“vb” AutoEventWireup=“false” CodeBehind=“cal.aspx.vb” %>

<script src="../dhtmlx/dhtmlx.js" type="text/javascript"></script>

<script src="../dhtmlx/connector.js" type="text/javascript"></script>

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link href="../dhtmlxScheduler/codebase/dhtmlxscheduler.css" rel="stylesheet" type="text/css" />

<script src="../dhtmlxScheduler/codebase/dhtmlxscheduler.js" type="text/javascript"></script>

<style type="text/css" media="screen">
    html, body
    {
        margin: 0;
        padding: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }
    /*event in day or week view*/.dhx_cal_event.past_event div
    {
        background-color: purple !important;
        color: white !important;
    }
    /*multi-day event in month view*/.dhx_cal_event_line.past_event
    {
        background-color: purple !important;
        color: white !important;
    }
    /*event with fixed time, in month view*/.dhx_cal_event_clear.past_event
    {
        color: purple !important;
    }
    /*event in day or week view*/.dhx_cal_event.warranty_event div
    {
        background-color: red !important;
        color: white !important;
    }
    /*multi-day event in month view*/.dhx_cal_event_line.warranty_event
    {
        background-color: red !important;
        color: white !important;
    }
    /*event with fixed time, in month view*/.dhx_cal_event_clear.warranty_event
    {
        color: red !important;
    }
</style>
<title>Service Calendar</title>
<script> 
function init() {
    scheduler.config.xml_date = "%Y-%m-%d %H:%i";
    scheduler.config.lightbox.sections = [
	    { name: "description", height: 130, map_to: "text", type: "textarea", focus: true },
	    { name: "location", height: 43, type: "textarea", map_to: "details" },
	    { name: "Tags", height: 30, type: "textarea", map_to: "Tags" },
	    { name: "time", height: 72, type: "time", map_to: "auto" }
    ]
    scheduler.config.first_hour = 4;
    scheduler.locale.labels.section_location = "Location";
    scheduler.locale.labels.section_Tags = "Tags";
    scheduler.config.details_on_create = true;
    scheduler.config.details_on_dblclick = true;


    scheduler.init('scheduler_here', null, "month");
    scheduler.setLoadMode("month");

    scheduler.load("schedulerConnector.ashx" + "?uid=" + scheduler.uid());
    var dp = new dataProcessor("schedulerConnector.ashx" + "?uid=" + scheduler.uid());

    dp.init(scheduler);
}
</script>

<script type="text/javascript" charset="utf-8">
    if (window.attachEvent)
        window.attachEvent("onload", init);
    else
        window.addEventListener("load", init, false)
</script>

<div id="scheduler_here" class="dhx_cal_container" style='width: 800px; height: 600px;
    position: relative;'>
    <div class="dhx_cal_navline">
        <div class="dhx_cal_prev_button">
            &nbsp;</div>
        <div class="dhx_cal_next_button">
            &nbsp;</div>
        <div class="dhx_cal_today_button">
        </div>
        <div class="dhx_cal_date">
        </div>
        <div class="dhx_cal_tab" name="day_tab" style="right: 204px;">
        </div>
        <div class="dhx_cal_tab" name="week_tab" style="right: 140px;">
        </div>
        <div class="dhx_cal_tab" name="month_tab" style="right: 76px;">
        </div>
    </div>
    <div class="dhx_cal_header">
    </div>
    <div class="dhx_cal_data">
    </div>
</div>

</form>
[/code]

Well i finally did get this to work… I started out simple and made a new ashx page.

For some reason it didnt add a code behind page this time, i thought it had in the past.

Anyways,

I added this code and it works.
I am guessing i had something wrong with my namespace class names and that was the issue … actually I know it was. Guess I dont fully understand how the work. I would still love to know whats wrong with my original ashx page.

[code]<%@ WebHandler Language=“VB” Class=“schedulerConnector” %>

Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Web
Imports System.Web.Services
Imports dhtmlxConnectors
Imports System.Configuration

<WebService([Namespace]:=“http://tempuri.org/”)> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
Public Class schedulerConnector
Inherits dhtmlxRequestHandler

Public Overloads Overrides Function CreateConnector(ByVal context As HttpContext) As IdhtmlxConnector
    Return New dhtmlxSchedulerConnector("Events", "EventID", dhtmlxDatabaseAdapterType.SqlServer2005, ConfigurationManager.ConnectionStrings("Samplesdatabase").ConnectionString, "FromDate", "ToDate", _
    "Subject as text, Details as details, Tags")
End Function

End Class
[/code]

This may happen if you don’t have the root namespace specified in your project settings. If you create your project by “Create Web Site” button, by default you won’t have project file and root namespace as well. In this case type name “RVCSC.schedulerConnector” will be invalid