0

I have the same problem as mentioned in the following question here:

ReactJS.Net on MVC5 fails to resolve dependency

Everything in this question is exactly the same, and just as descriptive. However, this question must be answered again, because of the following reasons:

I have the latest dll with the applied fix (latest React.NET dlls):

<package id="React.Core" version="1.5.5" targetFramework="net45" />
<package id="react.js" version="0.13.1" targetFramework="net45" />
<package id="React.Web" version="1.5.5" targetFramework="net45" />
<package id="React.Web.Mvc4" version="1.5.5" targetFramework="net45" />
<package id="System.Web.Optimization.React" version="1.5.5" targetFramework="net45" />

The project works on 3 of my machines (local, dev server, QA server). But when I tried to deploy to production, I got stuck the following error message:

[JsRuntimeException: Object doesn't support this property or method]
MsieJavaScriptEngine.ActiveScript.ActiveScriptJsEngineBase.InvokeScript(Action action) +161
JavaScriptEngineSwitcher.Msie.MsieJsEngine.InnerExecute(String code)

...

[TinyIoCResolutionException: Unable to resolve type: React.JavaScriptEngineFactory]

...

[TinyIoCResolutionException: Unable to resolve type: React.ReactEnvironment]

This is running on IIS7.5, and I just upgraded to .net 4.5.

Is there any other missing requirements I should be looking at?

1
  • 1
    Hmm, it sounds like something is going wrong with MsieJavaScriptEngine. It might be worth posting an issue to its Github page: github.com/Taritsyn/MsieJavaScriptEngine. Alternatively, you could force usage of V8 (call .SetAllowMsieEngine(false) in your ReactConfig) and see what errors ClearScript is throwing. The MSIE engine is only used as a fallback if V8 fails to initialise. Commented Oct 13, 2015 at 17:01

2 Answers 2

3

I figured it out:

Go to IIS, application pool, and go to the pool you're using for your website, then click advantage settings:

Make sure your Enable 32-Bit Applications is set to TRUE.

Personally, I'm not sure why this works, but it does. Especially from the standpoint that if I removed the JSX files, the site worked. But I needed my react components :-/

In powershell 1:

& "C:\Windows\System32\inetsrv\appcmd.exe" set apppool /apppool.name:DefaultAppPool /enable32BitAppOnWin64:true

where DefaultAppPool is the name of your application pool.

Sign up to request clarification or add additional context in comments.

Comments

0

It seems, that on a production server installed Internet Explorer 8 or below. Install a Internet Explorer 9 or above.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.