All I found via google were kind of examples how to use IIS under windows server. I am not working under windows server. I would like to redirect webrequests (port 80/443) if they matches to a domain/IP I specified to a new Domain/IP I specified too. I know I could edit HOSTS file, but I'm searching for another way how to do so. Is there any windoes file I could directly access using c# whitch supports redirects or did you've some ideas how to get this task done?
Your only other alternative is a separate proxy server. But, if you're doing this on a single machine connected to the internet, it's kind of pointless since it's easy to bypass a local proxy server and just go directly to the 'net with it.
All browser requests would go through this proxy and it can filter on whatever you want.
It's better to just go with an off-the-product than try to write your own.
First of all: whose traffic do you want to redirect? Some traffic originating somewhere in the web and requesting something from your web server? Or traffic originating from a web browser on that machine?
Firstly, stop developing your own, and use the existing system: MSDN: Introduction to Membership[^] - it provides all the facilities you are likely to need, with much better security than you will achieve alone.
Just add a MenuStrip control to your form from the toolbox in the Designer, and it's pretty obvious from there in - it even prompts you with "Type Here".
Then double click the menu options you need code for, and it will add the method skeleton for you.
If you try a basic google, it will find loads for you: Add Menu Strip C#[^]
examples, tutorial, videos. What more do you need?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
NM... I think I'm on crack again... LOL... the new formula does work. If my range is 0 to 10, the mid point is 5. And the mid point on a control 30 pixels high, the pixel range is 0 to 29, so the mid point is 14.5 .
Ah, so I was pretty close... I guess I shouldn't try to write code at 11pm LOL... got thrown off by the 0 / 1 0 - 29 = 30 points thing haha... when I woke up this morning, I was like what the hell was I thinking?