DotNet Interop: error constructor of XmlHttpClass

greys
Member Posts: 29
Hi,
I'm currently in the process of migrating to NAV2013. I have a codeunit that contains all wisdom concerning calling webservices. It was formerly based on automations and I'm now bringing it up to date with the use of dotnet interoperability.
I have declared the following variables:
But on calling the following constructor
I get the error message
Since .Net is not my natural development habitat, I'm a bit confused on what goes wrong. Anybody a suggestion?
Best regards,
Greys
I'm currently in the process of migrating to NAV2013. I have a codeunit that contains all wisdom concerning calling webservices. It was formerly based on automations and I'm now bringing it up to date with the use of dotnet interoperability.
I have declared the following variables:
XmlHttp (DotNet,MSXML.IXMLHttpRequest.'Microsoft.MSXML, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a') XmlHttpClass (DotNet,MSXML.XMLHTTPRequestClass.'Microsoft.MSXML, Version=8.0.0.0, Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a')
But on calling the following constructor
XmlHttp := XmlHttpClass.XMLHTTPRequestClass;
I get the error message
'Cannot create an instance of the following .NET framework object: assembly Microsoft.MSXML, Version=8.0.0.0, Culture-neutral,PublicKeyToken=b03f5f7f11d50a3a, type MSXML.XMLHTTPRequestClass'
Since .Net is not my natural development habitat, I'm a bit confused on what goes wrong. Anybody a suggestion?
Best regards,
Greys
0
Comments
-
Mmmm, I think the configuration of our application server (Windows 2012) is the problem. Running the code from my local machine works flawlessly. Doesn't come Windows 2012 Server with the MSXML?
Regards,
Greys0 -
We have exactly the same problem. Installing msxml 6 on the windows 2012 server won't help. Who has any suggestions?0
-
Hi,
you should assign the constructor result to the variable XmlHttpClass, not to XmlHttp:
XmlHttpClass := XmlHttpClass.XMLHTTPRequestClass;
Oli0 -
Hi,
I was wrong in my last post.
Here is the solution:
You have assigned an invalid .Net declaration in your variable definition:
use-
MSXML.XMLHTTPRequest.'Microsoft.MSXML, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
-
MSXML.
oli0 -
In the end the problem was the lack of the assembly in C:\Windows\Assembly folder. Thanks everybody for their help.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions