473,406 Members | 2,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Can't call a class method from an external dll file


I have bumbed into a frustrating problem with my webservice. When I run
he web site in Visual studio 2005 everything works fine. But when i try
to publish it, it seems to be unable to call a method from an external
dll file. When I mean external dll file I simply mean it's dll which I
have not written and I use as an reference (not a web reference) in my
VS solution.

When I call my webservice from my javascript code that callback
function return this error message. I have confirmed that the webmethod
is terminated at the moment one of the methods from my external dll is
called.

Anyone know what I might have done wrong?

---------------------------
Microsoft Internet Explorer
---------------------------
Error:

soap:Server

System.Web.Services.Protocols.SoapException: Server was unable to
process request. ---> System.NullReferenceException: Object reference
not set to an instance of an object.
at OpcClientPrototype.CreateTagSubsription(String[] tags)
at OpcClientPrototype.GetDucData(String[] _tags)
--- End of inner exception stack trace ---
---------------------------
OK
---------------------------

Nov 23 '05 #1
2 4731
Is it a .NET DLL or a COM DLL? If it's a .NET DLL, have you published the
DLL to wherever you are hosting it?

If it is a COM DLL, you'll need to have the DLL registered on the hosting
server.

HTH
Altaf
--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com
"PrettySneaky" <Pr**********@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...

I have bumbed into a frustrating problem with my webservice. When I run
he web site in Visual studio 2005 everything works fine. But when i try
to publish it, it seems to be unable to call a method from an external
dll file. When I mean external dll file I simply mean it's dll which I
have not written and I use as an reference (not a web reference) in my
VS solution.

When I call my webservice from my javascript code that callback
function return this error message. I have confirmed that the webmethod
is terminated at the moment one of the methods from my external dll is
called.

Anyone know what I might have done wrong?

---------------------------
Microsoft Internet Explorer
---------------------------
Error:

soap:Server

System.Web.Services.Protocols.SoapException: Server was unable to
process request. ---> System.NullReferenceException: Object reference
not set to an instance of an object.
at OpcClientPrototype.CreateTagSubsription(String[] tags)
at OpcClientPrototype.GetDucData(String[] _tags)
--- End of inner exception stack trace ---
---------------------------
OK
---------------------------

Nov 23 '05 #2
I think it's an .NET dll. It's called TsOpcNet.dll.. And I'm not able
to register it with regsvr32.

I think it's registered on the hosting server since I use the publish
command i Visual studio 2005 to publish it. The dll is in the same
folder as my webservice so it should be able run anything on the dll
file. One other strange thing is that I'm able to declare datatypes
which are defined in the external dll file and even use the new
operator and create objects of diferent types. I mean, the webservice
should crash when i call the constructor on the object..

When I think of it. The error har probably nothing to do with the dll
file. I think something is going wrong when i use the webservice
outside the developer environment..

thanx for your quick reply

Nov 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Reply Via News Group Please | last post by:
Folks, I'm new to CSS and realise that by posting in the html newsgroup, I might upset one or two readers by raising a CSS question in an html newsgroup however my ISP only has one small CSS...
25
by: Zeng | last post by:
I finally narrowed down my code to this situation, quite a few (not all) of my CMyClass objects got hold up after each run of this function via the simple webpage that shows NumberEd editbox. My...
3
by: Sushil Srivastava | last post by:
Hi Guys, Would you be able to help me using C# GUI (with user interface component) in my MFC application. I have used managed extension, COM-interops, etc but problem is this C# component has...
5
by: callmebill | last post by:
I'm trying to add a class to a module at runtime. I've seen examples of adding a method to a class, but I haven't been able to suit it to my needs. As part of a testsuite, I have a main process...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
6
by: Pucca | last post by:
I have a program that originally compiles into a exe file. I changed the compile option to generate dll file. This program calls a com component. Can I use pinvoke in C# to call it? The...
2
by: dasilva109 | last post by:
Hi guys I am new to C++ and need urgent help with this part of my code for a uni coursework I have to submit by Thursday //ClientData.h #ifndef CLIENTDATA_H #define CLIENTDATA_H #include...
6
by: Dave Harvey | last post by:
I have developed a standard .NET control which displays medical images and works fine in applications, but increasingly, my customers are wishing to use it in an ASP.NET environment, so I am...
5
by: looi_sookchan | last post by:
Hi, I am new here.. I face problem when i try communicate two .exe together.. these two .exe i name it by App A and App B.. i try to call App A's function from App B's function.. i had create a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.