0

In IE11, my MVC project will not build. I get the Script1002 errors on every javascript library I have linked. It works under IE9. It also works with Chrome and Firefox. I can open IE11 and then paste in the localhost site and it works, but it doesn't work from the VS2012 IDE.

Has anyone had an issue like this with IE11?

I get the error as a dialog box from Visual Studio, before the site appears in IE11.

2
  • I know the error is on every file, but are you seeing this from the browser script console? If so, can you post the lines of code around the error? Commented Dec 9, 2013 at 18:51
  • Did you solve this issue? I am running into the same thing on a new project setup. Commented Feb 12, 2014 at 17:58

1 Answer 1

3

I got the same error with Visual Studio 2012.

I got this error:

SCRIPT1002: Syntax error

I solved the problem by giving the anonymous access to the script folder in the WEB.CONFIG

<location path="XXXXXX">
  <system.web>
     <authorization>
      <allow users="?" />
     </authorization>
  </system.web>
</location>

Replace the "XXXXXX" with your Javascript folder.

The error was because the browser need to access Javascript in the script folder.

Hopefully this will resolve anyone who got the same error in Visual Studio if you got the error.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.