Friendly urls in IIS7 not working

Topics: General, MVC, Standard packages
Aug 12, 2011 at 5:16 PM

Hello guys, 

Not sure if anyone can help me on this one. I've deployed c1 on IIS7, we use a custom handler setup and a custom module setup(which I can't expose). When I try to access published pages via the friendly url e.g. serverpath/c1/friendlypage(without aspx extension). I receive a 404. I believe this should be handled via Renderers/FileNotFoundHandler.ashx and redirect to the friendly page. However that also throws a 404. I am not sure what is the cause. when I build and deploy using Visual Studio I can access friendly urls. E.g. serverpath/c1/bob. Can you guys please provide me with a list of handler/modules which are required for this? or I am missing an application package?


Using C1 2.1.1


Thanks for your help and time,


Aug 15, 2011 at 12:19 PM

Hi @Abcamer

>> I believe this should be handled via Renderers/FileNotFoundHandler.ashx and redirect to the friendly page. 

FileNotFoundHandler.ashx is used in IIS6 for redirecting from short urls (User can specify one if edit "FriendlyUrl" field on a page's "properties" tab). But I guess that's no what you mean here.

By default in v2.1.1 all page urls have ".aspx" extension, if you have extensionless that means that you probably used Contrib project, is that correct?

Aug 18, 2011 at 3:35 PM
Edited Aug 18, 2011 at 3:37 PM

Hey @Napernik,

Thanks for replying. We have no used contrib projects. I assumed by default friendly urls are extentionless. Do you have any idea why you can access extentionless urls by default when running via visual studios, but the same is not true when running via IIS? 


Thanks for your time :)


Aug 18, 2011 at 6:10 PM

Could it be that the version you have on IIS is 2.1.1 - downloaded from the front page/installed via WebMatrix, and version for Visual Studio - one you get when you download latest sources (a newer one) ?

Aug 22, 2011 at 10:25 AM
Edited Aug 22, 2011 at 10:26 AM

The version I am using is 2.1.1, I downloaded the zip folder and extracted to IIS. I then converted the application and ran it. Composite c1 then ran it's initial setup and no default settings were changed, apart from converting it to use the database. I followed the same steps when using Visual studios, but ran it using the sln file and then let composite c1 run it's initial setup. But the different is visual studios supports friendly urls. I really don't see any difference between the two setups.


Thanks a lot,