Mendix7 on-premise deployment issue

1
Hi All, I just tried to release our first updated MX6 to MX7 (7.13.1) application to our on-premise Acceptance (windows server 2008 R2, IIS 7.5, ARR 3.0, Mendix Service console 4.5) environment. Unfortunatly, I cannot get it to work. It works locally on the server (http://localhost:8011), but it does not work externally (so when it is accessed trough IIS). When loading the page, the browsers network trace shows an 404 NOT FOUND error on the request URL/metamodel.json?636590401638089927. What have I tried so far: -Reinstalled Mendix Service Console and Reinstalled APP. -Deleted IIS website profile and set it up again using the appropriate documentation (https://docs.mendix.com/deployment/on-premises/deploy-mendix-on-microsoft-windows). -Created new deployment packages in the modeler. Unfortunatly, always the same error. In the end, I re-deployed the last 6.10.10 package of the application again (with a restored database). That works correctly again direct out of the box (so no change in IIS settings!). So it seems that IIS needs some extra settings for Mendix7 apps, but I can't find any documentation about it. Anyone has an idea to get me in the right direction?
asked
5 answers
1

It is not really a "Mendix" known issue as it is IIS related technically. But yes, Mx7 introduced a file called metamodel.json and IIS does not handle .json files by default. So you need to do this (see the accepted answer): https://stackoverflow.com/questions/22951046/404-not-found-when-i-look-for-json-file-in-asp-net-mvc-app

I will ask our technical writers to update our documentation here: https://docs.mendix.com/deployment/on-premises/deploy-mendix-on-microsoft-windows

Update

The documentation has been updated -> https://docs.mendix.com/deployment/on-premises/deploy-mendix-on-microsoft-windows#5-3-configuring-the-mime-types

answered
1

This is a known issue. 7.13.1 doesn't load the license properly.

I suggest you raise a ticket at Mendix support

answered
0

It has to be possible to reach metamodel.json from external. Is this possible?

answered
0

This is my current web.config:

 

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
		<rule name="xas" enabled="true" stopProcessing="true">
                    <match url="^(xas/)(.*)" />
                    <action type="Rewrite" url="http://localhost:8012/{R:1}{R:2}" />
                </rule>
                <rule name="ws" stopProcessing="true">
                    <match url="^(ws/)(.*)" />
                    <action type="Rewrite" url="http://localhost:8012/{R:1}{R:2}" />
                </rule>
                <rule name="ws-doc" enabled="true" stopProcessing="true">
                    <match url="^(ws-doc/)(.*)" />
                    <action type="Rewrite" url="http://localhost:8012/{R:1}{R:2}" />
                </rule>
                <rule name="link" stopProcessing="true">
                    <match url="^(link/)(.*)" />
                    <action type="Rewrite" url="http://localhost:8012/{R:1}{R:2}" />
                </rule>
                <rule name="file" stopProcessing="true">
                    <match url="^(file)(.*)" />
                    <action type="Rewrite" url="http://localhost:8012/{R:1}{R:2}" />
                </rule>
                <rule name="debugger" stopProcessing="true">
                    <match url="^(debugger)(.*)" />
                    <action type="Rewrite" url="http://localhost:8012/{R:1}{R:2}" />
                </rule>
            </rules>
        </rewrite>
	<staticContent>
            <mimeMap fileExtension=".mxf" mimeType="text/xml" />
            <mimeMap fileExtension=".json" mimeType="application/json; charset=UTF-8" />
            <clientCache cacheControlMode="DisableCache" />
        </staticContent>
    </system.webServer>
</configuration>

 

answered
0

Ok. After some further testing, the issue can be resolve by adding an extra MIME type for JSON files, as suggested by Jaap.

<mimeMap fileExtension=".json" mimeType="application/json" />

 

The browser that I used for testing clearly had some cashing issues, and because of that I thought it did not work. However, after fully clearing the cache (I used CTRL+F5 multiple times, but that is not enough appearantly), it started to work.

 

I did a new release of the MX7 version of our application, and added the JSON MIME type BEFORE the update. That way, the application worked directly after starting up.

 

Thanks for all the help!

answered