views:

71

answers:

5

In an ASP.Net WAP, the home page /default.aspx is receiving periodic requests from I-know-not-where. Thinking this was BS when it was reported, I fired up my local copy of the site under Cassini and set a breakpoint on the home page's page_load() event. Sure enough, every few minutes the breakpoint is hit.

Any suggestions? This is a pretty cut-and-dry site with no monitoring services, etc running, especially on my local machine. When the breakpoint is hit, the site's not even open in a browser. Help!

update on the dev box, this appears to be happening in exactly 5 minute increments.

update By examining the request object when the breakpoint is hit, I can tell that the request is coming from the local machine. However, I don't even have a browser open that's pointed at any local site. Argh.

I've not been to successfully configure Fiddler to capture any traffic that doesn't go to an outside machine. It's also worth noting that attempting to trace/step over when the break point is hit just runs the process - it doesn't break again until the 5 minutes are up. Wahoo.

another update running the site on a dev server that no one is touching is producing a hit in the log every 5 minutes +- 1 second from 127.0.0.1. There aren't any browsers running on that machine. Also, I'm logging the request url, user agent and session id for every request, and all three are null. Ideas?!?

+3  A: 

Check what IP address the requests are coming from.

Check your firewall.

Run a network monitor on the machine.

SLaks
127.0.0.1. Cassini has site registered at 127.0.0.1:81, isn't even accessible from the outside. Also, same problem is happening on production servers, etc.
David Lively
Run Fiddler or netmon and see what process is sending requests.
SLaks
How do I use fiddler to intercept web requests?
David Lively
Just run Fiddler. It will show all requests from the local machine, along with the process that sent them.
SLaks
Can't seem to catch any traffic unless I have a browser configured to use the fiddler proxy. Some setting I'm missing?
David Lively
Firefox won't use it by default; other browsers will. Is it filtered to only show traffic from browsers? (Look at the status bar)
SLaks
A: 

Right, this cannot come from outside. Very odd. Run a sniffer and check the request. Or check the Request object in the debugger. Check the IIS logs on the servers if the requests show up. The fact that this happens in Cassini makes it much easier to find, actually.

cdonner
A: 

Does your site spawn any threads, background tasks, or dependency checker kind of stuff?

GrayWizardx
Unfortunately, no.
David Lively
A: 

You can use Fiddler to capture local traffic by replacing "localhost" in the URL with "ipv4.fiddler". That works even with nonstandard ports, such as with Cassini.

Is it possible that your page is up in a hidden tab somewhere? Or maybe the browser is still running even though it doesn't appear on the task bar (check Task Manager)? Do you have a meta-refresh tag on the page?

Port 81 is unusual for Cassini. Are you sure you're not using IIS? Or maybe you have both IIS and Cassini running on the same site?

Do you have any custom HttpModules or custom startup code or some type of background task or event from your main page that's doing a WebRequest or a web services call? Maybe that code has the URL wrong?

RickNZ
The breakpoint is being hit while attached to the Cassini process. Cassini config (ultidev, not the vs version) has the site configured at port 81. I've made sure that there are no firefox or IE processes running. No refresh tags. I'd like a way to capture any *incoming* traffic to the server... at least then I could tell which process it's coming from.
David Lively
You can capture all incoming traffic by using an HttpModule. You said the error happens in production too, right? Have you tried using Fiddler to see if your machine is issuing more than one request? Might work in localhost mode too.
RickNZ
+1  A: 

hi!

http://www.ultidev.com/Forums/framehelper.aspx?g=posts&t=245 "Every application registered with UltiDev Cassini has the "Always keep application in memory" flag a.k.a. "keep running" flag, which when is on ensures that your application will not be unloaded from the memory even when it idles for a while, which improves "first page served" time of the application. To do that Cassini calls the default page of the application every few minutes. You can easily switch this flag off either from Cassini Explorer UI, or programmatically when you register your application with Cassini during installation. Once you clear the flag, the problem will go away."

fonio
Wow... old question but one that was tickling the back of my mind. Thanks!
David Lively