Writing SEO friendly url using HttpHandlers in ASP.NET...Question

Posted by Laghaterohan under ASP.NET on 4/18/2011 | Points: 10 | Views : 2066 | Status : [Member] | Replies : 4
Hello Sheo,

I went through your article "Writing SEO friendly url using HttpHandlers in ASP.NET" and accordingly tried a sample project however, when i run my application and click on Article1 i get error 404 Page not found...my HttpHandler is not called...why is this so?

Also, i do not have App_Code folder in my solution...what should i do? where am i going wrong?

Kindly let me know the issue...

Best Regards,
Rohan Laghate



Responses

Posted by: SheoNarayan on: 4/18/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Are you using ASP.NET 4.0 or earlier version of ASP.NET?

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Laghaterohan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Laghaterohan on: 4/18/2011 [Member] Starter | Points: 25

Up
0
Down
I am using ASP.NET 3.5

Best Regards,
Rohan Laghate

Laghaterohan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: SheoNarayan on: 4/18/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Hi Rohan,

There are couple of things you can do to solve your problem

1. To solve Page not found error, make sure that you are transferring to the correct page (check your .aspx file path)
2. Ensure that you are writing correct verb of httpHandler into the web.config file.
3. If you do not have App_Code you can create one (in case you have ASP.NET Website project then adding a .cs file automatically creates it). If you have Web Application project, you can create an .cs file and keep "DemoUrlHandler" there.
4. Your focus should be more on "<add verb="*" path="article/article*.aspx" type="UrlHandlerNameSpace.DemoUrlHandler"/>" line. Ensure that you are providing correct path here, targeting to correct type etc.

There is no reason why it should not work, I have lost the sample demo app somewhere however would suggest to go through the article once again and follow the steps one by one.

Hope you would be able to resolve this issue.

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Laghaterohan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vicky_rathee on: 10/29/2011 [Member] Starter | Points: 25

Up
0
Down
Could you please show me any example of SEO friendly url using sql server. Such as your website. As i post any article. it's url should be article title instead of article id.

Asp.net 3.5 required

Thaks
Vicky

Laghaterohan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response