Hi.. I have created a page where users can request the creation of a blog for them. What I want to be able to do is.. if a user tries to go to a blog that doesnt exits ie http://www.mydomain.com/nonexistblog/ I want the page to redirect to http://www.mydomain.com/requestblog.aspx
Currently, if i try to go there, I get and un handled BlogDoesNotExistException I cant figure out where this exception is being thrown to catch it. Cheers Amit
If you track down usages of BlogDoesNotExistException, you'll see it's only used in two places, in some ErrorPage in the web project and in Dottext.Framework.Configuration.GetConfig. It's the latter one that's being thrown in the case at hand. If you really
want to do this, you can add an HttpContext.Current redirect in lieu of throwing BlogDoesNotExistException in GetConfig. That will accomplish what you're trying to do. Not sure why actually doing this makes sense for you, but who knows, maybe it does. This
exception is only happening when users are trying to access a non-existent blog or when the .Text instance is misconfigured. I'm trying to envision a scenario whereby a user is trying to access a blog they would want to set up by typing in its nonexistent
url--all I can come up with is you're either intending to pre-seed ghost blogs (i.e., similar to how a wiki does with non-existent camelcase words) or you're using this as your check-for-existing-blog mechanism, which also makes zero sense. In any event, ymmv,
but that's the code to modify.
Thanks for the your help grant. What I am doing is, I am using dottext on our intranet. To make it easier to manage, I have adapted .text to work with inegrated authentication and blog usernames and passwords are set to be the same as a users windows username.
On the aggregate page, I have a "my blog" link which takes you to your blog.. if you have one. This link is generated from your username that you are logged onto the network with. If you click the link and havent got a blog account, I want to redirect the
page to a form which will allow you to create your blog. so what I plan to do is redirect users to the creation page if they cause a blog config error. This page will check their username with the requested blog page.. and create it if they names match. Amit
AmitDesai
Member
160 Points
32 Posts
catching blog does not exist exception
Aug 20, 2004 01:46 PM|LINK
grant
Participant
935 Points
185 Posts
Re: catching blog does not exist exception
Aug 20, 2004 04:53 PM|LINK
AmitDesai
Member
160 Points
32 Posts
Re: catching blog does not exist exception
Aug 23, 2004 09:50 AM|LINK