mercredi 10 décembre 2014

Solution Layouts/BigLettersFolder, in ScriptLink ends as layouts/bigletterfolder, and return 404



In some VS Sharepoint 2013 solution I have set up as follow:


In mapped Layouts I have folder jQueryTest, and jquery.js in it.


I have Scirpt Element with Elements.xml with:



<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://ift.tt/sQmbje">
<CustomAction Location="ScriptLink" Sequence="1" ScriptSrc="~site/_layouts/jQueryTest/jquery-1.11.1.min.js" />
</Elements>


But in the web broser console I get:


GET http://some_url_here/sites/some_site_here/_layouts/jquerytest/jquery-1.11.1.min.js [HTTP/1.1 404 Not Found 15ms]


If I manually try jQuryTest in url, I get 401 Unauthorized access. Manually accessing jquerytest give me 404.


In 15/TEMPLATE/LAYOUTS/ I have jQueryTest folder. So I should have camel case in url.


Capital letters where lowercased. But IIS is CASE SENSITIVE. What can I do now?


Partial solution Looking into IIS application pools and sites for authentication settings I found that IIS see _layout folder differently from physical folders structure correct URL should look like


GET http://some_url_here/sites/some_site_here/_layouts/15/jquerytest/jquery-1.11.1.min.js


I have checked in web browser, and this new URL works.


So two questions I need answer to in order to get that solution working:



  1. Why SharePoint ScriptLink generate lower case url?

  2. Why SharePoint/IIS put my data in _layouts/15/?








0 commentaires:

Enregistrer un commentaire