Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Publish web application #6436


User avatar
0
uabel created

Hi,

we published our web app on server. If we try to log in our backend, following error occurs: Login.js?v=636704311600000000:28 Uncaught TypeError: Cannot read property 'contentTypes' of undefined at HTMLFormElement.<anonymous> (Login.js?v=636704311600000000:28) at HTMLFormElement.dispatch (jquery.min.js?v=636704311600000000:9) at HTMLFormElement.r.handle (jquery.min.js?v=636704311600000000:9)

I check the element in login.js and the complete app object is undefined. 

The web application locally runs without any problems...


3 Answer(s)
  • User Avatar
    0
    ryancyq created
    Support Team

    are you using aspnet core jquery version?

    did you run npm run create-bundle on Mvc project? The issue could be due to const.js not being bundled/minified when publishing.

    see Run the project section

  • User Avatar
    0
    uabel created

    We are using ASP.NET MVC 5.x & AngularJS 1.x. The const.js file is in Common/Scripts which is bundled. If I add debug="true" in <compilation targetFramework="4.6.1"> the app is running. So it does not work if bundling is active. What can I do now?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @uabel,

    Can you create an issue here https://github.com/aspnetzero/aspnet-zero/issues ? We will check and fix it.

    Thanks,