Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 78275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:57:42+00:00 2026-05-10T20:57:42+00:00

NOTE: Using .NET 2.0, and VS2005 as IDE Hello all, I’m working on logging

  • 0

NOTE: Using .NET 2.0, and VS2005 as IDE

Hello all,

I’m working on logging webservice calls to our database, and finally got the SoapExtension configured and running using a very stripped-down implementation that was ported over from another project. I’ve set it up in the configuration file so it will run for all methods. When I call my webservice, and the soap extension fires, a NullPointerException is thrown when the SoapServerMessage attempts to call its MethodInfo property:

System.Web.Services.Protocols.SoapException: There was an exception running the extensions specified in the config file.  ---> System.NullReferenceException: Object reference not set to an instance of an object. at System.Web.Services.Protocols.SoapServerProtocol.get_MethodInfo() at System.Web.Services.Protocols.SoapServerMessage.get_MethodInfo() at MyService.SOAPLoggingExtension.LogInput(SoapMessage message) at MyService.SOAPLoggingExtension.ProcessMessage(SoapMessage message)  at System.Web.Services.Protocols.SoapMessage.RunExtensions(SoapExtension[] extensions, Boolean throwOnException) at System.Web.Services.Protocols.SoapServerProtocol.Initialize() --- End of inner exception stack trace --- at System.Web.Services.Protocols.SoapServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) 

The LogInput method is called during the BeforeDeserialize stage of ProcessMessage(SoapMessage):

SoapMessageStage.BeforeDeserialize:    CopyStream(_oldStream, _newStream);    _newStream.Position = 0;     if(_enabled)       LogInput(message);    break; 

And the LogInput method is failing when attempting to access the MethodInfo property of the message object it is trying to log. Here is the block of code where the property is called:

entry = new MyServerLogEntry(); entry.ServerURL = message.Url; entry.Method = (message.MethodInfo == null) ? null : message.MethodInfo.Name; 

When message.MethodInfo is called, it bubbles over to SoapServerProtocol.get_MethodInfo(), and the null reference exception gets thrown in there. I’ve googled, and checked around here on Stack Overflow, but haven’t been able to find out why the MethodInfo property would be throwing an exception.

Does anyone know how to ensure this MethodInfo property is properly initialized during the web service call?

ADDITIONAL DETAILS: If I do not attempt to access the MethodInfo property, the extension works correctly and logs to my database.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T20:57:42+00:00Added an answer on May 10, 2026 at 8:57 pm

    After some trial and error, I have been able to solve this issue. While I do not entirely understand why, the SoapMessage object is not completely initialized at the BeforeDeserialize stage. Both the Action and MethodInfo properties throw errors at this stage.

    However, during the AfterSerialize stage, these objects seem to be properly initialized. By moving the line which reads the message name to a later stage, the log entry object can be properly filled without throwing an exception.

    It appears the correct order is:

    1. BeforeDeserialize

      a. Read Server URL

      b. Retrieve request information (certificates, user host address, etc.)

      c. Read request contents from stream

    2. AfterSerialize

      a. Read Exceptions

      b. Read MethodInfo information (and Action information if necessary)

      c. Read response contents from stream

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 205k
  • Answers 205k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The problem is that .NET will always round a double… May 12, 2026 at 9:02 pm
  • Editorial Team
    Editorial Team added an answer I would add the following styles to the div that… May 12, 2026 at 9:02 pm
  • Editorial Team
    Editorial Team added an answer Are there any best practices for selecting the dimensions that… May 12, 2026 at 9:02 pm

Related Questions

NOTE: Using .NET 2.0, and VS2005 as IDE Hello all, I'm working on logging
Ok, I'm going crazy. I've been trying to make a simple .net assembly visible
Currently developing an ASP.NET WebApplication with VS2008. I stopped development for a few weeks,
Environment: Windows XP/Vista, VS2008, C#/.NET 2.0, VideoGrabber . Hi All, I'm writing an app
I have encountered an error while debugging a VB.Net application in Visual Studio 2008.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.