Web Service error

Discussion in 'ASP .Net Web Services' started by Pril, Nov 14, 2003.

  1. Pril

    Pril Guest

    Example 'hello word' produce error (see below). Help me please!!!

    Thanks in advance,

    Primoz

    error description
    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 instance of an object.

    Source Error:

    Line 1201:
    Line 1202: OperationBinding FindHttpBinding(string verb) {
    Line 1203: foreach (ServiceDescription description in
    serviceDescriptions) {
    Line 1204: foreach (Binding binding in description.Bindings) {
    Line 1205: HttpBinding httpBinding =
    (HttpBinding)binding.Extensions.Find(typeof(HttpBinding));

    Source File:
    d:\winnt\microsoft.net\framework\v1.1.4322\Config\DefaultWsdlHelpGenerator.a
    spx Line: 1203

    Stack Trace:

    [NullReferenceException: Object reference not set to an instance of an
    object.]
    ASP.DefaultWsdlHelpGenerator_aspx.FindHttpBinding(String verb) in
    d:\winnt\microsoft.net\framework\v1.1.4322\Config\DefaultWsdlHelpGenerator.a
    spx:1203
    ASP.DefaultWsdlHelpGenerator_aspx.get_HttpPostOperationBinding() in
    d:\winnt\microsoft.net\framework\v1.1.4322\Config\DefaultWsdlHelpGenerator.a
    spx:441
    ASP.DefaultWsdlHelpGenerator_aspx.get_ShowingHttpPost() in
    d:\winnt\microsoft.net\framework\v1.1.4322\Config\DefaultWsdlHelpGenerator.a
    spx:456
    ASP.DefaultWsdlHelpGenerator_aspx.__Render__control13(HtmlTextWriter
    __output, Control parameterContainer) in
    d:\winnt\microsoft.net\framework\v1.1.4322\Config\DefaultWsdlHelpGenerator.a
    spx:1435
    System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +27
    System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter
    writer) +29
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
    System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +72
    System.Web.UI.Control.Render(HtmlTextWriter writer) +7
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
    System.Web.UI.Page.ProcessRequestMain() +1929
     
    Pril, Nov 14, 2003
    #1
    1. Advertising

  2. Pril

    ajay Guest

    Hi,

    Please check the attributes of the Web Method.
    If you want to make use of the session objects using Web
    services, you need to activate one of the attributes of
    the Web Method @EnableSession = true.
    It's default value is false.

    [Web Method (true)]

    Hope this solves your problem.

    Cheers

    Ajay
    >-----Original Message-----
    >Example 'hello word' produce error (see below). Help me

    please!!!
    >
    >Thanks in advance,
    >
    >Primoz
    >
    >error description
    >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 instance of an object.
    >
    >Source Error:
    >
    >Line 1201:
    >Line 1202: OperationBinding FindHttpBinding(string

    verb) {
    >Line 1203: foreach (ServiceDescription description

    in
    >serviceDescriptions) {
    >Line 1204: foreach (Binding binding in

    description.Bindings) {
    >Line 1205: HttpBinding httpBinding =
    >(HttpBinding)binding.Extensions.Find(typeof(HttpBinding));
    >
    >Source File:
    >d:\winnt\microsoft.net\framework\v1.1.4322

    \Config\DefaultWsdlHelpGenerator.a
    >spx Line: 1203
    >
    >Stack Trace:
    >
    >[NullReferenceException: Object reference not set to an

    instance of an
    >object.]
    > ASP.DefaultWsdlHelpGenerator_aspx.FindHttpBinding

    (String verb) in
    >d:\winnt\microsoft.net\framework\v1.1.4322

    \Config\DefaultWsdlHelpGenerator.a
    >spx:1203
    >

    ASP.DefaultWsdlHelpGenerator_aspx.get_HttpPostOperationBind
    ing() in
    >d:\winnt\microsoft.net\framework\v1.1.4322

    \Config\DefaultWsdlHelpGenerator.a
    >spx:441
    > ASP.DefaultWsdlHelpGenerator_aspx.get_ShowingHttpPost

    () in
    >d:\winnt\microsoft.net\framework\v1.1.4322

    \Config\DefaultWsdlHelpGenerator.a
    >spx:456
    > ASP.DefaultWsdlHelpGenerator_aspx.__Render__control13

    (HtmlTextWriter
    >__output, Control parameterContainer) in
    >d:\winnt\microsoft.net\framework\v1.1.4322

    \Config\DefaultWsdlHelpGenerator.a
    >spx:1435
    > System.Web.UI.Control.RenderChildren(HtmlTextWriter

    writer) +27
    > System.Web.UI.HtmlControls.HtmlContainerControl.Render

    (HtmlTextWriter
    >writer) +29
    > System.Web.UI.Control.RenderControl(HtmlTextWriter

    writer) +243
    > System.Web.UI.Control.RenderChildren(HtmlTextWriter

    writer) +72
    > System.Web.UI.Control.Render(HtmlTextWriter writer) +7
    > System.Web.UI.Control.RenderControl(HtmlTextWriter

    writer) +243
    > System.Web.UI.Page.ProcessRequestMain() +1929
    >
    >
    >
    >
    >.
    >
     
    ajay, Nov 17, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page