Rename BlogEngine.NET directory

Apr 19, 2010 at 2:12 AM
Edited Apr 19, 2010 at 2:13 AM

After a long-fought battle I was actually able to get BlogEngine.NET working as a sub-application (inside my existing application) both on my local machine and on my web host.  On my local machine I've able to create the virtual directory where I put the blog, so I can call it whatever I want and everything seems to work.

What I'm trying to do is simply rename the 'BlogEngine.NET/' directory to 'blog/'.  Using the default name works fine, but when I change it to 'blog' I get resource errors:

 

 

Widget TextBox not found.

The file '/blog/widgets/TextBox/widget.ascx' does not exist.X

Widget Administration not found.

The file '/blog/widgets/Administration/widget.ascx' does not exist.X

Widget Search not found.

The file '/blog/widgets/Search/widget.ascx' does not exist.X

Widget Tag cloud not found.

The file '/blog/widgets/Tag cloud/widget.ascx' does not exist.X

 

 

Is there a way I can rename the directory to something simple, like blog, without having to do a much of manual fixes throughout the code?  It seems like there should be a variable or something I could set to fix the problem.

 

Thanks.

Coordinator
Apr 19, 2010 at 11:47 AM

A directory name such as BlogEngine.NET is not hard coded into the BE code.  So, you should be able to change the directory name without having to make any coding changes.  If you haven't already, I would try restarting the blog to see if that eliminates the error.  You can restart the blog by making any change to the web.config file (add a space, etc).

Also, you said that you renamed the folder to 'blog'.  But did you rename or update the virtual directory within IIS?  The virtual directory name in IIS might still be BlogEngine.NET and pointing to a non-existant physical directory 'BlogEngine.NET'.  IIS would need to be aware of the new directory name.  Simplest way is probably deleting the virtual directory in IIS and adding a new virtual directory for the renamed 'blog' folder.

Apr 19, 2010 at 1:42 PM

Hi BenAmada,

On my local installation everything works fine, but on my local installation I named my virtual directory "blog" in IIS so it doesn't really matter what the name of the actual directory is.

However, in a hosting environment (discountasp.net) the only functionality available to me is to mark a directory as an application.  As an example of what I am seeing, I uploaded 2 copies of BlogEngine.net to my host.  In one instance I renamed the root directory to 'blog' and in the other I did nothing.  You can see that on the one named BlogEngine.net everything seems fine but in the other I get invalid references.

Cheat Sheet War Room Blog

Cheat Sheet War Room Blog With Rename

Coordinator
Apr 19, 2010 at 3:36 PM

On your host server, you create directory with any name and mark it as application. Then you move files from your local "BlogEngine.NET" directory (but not directory itself) in that application folder you created. Your web.config, global.asax etc. must be in the application root for BlogEngine to function properly.

Apr 19, 2010 at 5:52 PM
Edited Apr 19, 2010 at 5:53 PM
rtur wrote:

On your host server, you create directory with any name and mark it as application. Then you move files from your local "BlogEngine.NET" directory (but not directory itself) in that application folder you created. Your web.config, global.asax etc. must be in the application root for BlogEngine to function properly.

 Those are exactly the steps I followed and you can see that there are still invalid references. The link is posted above.

Coordinator
Apr 19, 2010 at 10:16 PM

If you navigate directly to /blog/widgets you won't see anything in that folder, while navigating directly to, for example, /blog/themes will show content of that folder. It might be that IIS account does not have read permission on widgets folder or it is indeed empty.

Apr 19, 2010 at 11:38 PM

Wow.  Sure enough I examine the /widgets folder on the server and it's empty.  I'm not sure how that happened seeing as I copied everything together.  At any rate thanks.