views:

165

answers:

2

I’ve built an HttpHandler (ASHX) that sits in my web project. I have a test page that invokes the Handler and the Handler returns what it is supposed to. However, as soon as the return is done it gets invoked again. And again, and again, and again, ad naseum.

Any thoughts on what might cause this type of behavior?

The test page looks like:

<%@ Page Language="C#" AutoEventWireup="true" Codebehind="TestPage.aspx.cs" Inherits="RivWorks.Web.TestPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml"&gt;
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <h3>Tests</h3>
            <div style="background-color: Silver; padding: 10px;">
                <iframe class="welcome" src="http://localhost/barrows.riv?client=33ee472yaaM24a"&gt;&lt;/iframe&gt;
            </div>
        </div>
    </form>
</body>
</html>

The handler returns this:

<body style="border-width:0px;overflow:auto;margin:0px;padding:0px;background-color:transparent;">
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" id="ply" height="100%" width="100%">
        <param name="movie" value="http://localhost/widgets/player/1_1/rivplayer.swf"&gt;&lt;/param&gt;
        <param name="version" value="9"></param>
        <param name="scale" value="noscale"></param>
        <param name="allowscriptaccess" value="always"></param>
        <param name="wmode" value="transparent"></param>
        <param name="flashvars" value="campaign=10370&amp;interactive=JkVI5YTUAjWSd2nWWkpb1Q==&amp;localGateway=http://localhost/"&gt;&lt;/param&gt;
        <embed src="http://localhost/widgets/player/1_1/rivplayer.swf" name="ply" height="100%" width="100%" allowscriptaccess="always" wmode="transparent" flashvars="campaign=10370&amp;interactive=JkVI5YTUAjWSd2nWWkpb1Q==&amp;localGateway=http://localhost/" play="True" loop="False" version="9" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer/" />
    </object>
</body>

I’m stumped at the moment...

-kb

A: 
<iframe class="welcome" src="http://localhost/barrows.riv?client=33ee472yaaM24a"&gt;&lt;/iframe&gt;

Does the source have the handler enabled? And if it does, does it link another page which has it enabled? Could be you're recursively linking your pages forever :(

cwap
My web.config has this: <httpHandlers> <add verb="*" path="*.riv" type="RivWorks.Web.DeliverVideo, RivWorks.Web, Culture=neutral" /> </httpHandlers>On the test page there is a request to a .RIV file type which invokes the handler. The handler returns some HTML. No other pages are involved. Maybe I am not understanding your question.
Keith Barrows
A: 

Could you try firing up the debugger and evaluating the Request object inside the handler to try and see what's calling the handler? By this I mean try to evaluate either the Referrer or UserAgent and see who's making the request.

I wonder if the flash app you're instantiating might somehow be the issue here.

thinkzig
1st time into the handler:UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)"UrlReferrer = {http://localhost/testpage.aspx}AbsoluteUri = "http://localhost/testpage.aspx"The 2nd time through is the same. It looks good to me, it is just behaving as if it hit a refresh as soon as it rendered the player.
Keith Barrows
Found the problem and yes - it was in the flash app. If the browser type was FF there was an auto refresh happening (that was supposed to only fire once based on params being loaded in the flash vars). With the new services we are writing, this became an endless loop condition. <gaaah/>
Keith Barrows