This project is read-only.

Setup Issue - some links have http://localhost

Dec 31, 2007 at 1:44 AM

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!,, Permalink, and the Subscribe link at the top. - They all point to http://localhost instead of ?

Any ideas on where i've gone wrong.

Jan 14, 2008 at 3: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 8:59 PM
Hi furaxvz,
I managed to fix most of my issues when i renamed the website from 'Default Web Site' to '' for example - in the properties of IIS. Not sure if your using IIS, but that managed to fix all the links for me.
Jan 15, 2008 at 1:58 PM

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

Jan 18, 2008 at 1: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?

Jan 23, 2008 at 2:38 PM

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 4:02 PM
I've found that blogengine holds onto the first host header that you connect to it with after restarting 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 7: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 2: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 (subdomain to which I had the blog initially configured) instead of going to (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?