+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Including javascript and css files resources

Including javascript and css files resources

5 posts, 0 answered
  1. Ravi
    Ravi avatar
    11 posts
    Registered:
    17 Jan 2012
    02 Feb 2012
    Link to this post
    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
  2. Svetoslav Petsov
    Svetoslav Petsov avatar
    456 posts
    Registered:
    24 Sep 2012
    06 Feb 2012
    Link to this post
    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
  3. Kurren
    Kurren avatar
    23 posts
    Registered:
    08 Jun 2013
    29 Jan 2014
    Link to this post
    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?
  4. Ivan D. Dimitrov
    Ivan D. Dimitrov avatar
    310 posts
    Registered:
    26 Mar 2015
    30 Jan 2014
    Link to this post
    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
  5. Kurren
    Kurren avatar
    23 posts
    Registered:
    08 Jun 2013
    03 Feb 2014 in reply to Ivan D. Dimitrov
    Link to this post
    Hi Ivan

    Thanks for your answer, it worked!

    Kurren
5 posts, 0 answered