Rusty Divine

Live, Love, Learn, Teach

IP Address and Domain Restrictions - IIS6 and IPv6

I have a WCF service running on an IIS 6 server that I wanted to restrict access to.  I have one outside domain that has a static IP address, and one internal website that uses the service.

When I checked the IIS logs to see what IP addresses were hitting the service, I saw the expected external IP address, but for the internal address it was in the form of IPv6.  I wanted to use IIS' "IP Address and Domain Restrictions" tool, but IIS 6 does not support IPv6 with this tool (although it looks like IIS7 does, sort of).

The IPv6 in the log file results from a web site installed on the same box as the WCF service that references the WCF service.  So, in the web.config the service reference was something like: http://abc-server/myservice.svc where "abc-server" was the name of my server.  When I changed this to the IP address of the server, like this: http://192.168.111.12/myservice.svc then the IIS logs showed that the internal website was using the IPv4 address instead of the IPv6 one.

At that point it was fairly straight forward.

  1. Open IIS, select the website with the service to protect
  2. Open the IP Address and Domain Restrictions
  3. Add Allow entries for both the external IP address and the 192.168.111.12 internal address
  4. Open the "Edit Feature Settings" link in the right side and select "Deny" for "Access for unspecified clients"; don't check the "Enable Domain Name Restrictions" since we're using IP addresses

Email Bounce: The error that the other server returned was: 550 550, no such user here

"No such user here" - I read that and hear a country song with a steel guitar and a sad southern drawl.

I just switched my hosting provider, but my domain is registered at a different provider.  I forgot to update my MX records so that email to @osmyn.com would get routed to the mail servers at the registrar for my domain.

I always have to muddle my way through this process, so here's what I did:

My registrar is GoDaddy (I know, I'm going to change it in a few months):

 

To Check Your MX Records in the Email Control Center

  1. Log in to your Account Manager.
  2. From the Products tab, select Email.
  3. Next to the account you want to change, click Launch. The Email Control Center displays.
  4. Go to the Domains tab.
  5. Select the email account you want to verify MX records for, and then click Server Addresses.
I took the suggested correct settings: 

 

 

And logged into discountASP.Net's server and updated my MX records and A Records there (to get the IP address of the A Records, I used c:\ping domain.name):

The update isn't instantaneous; it will take a few hours to propagate.

BlogEngine 2.5 .cshtml Razor Page Not Found

I fixed the 404.3 error I was getting in BlogEngine when navigating to pages that end in the Razor extension ".cshtml" by editing the links to those pages to remove the .cshtml extension.  The menu links I saw affected were admin\Default (dashboard), admin\Settings\Themes, admin\Extentions, admin\Logout, 

First, I did a global find in VS (ctrl+shift+f) to find anything that matched .chstml"  (I included the closing double-quote in my search since I was looking for links to these pages).  Then, I changed any code that was creating a hyperlink to a .cshtml page so that it instead was calling the appropriate action method.  For example, I changed "account/logout.cshtml" to "account/logout", and I changed "~/admin/default.cshtml" to "~admin/default" because even though "default" will be the default action and therefore not necessary, the tab menu tool needs to have the word default there or else it thinks you are always on the dashboard tab.

The files I changed:

  • Web.siteMap
  • admin\Settings\Themes.cshtml
  • admin\_Layout.cshtml
  • admin\Settings\Menu.ascx
  • admin\Settings\_menu.cshtml