VS2005 Website works locally but not when deployed

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dogged
    New Member
    • Feb 2008
    • 3

    VS2005 Website works locally but not when deployed

    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&d og=good”;

    http.open("GET" , URL, true);

    wait (http.readyStat e == 4) etc

    var string = http.responseTe xt;

    send(null);

    CaptionHandler. aspx is shell page
    CaptionHandler. cs is :
    =============== ====

    using System;
    using System.Data;
    using System.Configur ation;
    using System.Web;
    using System.Web.Secu rity;
    using System.Web.UI;
    using System.Web.UI.W ebControls;
    using System.Web.UI.W ebControls.WebP arts;
    using System.Web.UI.H tmlControls;
    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.Respons e.ContentType = "text/plain";

    string sVerb = context.Request .QueryString["…"];
    string sCaption = context.Request .QueryString["…"];

    context.Respons e.Write(sVerb);
    context.Respons e.Write(sCaptio n);
    }
    }
    public bool IsReusable
    {
    get { return true; }
    }
    #endregion
    }
    }


    web.config
    =============== =======

    <httpHandlers >
    <add verb="*" path="CaptionHa ndler.aspx" type="MyHandler .CaptionHandler " />
    </httpHandlers>

    Fingers crossed ....
  • dogged
    New Member
    • Feb 2008
    • 3

    #2
    I think I may be finally discovering the problem here.

    My Web hosting company (which advertised ASP support) now reckons I need to add NET framework support to my account and that my website has to run in the root directory. A pain since I already have a website running there.

    Does anyone know what other features I need to get to run my simple website! I guess I need ASPNET 2.0 support but do I need to insist on AJAX extensions?

    Anyone recommend a good hosting site that has all the necessary features?

    Many thanks

    Comment

    • dogged
      New Member
      • Feb 2008
      • 3

      #3
      This was the problem - silly me I thought .NET framework came with everything nowadays.

      Comment

      Working...