Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Accessing to the cms.file with extensions redirects to the error page View modes: 
User avatar
Member
Member
millerkoijam-gmail - 6/26/2013 2:25:59 AM
   
Accessing to the cms.file with extensions redirects to the error page
Hi All,

I have been trying to access the cms.file with extension like (.pdf, .jpg) from content tree but it redirects to the error page. It just works fine when I am running without IIS in the ASP.net server. But when i run in the IIS it give HTTP Error 404.0 - Not Found. AS it look on the physical path. As i am storing the file in the DB only.

So please suggest what need to be done to fixed the issues.




User avatar
Kentico Support
Kentico Support
kentico_romank - 6/26/2013 3:40:03 AM
   
RE:Accessing to the cms.file with extensions redirects to the error page
Hi,

You will have to enable these extensions in IIS. Start your IIS Manager, choose the site you want to allow these extensions and then open Handler Mappings. There you will have to add Managed Handler with request path for example *.jpg

For more information you can see the links below:
http://msdn.microsoft.com/en-us/library/bb515343.aspx
http://stackoverflow.com/questions/14848527/set-handler-for-pdf-in-iis
http://msdn.microsoft.com/en-us/library/46c5ddfy%28v=vs.100%29.aspx

Best Regards,
Roman Konicek

User avatar
Member
Member
millerkoijam-gmail - 6/26/2013 8:18:25 AM
   
RE:Accessing to the cms.file with extensions redirects to the error page
Thanks Roman for the response.

It did load the file successfully
But, another issue arises. If i have file to be loaded with the .pdf or .jpg file it give error that the Could not load type 'HandlerName'

May be I am not using the correct handler or my approach is wrong?


Thanks in advance

Miller

User avatar
Kentico Support
Kentico Support
kentico_romank - 6/27/2013 1:54:41 AM
   
RE:Accessing to the cms.file with extensions redirects to the error page
Hi,

Could you please try to follow the procedure described in these two articles http://devnet.kentico.com/docs/devguide/index.html?custom_url_extensions_iis7.htm and http://devnet.kentico.com/docs/devguide/index.html?configuration_of_custom_url_extensions.htm.

If that wont work we will take a closer look on that error.

Best Regards,
Roman Konicek