Invalid license error for MVC site hosted on Azure web apps even though valid license is there

Kiran Kumar asked on March 31, 2021 15:55

Hi, we have hosted kentico 12 MVC site on Azure web apps, we have production set up which is working well. I have set up another instance for staging oneday back and its giving invalid license error. The CMS site is working fine, but MVC site I am getting invalid license error.

  1. have set up two applications in azure web apps a. CMS application (eg: stagingxyzadmin.co.sa) b. MVC site (eg: https://stagingxyz.co.sa)
  2. Have added two licenses, one for each domain, both are fine
  3. In sites application have added the domain name of MVC site (stagingxyz.co.sa), presentation url is MVC site url (https://stagingxyz.co.sa) and CMS admin site as domain alias
  4. one web farm is showing healthy

I have also tried adding domain name of the admin site in sites application and MVC site domain under presentation url.

But still getting "Invalid license error" when I run MVC site.

Please help out.

Correct Answer

David te Kloese answered on April 1, 2021 10:41

Well if there is nothing in the Event log your MVC application probably can't (properly) connect to the database. As it should write an error...

So I would focus on the SQL connection settings or the SQL user's permissions

1 votesVote for this answer Unmark Correct answer

Recent Answers


David te Kloese answered on April 1, 2021 09:50

Perhaps dumb, but would save a lot of hassle: are you sure the license is still valid? So not a temporary one that expired :).

Is the error in the Event log? It should tell you what URL it thinks it doesn't have the valid license for.

If you have the Always on setting in your azure app on, Azure does a periodic call to keep your process running. This is to the main url configured for the application. Often something like 'yourapp.azurewebsites.net'.. It could be that your reach a web farm limit because that one is also being called frequently. Either change the main url in the web app or setup a redirect for that azure url.. (or get a license for it :))

to check:

In Azure portal go to your Web App

- Select Configuration

- Select General settings

- Check the Always On setting
0 votesVote for this answer Mark as a Correct answer

Kiran Kumar answered on April 1, 2021 10:38

David thanks for taking time to reply to this, I have checked the license, it is fine, it shows "full license" under license expiration and edition enterprise for both the domains (Admin domain and mvc site. The thing is Error is not there in event log when I search for term license. I will check the azure web app settings and will get back on that.

0 votesVote for this answer Mark as a Correct answer

Kiran Kumar answered on April 1, 2021 17:07

Hi David,

Thanks a lot, it was connection string issue, it was not able to connect to the SQL server, once this was rectified, the issue resolved.

Regards Kiran Kumar

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.