Comments (6)
We use this library in a ASP.NET web application on .NET Framework successfully for a while now. From what we've learned over the years the following things are typically the cause of those errors.
IIS has to run in 64 bit mode
Should be self explanatory, this holds for both IIS and IIS Express (make sure to tick the box in the VS settings).
Missing Visual C++ Redistributable
You must have the Visual C++ Redistributable package installed on the target machine. This can be checked easily by compiling the included Fiddling project (as 64 bit exe) and running that on the target machine.
Running into assembly load problems in IIS
IIS/IIS Express attempts to load every assembly present in the bin/
folder, including the unmanaged V8 specific ones. This led to similar errors for us before. We solved that problem by not including the JavaScript.Net.dll
and other V8 assemblies in the bin/
folder, but instead deploying those into a sibling folder. You can then use the AssemblyResolve
callback on the AppDomain
to resolve JavaScript.Net.dll
from the sibling folder (see e.g. https://stackoverflow.com/a/5262129). This is typically setup in the Global.asax.cs
.
Edit: Now that I'm at work here is the snippet we use
var serverPath = System.Web.HttpContext.Current.Server.MapPath("/");
AppDomain.CurrentDomain.AssemblyResolve += (sender, args)
=> args.Name.StartsWith("JavaScript.Net") ? Assembly.LoadFrom(serverPath, @"V8\JavaScript.Net.dll")) : null;
WebApp
|--bin
|--...
|--V8
|--JavaScript.Net.dll
|--icuuc.dll
|--...
Good luck!
from javascript.net.
You will need to include all those files in the same directory as the JavaScriptDotNet.dll, but you've probably already tried that.
from javascript.net.
Yes i tryed that. I basically copied all the settings from the working console application to new web application but i get a dependency error on JavaScript.Net.dll. I saw with the Assembly Binding Log Viewer that ASP.Net could not load icuuc.dll and icui18n.dll so i guess thats the problem.
from javascript.net.
Did you copy the 64-bit DLLs? Most servers are running 64 bit.
from javascript.net.
Yes i tryed everything. Is it possible to build Javascript.Net as one single dll with everything inside?
Thx for your help.
from javascript.net.
@spahnke Thank you very much! You helped a lot!
from javascript.net.
Related Issues (20)
- Randomly throws exception for the same code
- Adopting this project HOT 8
- about run environment : Could not load file or assembly 'JavaScrip t.Net.dll' HOT 1
- Tabs or spaces for new code? HOT 1
- Run MathJax in C# using Javascript.Net HOT 1
- Proper prototype handling HOT 5
- JavascriptFunction.Call cannot be GC? HOT 1
- Extended Documentation or Wiki HOT 6
- Question: What will be the best way of implementing a good/real sleep() function? HOT 3
- Does it supports .net framework 4.6.1 and greater? Does it supports IE? HOT 1
- Warnings : Should I be concerned? HOT 2
- SetAndReadDateTimeLocal_DateRange test fails due to DST changes in America/Sao_Paulo timezone HOT 1
- [QUESTION/REQUEST] Create JS function which calls C# APIs
- C++ Redistributable
- Passing C# field through javascript and back into C# results in null HOT 6
- System.AccessViolationException HOT 4
- UnauthorizedAccessException when trying to open a mutex HOT 6
- Explain how to manipulate C# (CLR) objects from js and vice versa HOT 1
- Question: fetch/xmlhttprequest/http request OR run a local executable file HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javascript.net.