简体   繁体   中英

403 forbidden error while getting javascripts under root 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 directory 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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM