Search code examples
asp.netencodingtokenscriptmanagerscriptresource.axd

ScriptResource.axd Uncaught SyntaxError: Invalid or unexpected token


I have been scouring the internet for an answer to this. So far the fixes I've attempted have not worked. I honestly think this might be related to a Windows update I did earlier this month as I was able to previously run the report in the application before.

Uncaught Error: ASP.NET Ajax client-side framework failed to load.

update http handler

The web application is setup to run a bunch of reports using Microsoft.Reporting.WebForms. Everything had been working in my dev environment a month or two ago, the last time I attempted to run the report locally. This most recent time, I started getting multiple errors in the console. The one I think might be causing the problem is with the ScriptResource.axd and the random symbols that appear when I try to view the file in chrome's dev tools.

Console Log of ScriptResource.axd

The most significant change I can think of is my dev machine was updated to windows 10 version 1909 at the beginning of the month. I'm having a coworker validate this theory. In the meantime, I'm hoping someone here could help with any additional ideas for me to try.

The project targets Framework 4.5 and I see the same issue regardless of browser. Currently the application is deployed to a Windows2008R2 server and the reports run successfully on that site from my dev machine, so I do believe it is something to do with the latest update to my dev machine so it is definitely server side. I'm open to any suggestions on changes to my dev environment or my application to get around this issue. Thanks


Solution

  • I doubt this will happen to anyone else. There's a theory this is a result of my dev VM being cloned from another system. The problem was being caused by my machine not being able to resolve 127.0.0.1 to localhost and having Stackify Http module installed in the project. Stackify was trying to load their js file when launching the web app, which was pointing to 127.0.0.1. It failed, which in turn caused ScriptResource.axd to fail to load.