473,769 Members | 7,355 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"Object reference not set to an instance of an object." after constructor fires

Hello all,

Working on a W2K3 box with Framework version 1.1.4322 here. I've
implemented a Web service in VB.NET by generating a server skeleton off
the WSDL and overriding the abstract class. This Web service operates
correctly. To conform to standards set by our group recently, I reworked
the WSDL to reflect namespace changes and reimplemented the service in
both VB.NET and C# (as neither work now). When compared, the only
syntactic differences between the original and new VB.NET services are
namespace declarations. The other change was the last offered update to
my Framework for W2K3 SP1. In both the new services, I get the subject
error after the constructor successfully fires. No error shows in the
Debug window; I get exit codes of 0.

The original service still operates correctly after the Framework update.
In all three services (working and broken), the last line added to the
Debug window before I stop execution is the loading of a referenced
assembly not part of the Framework.

I deployed the broken C# version to a Windows 2000 Server SP4 box with
Framework version 1.1.4322 with the same result.

Anyone had similar issues?

Thanks,
Vern DeHaven
Nov 23 '05 #1
1 4612
Found the issue. I had left out one very important detail: one of our new
standards is to specify names of elements in Pascal case (e.g.
ElementName). The old, working service had element names in camel case
(e.g. elementName). The wsdl.exe tool names parameters exactly the same
as their types in the generated abstract class, for example:

public abstract ReceiveBuffer
modify([System.Xml.Seri alization.XmlEl ementAttribute( Namespace="http ://myuri.com/mod")]
SendBuffer SendBuffer);

The mistake I made was that I had camel-cased the parameter name to
distinguish it as such:

public abstract ReceiveBuffer
modify([System.Xml.Seri alization.XmlEl ementAttribute( Namespace="http ://myuri.com/mod")]
SendBuffer sendBuffer);

I did this without adding the ElementName property to the
XmlElementAttri bute to correct the serialization. Here's how it should
read:

public abstract ReceiveBuffer
modify([System.Xml.Seri alization.XmlEl ementAttribute( Namespace="http ://myuri.com/mod",
ElementName="Se ndBuffer")] SendBuffer sendBuffer);

Sorry about this post.

Vern
On Mon, 21 Mar 2005 11:45:21 -0500, Vern DeHaven <vernet.dehav en uc [.]
edu> <[@]> wrote:
Hello all,

Working on a W2K3 box with Framework version 1.1.4322 here. I've
implemented a Web service in VB.NET by generating a server skeleton off
the WSDL and overriding the abstract class. This Web service operates
correctly. To conform to standards set by our group recently, I
reworked the WSDL to reflect namespace changes and reimplemented the
service in both VB.NET and C# (as neither work now). When compared, the
only syntactic differences between the original and new VB.NET services
are namespace declarations. The other change was the last offered
update to my Framework for W2K3 SP1. In both the new services, I get
the subject error after the constructor successfully fires. No error
shows in the Debug window; I get exit codes of 0.

The original service still operates correctly after the Framework
update. In all three services (working and broken), the last line added
to the Debug window before I stop execution is the loading of a
referenced assembly not part of the Framework.

I deployed the broken C# version to a Windows 2000 Server SP4 box with
Framework version 1.1.4322 with the same result.

Anyone had similar issues?

Thanks,
Vern DeHaven


Nov 23 '05 #2

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

Similar topics

3
494
by: Kam | last post by:
Hi! When I am trying to drag user controls or any controls from the Toolbox to a form in some of my projects I get a dialog messages: (Microsoft Deployment Environment) "Object reference not set to an instance of an object" Notes that: 1. It's a designer problem, not a reference problem. When I am adding this user control directly to the code it works just fine, but I can't make it
1
2832
by: Chris Magoun | last post by:
I suddenly received an unexpected error in my project. I have been working on this project for some time without this issue. Nothing has changed in the form that caused the exception. A little experimentation shows that I cannot run ANY .NET web project without getting this error: ---------------------------------------------------------------------------- ---- Object reference not set to an instance of an object.
18
28758
by: Microsoft | last post by:
When I try this in my code I alwas get an errormessage: "Object reference not set to an instance of an object" Dim g As System.Drawing.Graphics g.DrawString("Test", New Font("Arial", 12, FontStyle.Bold), Brushes.Black, 0, 0) Why is this? Marc
2
2978
by: louie.hutzel | last post by:
This JUST started happening, I don't remember changing any code: When I click the submit button on my form, stuff is supposed to happen (which it does correctly) and a result message is posted back to the same page at the top of my form alerting the user that their request has been approved or denied. However, the end result is an error message: Error Message: Object reference not set to an instance of an object.
9
3102
by: axs221 | last post by:
I am trying to move some of our large VBA Access front-end file into ActiveX DLL files. I created two DLL files so far, one was a module that contains code to integrate into the QuickBooks accounting software. Another has general utilities. I tried referencing the utilities dll, and it shows up in the object explorer. I instantiated an instance of the class and now it shows up all okay in the Intellisense. Whenever I try to run a simple...
35
3232
by: Chris | last post by:
Hi, I tried to create a class which must change the propety 'visible' of a <linktag in the masterpage into 'false' when the user is logged. But i get the error: "Object reference not set to an instance of an object" for the line 'If mpg.FindControl("lkred").Visible = True Then'. I couldn't find sofar the solution. Any help would be appreciated ... Thanks
0
2653
by: Tamer Ibrahim | last post by:
Hi, Sometimes, I got the following error message when I use ajax calendar control on some aspx pages : Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an...
4
2179
by: My Pet Programmer | last post by:
Ok guys, I'm really looking for someone to tell me how bad a hack this is, and if I'm close to where I should be with it. The basic situation is that I have a class which creates a basic calendar control, the only difference is I stole the navigation scheme from Vista (e.g., if you click on the year you zoom out to the months list, then out to the decade, and back in when you click a year, then a month). I ran into some trouble...
0
1983
by: raghudr | last post by:
Hi all, I am coding for displaying a splash screen until a big job is finished.I am getting an exception:only during the first start of the system.Rest all the time it is working fine. Only when i restart the PC my application will be launced by windows services at startup and i get the exception saying:
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10216
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9997
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8873
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5309
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3565
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.