Website works locally but not when deployed
==================================
Can someone please help with what I hope is a common problem (I’m new to .net).
I have a simple website generated by Visual studio 2005 .NET
It has a custom handler because I need to poll my website and update the browser page every few seconds.
I have developed the project locally and everything is working FINE!
However … when I publish to my Website instead of getting my fresh data into the browser (IE) I get the handler HTML data ie the .aspx page HTML!
Do I need to do something with IIS? ( a grey area for me). If so I would be concerned if all users would need to make changes…
After 3 days hair pulling any ideas would be extremely welcome…
Visual studio 2005 Project
======================
MyProject
Folder App_Code
CaptionHandler.cs
CaptionHandler.aspx.cs
Folder App_Data
CaptionHandler.aspx
CaptionHandler.aspx.cs
Default.aspx
Default.aspx.cs
Web.Config
XMLHTTP requesting
======================
var http = getHTTPObject();
var URL = "CaptionHandler.aspx?rat=bad&dog=good”;
http.open("GET", URL, true);
wait (http.readyState == 4) etc
var string = http.responseText;
send(null);
CaptionHandler.aspx is shell page
CaptionHandler.cs is :
===================
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Runtime.InteropServices;
using System.Text;
/// <summary>
/// Summary description for CaptionHandler
/// </summary>
///
namespace MyHandler
{
public class CaptionHandler : IHttpHandler
{
public CaptionHandler(){}
#region IHttpHandler Members
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
string sVerb = context.Request.QueryString["…"];
string sCaption = context.Request.QueryString["…"];
context.Response.Write(sVerb);
context.Response.Write(sCaption);
}
}
public bool IsReusable
{
get { return true; }
}
#endregion
}
}
web.config
======================
<httpHandlers>
<add verb="*" path="CaptionHandler.aspx" type="MyHandler.CaptionHandler" />
</httpHandlers>
Fingers crossed ....