Click here to Skip to main content
15,885,767 members

wcf with IIS 7 + create java virtual machine fails with heap memory allocation

hemigueti asked:

Open original thread
I met a big problem with an application that needs to initialize a java virtua machine. Let me explain: I have developed a wcf web service in C # and the framework 4.0 and in which I initialize a java virtual machine in order to communicate with java code with p/invoke call from a native c++ dll. When I use the ServiceHost object (from the framework.net) to host the service it works very well (the JVM is initialized here). But when I try to host my wcf service web in IIS5.1 or IIS7, the application fails and exit with any message. So i have turned on the debugging in visual studio at IIS Express,check allow unsafe code and i get the following exception: "Could not reserve enough space for object heap" which means that the java virtual machine can not be expressed initialized.

The application architecture is like this: code + c # wcf call a function with-> jniinterface and it is a c + + dll (p / invoke) ---> java library

could someone help me

thank you
Tags: C++, C# (C# 4.0), Java, .NET (.NET4), IIS 5.1, IIS 7.0, IIS, Virtual Machine

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900