Problem with images after migration

May 26, 2008 at 7:13 PM
Hi,

I made a spider that allowed me to migrate my blog from kcorax.spaces.live.com to http://kcorax.net/blog . I made sure that the links I create in the files under the appdata/posts folder are relative to  the image.axd accessor, eg http://kcorax.net/blog/image.axd?picture=livestore/e4501f4d-c48a-4559-b23c-eec6a12c80b2.jpeg . However when I'm not logged in the links are routed through the admin folder eg http://kcorax.net/blog/admin/Pages/image.axd?picture=livestore/fcf0af28-9418-49cc-8726-b3cc5ac666b3.jpeg . Naturally not only do the embedded ones not display, but clicking to an image that is stored on the blog prompts the visitor to log-in.

What should the image link address be like in order to overcome this issue ? Can I configure this somehow, or do I have to run the post xml files over some script ?
May 27, 2008 at 12:49 PM
Anyone ? No one ?
May 27, 2008 at 2:59 PM
Do the pictures remain on your live space or did they also get migrated?
May 27, 2008 at 4:52 PM
Edited May 27, 2008 at 4:53 PM
@Benny thanks for the reply.

My script downloads them and then places them under appdata/files/livestore (the name is artificial) then relinks the src="sth" for each link whose mime = each known image type. After the process the links look like this image.axd?picture=livestore/e4501f4d-c48a-4559-b23c-eec6a12c80b2.jpeg .

At first I thought that I link them as /blog/image.axd?blah where blog is the name of the virtual directory in which the blog lives, but for some reason the name transformation that routes the address through admin/pages only happens when the user is not signed in. Therefore I don't think this is important.

Is the reason apparent or should I hunt the process through BE's source ? If the latter, where should I look first ?
May 27, 2008 at 6:29 PM
Strange. The best place to start your search is the ImageHandler (located in the core project under Web\HttpHandlers), I've looked trough it but don't seem to see anything that hints towards the behaviour you describe I don't see any security related code in there so it's probably somewhere else. But still I'd start there.

I'd also check that the Data directory (in settings) and BlogEngine.VirtualPath (in web.config) are correctly configured.

I'm sorry I can't be of any more help, blogengine.net is new for me, keep me/us informed.
May 27, 2008 at 6:55 PM
For reasons currently unclear to me, images now appear just fine. I stopped the web site using my host's control panel, maybe that helped :( . I'm still perplexed though.
May 27, 2008 at 7:01 PM
It works now so hurray ;)