I have been having an issue with one of my websites where it works perfectly fine while developing, but once it gets published and deployed on IIS, the styling for ONLY the account pages doesn't render, but the functional pages do render properly.
When I have a look in the console, it lists the following errors:
Uncaught SyntaxError: Unexpected token '<' (at modernizr?v=inCVuEFe6J4Q07A0AcRsbJic_UE5MwpRMNGcOtk94TE1:3:1)
1.
2.
3. <!DOCTYPE html>
^
4.
5.<html lang="en">
6.<head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><title>
Uncaught SyntaxError: Unexpected token '<' (at MsAjaxJs?v=D6VN0fHlwFSIWjbVzi6mZyE9Ls-4LNrSSYVGRU46XF81:3:1)
1.
2.
3. <!DOCTYPE html>
^
4.
5.<html lang="en">
6.<head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><title>
Uncaught SyntaxError: Unexpected token '<' (at WebFormsJs?v=N8tymL9KraMLGAMFuPycfH3pXe6uUlRXdhtYv8A_jUU1:3:1)
1.
2.
3. <!DOCTYPE html>
^
4.
5.<html lang="en">
6.<head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><title>
Uncaught ReferenceError: Sys is not defined at Login:61:1
Sys.WebForms.PageRequestManager._initialize('ctl00$ctl09', 'ctl01', [], [], [], 90, 'ctl00');
^^^
Of the first three errors, the page that the link takes me to shows the HTML for the login page, irrespective of if I'm looking at the login page, or any other account page, even though these pages should be showing JavaScript.
I've tried looking for a solution to this, but nothing I have found even relates to the problem I am facing.
The last error leads me to believe that AJAX isn't being loaded properly, and I have no idea why.
ScriptManagercorrectly to the page? Secondly, please make sure that the script code is placed at the end of the page code. It would be helpful to provide a minimal code example that can reproduce the problem.