Setup Issue - some links have http://localhost

Dec 31, 2007 at 12:44 AM
Hi,

Just wondering if someone can point me in the right direction - i've followed the guide to install the software, i'm running the website from one of my home pcs. It all looks to be configured and working ok. It all works fine locally, but when i browse the site from work a few links are incorrect...e.g Kick It!, DZone It!, del.icio.us, Permalink, and the Subscribe link at the top. - They all point to http://localhost instead of http://halls.homeip.net/blog/ ?

Any ideas on where i've gone wrong.

Thanks,
Simon
Jan 14, 2008 at 2:39 PM
I am seeing the same thing; some of the links point to http://localhost instead of using the server name. I'm not sure where to look to configure this correctly.
Jan 14, 2008 at 7:59 PM
Hi furaxvz,
I managed to fix most of my issues when i renamed the website from 'Default Web Site' to 'halls.homip.net' for example - in the properties of IIS. Not sure if your using IIS, but that managed to fix all the links for me.
HTH,
Simon
Jan 15, 2008 at 12:58 PM
Simon:

Thanks very much. I am using IIS and the website is called 'Default Web Site'. I will try your suggestion.

Thanks!
Jan 18, 2008 at 12:00 AM
Did you get yours fixed furaxvz?

I just reimaged my machine and now i've got the same issue, even after i've renamed the website?

Simon
Jan 23, 2008 at 1:38 PM
Simon:

Yes! It did work. I renamed it something different than "Default Web Site" then restarted IIS. So it is working for the moment, thought I'm not sure why.
Mar 27, 2008 at 3:02 PM
I've found that blogengine holds onto the first host header that you connect to it with after restarting IIS...so if you connect using localhost to test something out...that's what will be used.

My question is where is the code that determines what host header to use and if it's possible to make that configurable. (Through web.config or even better through a dynamic setting.
Apr 22, 2008 at 6:09 PM
I tracked down the issue in the Utils.cs file. After the AbsoluteWebURL value is loaded it never re-loads. So if you restart your website and then connect with localhost then all links that use AbsoluteWebURL to build the link gets the http://localhost value.

Have a look at the Public Static Uri AbsoluteWebURL in Utils.cs for the culprit.

For now I would say that if you are seeing a problem with links then restart your website and be sure to connect using the public domain address.
Apr 23, 2008 at 1:51 PM
I wonder if this issue is related to something that I am seeing (all apologies if not related):

Sometimes the link followed by clicking on the blog title or "Home" goes to blog.othername.com (subdomain to which I had the blog initially configured) instead of going to mywebsite.com (the preferred domain).

The result of this is that I have content indexed all over Google, via the raw ip address, the subdomain, and the preferred domain.

Is this me and my poor understanding of IIS, or something else?