开发者

403 forbidden error while getting javascripts under root folder

开发者 https://www.devze.com 2023-01-27 16:27 出处:网络
I have javascripts folder under root folder , its all workig fine till now. Suddenly it started giving me the following error for all the javascripts under scripts folder.

I have javascripts folder under root folder , its all workig fine till now. Suddenly it started giving me the following error for all the javascripts under scripts folder.

I the only change i made today is , deployed some files under website root dir开发者_开发百科ectory which are asp files. I didn't deploy any files to scripts folder at all.

I saw in firebug net panel and i got the same error there.

The page cannot be displayedYou have attempted to execute a CGI, ISAPI, or other executable program from a directory that does not allow programs to be executed. Please try the following:

Contact the Web site administrator if you believe this directory should allow execute access. HTTP Error 403.1 - Forbidden: Execute access is denied.

Internet Information Services (IIS) Technical Information (for support personnel)


You web server is set up to think that .js files are server-side JavaScript and you are in a directory with Execute permission. You need the Execute permission if you have .asp there. Go to your IIS settings and find the list of handlers (not mime-types) and make sure that .js isn't listed.

Or, you could just move the .js files to a folder without execute permission in IIS.


This error appeared when there was no file specified. Example:

<script type="text/javascript" src="~/Scripts/"></script>  <!-- broken -->
<script type="text/javascript" src="~/Scripts/<filename>.js"></script>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号