-
Notifications
You must be signed in to change notification settings - Fork 937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server-side rendering on Azure WebSite with importing 3rd party JS files. #198
Comments
It sounds like it's using the V8 engine locally, but the MSIE engine when uploaded to Azure. V8 supports more stuff than MSIE does, and it looks like that error is coming from an In the meantime, try call |
I set `.SetAllowMsieEngine(false)' and now it doesn't work locally. I added the That is the exception I get:
|
I'm also having this same problem. Trying to get react-bootstrap working on Azure but haven't found a working solution yet. I have tried to run V8 in an ASP.NET 5 Azure WebApp but it seems like the JavaScriptEngineSwitcher isn't supporting ASP.NET 5 yet. Any help would be appreciated! |
@alekkowalczyk Did you ever resolve this issue? |
@westdavidr unfortunatelly not, we dropped the idea of server side rendering as it seems not mature enough. |
That is unfortunate. Hope this gets resolved soon. |
I finally found a way to get it working by running V8 in Azure. Here's a blog post I wrote: http://www.samulihaverinen.com/web-development/dotnet/2016/01/19/how-to-run-clearscript-v8-javascript-engine-in-azure/ I would suggest ReactJS.NET to update the JavaScriptEngineSwitcher.V8 to the latest version as the current one doesn't work in ASP.NET 5 (it requires a configuration section in web.config or otherwise a null reference exception is thrown by the constructor). |
I'll do that tonight :) Created #216 to track progress. In the meantime you can just manually upgrade the package.
Good catch! I'm running ASP.NET 5 + ReactJS.NET in production, except I'm on Linux which uses VroomJs rather than ClearScript. |
Closing this out now that ReactJS.NET 2.2 runs V8 on Azure out-of-the-box, and @samppis added this documentation page: http://reactjs.net/guides/azure.html. Thanks! |
Hi!,
I'm using ReactJS.NET 2.1 in my latest project, everything locally works great, but I have a problem after publishing to an Azure WebSite.
I have a few React components, and I'm using React-bootstrap.js, everything in ASP.NET 5. That is how my Startup.cs looks like when it comes to configuring React for server-side rendering:
Works great locally on IIS Express, but after publishing on Azure WebSites I'm getting following exception on application stratup:
The text was updated successfully, but these errors were encountered: