By default, Orchard is configured to restrict folder permissions. This is usually overridden by adding the web.config file to each folder as needed (in this case, your script folder).
If you use the codegen module to create your own module, then this is done for you as part of a generation. If not, then you need to add web.config yourself.
The designated web.config is as follows:
<?xml version="1.0" encoding="UTF-8"?> <configuration> <appSettings> <add key="webpages:Enabled" value="false" /> </appSettings> <system.web> <httpHandlers> <add path="*" verb="*" type="System.Web.StaticFileHandler" /> </httpHandlers> </system.web> <system.webServer> <staticContent> <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" /> </staticContent> <handlers accessPolicy="Script,Read"> <add name="StaticFile" path="*" verb="*" modules="StaticFileModule" preCondition="integratedMode" resourceType="File" requireAccess="Read" /> </handlers> </system.webServer> </configuration>
source share