Including javascript and css files resources

Posted by Community Admin on 04-Aug-2018 12:30

Including javascript and css files resources

All Replies

Posted by Community Admin on 02-Feb-2012 00:00

Hi,
I am facing problem while adding references to my sitefinity website.
I have tried both the procedure to by adding and JavaScript in your .master page, using HTML and using Sitefinity build-in widgets.
In both the approaches I am getting error as HTTP Error 403 - Forbidden. (Inspecting by fire bug).
I have placed my js files in WebsiteTemplates/JS folder
So please help me out

Thanks & Regards
Ravi Maurya

Posted by Community Admin on 06-Feb-2012 00:00

Hello,

 Is your template in App_Data folder? If it is - then I assume your application does not have the required permissions to access the resources inside this folder. Can you try putting the .js file outside App_Data and refer it from there? This should fix the problem.

Regards,
Svetoslav Petsov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 29-Jan-2014 00:00

I'm having the same problem, the js file path: C:\Program Files (x86)\Telerik\Sitefinity 6.3\Projects\CodisDev2\App_Data\Sitefinity\WebsiteTemplates\CodisWhite\App_Themes\CodisWhite\Scripts\logoAnim.js

Why am I getting a "403: Forbidden" message when trying to include these JS files?

Posted by Community Admin on 30-Jan-2014 00:00

Hi all,

@Kurren

The suggestion my colleague posted applies to you as well. Have in mind that App_Data is an ASP.Net reserved folder and permissions to it differ from the ones applied to your site's root. Placing the js files in another folder or at root level will solve the 403 error provided the permissions for the root folder are in order.

Another thing I can add here is a reference to this documentation article concerning registering themes inside sitefinity and this blog post concerning the proper way to include scripts.

Regards,
Ivan D. Dimitrov
Telerik

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 03-Feb-2014 00:00

Hi Ivan

Thanks for your answer, it worked!

Kurren

This thread is closed