Where is the Hosts file location in Windows 8?

The Hosts files is a file that allows you to override the DNS lookups for specific domains.

Say you want to test your application that has brianseekford.com hardcoded but you actually want to run it against your local computer IP 127.0.0.1

You edit the hosts file and simply add the entry:

127.0.0.1      brianseekford.com

ALL dns lookups will now return 127.0.0.1 when looking for that domain, so your browsers etc will now all redirect. It was also the old school way to do ad blocking, put in a domain you never want to resolve. i.e. ads.joe.com

Anyway, now that you know what it does, this is where to find it:

C:\Windows\System32\drivers\etc

Remember, open notepad as Administrator FIRST, otherwise you wont be able to save.

 

Temporary fix for internet for Frontier FIOS after Verizon takeover

Did you lose internet access after Fronter screwed the pooch on the Verizon take over? Personally, I am pissed at both Verizon and Frontier. Verizon was doing a fine job but got money hungry for quick capital and sold us to these clowns.

Businesses all over lost internet, phone, etc because they screwed up big time.

Well, it’s possible you might be able to get your internet working again with a little self-help.

I found that two things got me working again, but these are somewhat temporary fixes depending on how bad Frontier messes things up.

  1. You should change your DNS to googles public DNS. This means changing the way your computer/device looks up website names.

i.e. when you type in google.com it has to look up google.com in the DNS system to get the IP address of the website. Then you go to the IP. Frontiers DNS seems to suck a  big nut and not work, so you get a “domain not found” etc error. If you are getting that error, this may resolve your problem.

If you are a somewhat tech: The DNS IP’s are simple. 8.8.8.8 and 8.8.4.4

If you need more help setting it, Here is a link so I don’t have to type it all out:

How to Switch to OpenDNS or Google DNS to Speed Up Web Browsing

 

Now the second thing you will need to do is log in to your router. I hope you remember the credentials. If not, reset the bad boy and use the defaults for your router model. You should be able to look those up.

I use a Verizon ActionTec router.

What you need to do is release and renew the lease on the IP address in your router on the WAN. Sounds complicated right? It isn’t. It’s more complicated getting to the screen.

Here is a link that may help:

http://www.dslreports.com/faq/15898

 

Realistically, just type in your Router model on the back of the router and google How to Release IP Address on X.

 

I wish I could help more, but I am pretty slammed and just wanted to point out there may be a fix. It worked for me. At least my stuff works now, but only the devices I can change the DNS on. I still have to release and renew every few days as well.

 

So, in summary:

Change your DNS to 8.8.8.8 and 8.8.4.4

Release and Renew your IP on your Router.

Ideally, also set the DNS on the router on the WAN and LAN to the IP addresses above as well for devices that automatically use the DHCP supplied 192.168.1.1 IP.

 

-Happy Networking

 

Oh yeah, Frontier SUCKS and they haven’t changed my mind on that.

 

 

 

 

 

How to connect to a WCF service that has a mismatched Identity in code…

I had an issue where my client was connecting to a WCF service that was using certificate authentication, but the certificate was for a different dns name.

i.e. server was foobar.comp and the certificate was for foo.foobar.comp.

This presented an issue. Of course, you can change the Identity tag in the configuration file, but I wanted my program to be a little smarter. I grab the error from the WCF service and switch the Identity on the fly. Mainly I did this for a test application in a load balancing scenario due to the load balancer having a different DNS name than the servers. (Obviously!)

Hopefully you have written your own proxy class with a constructor that takes in the configuration name and an EndPointAddress.

You can then use the following style code to create your proxy with the Identity mismatch taken care of.


 protected override MyProxyClient CreateConnection(string Server, string altIdentity)
        {
            if (string.IsNullOrEmpty(altIdentity))
                altIdentity = Server;

            return new MyProxyClient ("MyServiceBindingConfiguration",
                new EndpointAddress(
                    new Uri(
                        string.Format("net.tcp://{0}:8090/seekford/2.0/SeekfordService",
                    Server)
                    ),
                    EndpointIdentity.CreateDnsIdentity(altIdentity))
                );
        }

We only are using the configuration for the primary settings, such as binding info. The actual server endpoint is being set on the fly with the altIdentity param being used to allow the server to masquerade with a different certificate.

Happy Coding!