0

I created a generic handler (similar to a web page) Handler1.ashx.

When I browse to http://localhost:50824/Handler1.ashx the handler is called. So it is working.

But when I set Firefox's Settings to Manual proxy configuration (in Advanced-Network-(Connection)-Settings) with the proxy being: localhost/Handler1.ashx Port 50824 and then browse the web (e.g. http://Microsoft.com) I get an error Server not found.

Why is the handler not being called by Firefox?

EDIT

I tried using localhost only, and setting the handler as the default page. As before, browsing to localhost:50824 works. But Firefox doesn't call the page (and I get an HTTP Error 400. The request hostname is invalid. error).

7
  • Frist guess: That box expects a host name, and localhost/Handler1.ashx is not a valid host name. Perhaps we can help with a little more info... Why do you expect your generic HTTP handler is going to work as a web proxy? Nov 25, 2015 at 18:43
  • @Ƭᴇcʜιᴇ007 a) Why is localhost any worse than any other ip address? (I tried 127.0.0.1 as well.) b) I don't expect it to be a proxy. This is just the first step. (I actually did write some of that proxy code as well, but obviously I can't test that until it's being called.) I know it's not being called because a breakpoint I put there is not being hit. It is hit when browsing http://localhost:50824/Handler1.ashx so I know the handler is "activated".
    – ispiro
    Nov 25, 2015 at 19:01
  • "Why is localhost any worse than any other ip address" I didn't say it was? What I'm suggesting is that you're specifying the ASHX file name as well, which makes it no longer a valid host name. My thinking is that you would specify just the host name and a port, and then on that port, on that host, you answer with your handler (or whatever you want to use as a proxy) as the default. Nov 25, 2015 at 19:16
  • @Ƭᴇcʜιᴇ007 I actually tried setting the handler as the default page for the application and simply used localhost with the port. It didn't work. (Since it didn't help - I didn't mention it. Assuming that I'm missing something else here.) And as before - browsing to http://localhost:50824 does work. Firefox, on the other hand, never calls it.
    – ispiro
    Nov 25, 2015 at 19:20
  • @Ƭᴇcʜιᴇ007 See edit for the error message (in Firefox) itself.
    – ispiro
    Nov 25, 2015 at 19:27

0

You must log in to answer this question.

Browse other questions tagged .