Error 'BusinessLayer' does not contain a definition for 'MySoapHeader'

Discussion in 'ASP .Net' started by Justin Dutoit, Oct 6, 2004.

  1. Hey. I have the error CS0117 'BusinessLayer' does not contain a definition
    for 'MySoapHeader'. Below is a link to the asmx source, and the code which
    calls the web service. MS seems to do the same thing at
    http://www.dotnetjunkies.com/QuickStart/aspplus/default.aspx?url=/quickstart
    /aspplus/doc/secureservices.aspx

    I'd appreciate any help. Thanks

    Justin Dutoit

    http://justindutoit.port5.com/QuickshopDocs/businesslayer.asmx.txt

    void callws(Object Source, EventArgs e) {

    BusinessLayer business = new BusinessLayer();
    AuthHeader auth = new AuthHeader();
    auth.Username = "justindutoit";
    auth.Password = "paulpaul";
    business.MySoapHeader = auth; // <<< error here

    info.Text = business.Test();

    }
     
    Justin Dutoit, Oct 6, 2004
    #1
    1. Advertising

  2. RE: Error 'BusinessLayer' does not contain a definition for 'MySoapHea

    try:
    SampleSvcs.Service1 svcs = new SampleSvcs.Service1();
    svcs.Credentials = new System.Net.NetworkCredential("user", "password",
    "domain");


    "Justin Dutoit" wrote:

    > Hey. I have the error CS0117 'BusinessLayer' does not contain a definition
    > for 'MySoapHeader'. Below is a link to the asmx source, and the code which
    > calls the web service. MS seems to do the same thing at
    > http://www.dotnetjunkies.com/QuickStart/aspplus/default.aspx?url=/quickstart
    > /aspplus/doc/secureservices.aspx
    >
    > I'd appreciate any help. Thanks
    >
    > Justin Dutoit
    >
    > http://justindutoit.port5.com/QuickshopDocs/businesslayer.asmx.txt
    >
    > void callws(Object Source, EventArgs e) {
    >
    > BusinessLayer business = new BusinessLayer();
    > AuthHeader auth = new AuthHeader();
    > auth.Username = "justindutoit";
    > auth.Password = "paulpaul";
    > business.MySoapHeader = auth; // <<< error here
    >
    > info.Text = business.Test();
    >
    > }
    >
    >
    >
     
    =?Utf-8?B?dG9tIHdpc25vd3NraQ==?=, Oct 6, 2004
    #2
    1. Advertising

  3. Re: Error 'BusinessLayer' does not contain a definition for 'MySoapHea

    Thanks for replying, but I don't think I need NetworkCredential, it's custom
    authentication, where a distant web app is calling my web service by
    supplying a username and password. Have a look at the web service code.

    Tks
    Justin

    "tom wisnowski" <> wrote in message
    news:...
    > try:
    > SampleSvcs.Service1 svcs = new SampleSvcs.Service1();
    > svcs.Credentials = new System.Net.NetworkCredential("user", "password",
    > "domain");
    >
    >
    > "Justin Dutoit" wrote:
    >
    > > Hey. I have the error CS0117 'BusinessLayer' does not contain a

    definition
    > > for 'MySoapHeader'. Below is a link to the asmx source, and the code

    which
    > > calls the web service. MS seems to do the same thing at
    > >

    http://www.dotnetjunkies.com/QuickStart/aspplus/default.aspx?url=/quickstart
    > > /aspplus/doc/secureservices.aspx
    > >
    > > I'd appreciate any help. Thanks
    > >
    > > Justin Dutoit
    > >
    > > http://justindutoit.port5.com/QuickshopDocs/businesslayer.asmx.txt
    > >
    > > void callws(Object Source, EventArgs e) {
    > >
    > > BusinessLayer business = new BusinessLayer();
    > > AuthHeader auth = new AuthHeader();
    > > auth.Username = "justindutoit";
    > > auth.Password = "paulpaul";
    > > business.MySoapHeader = auth; // <<< error here
    > >
    > > info.Text = business.Test();
    > >
    > > }
    > >
    > >
    > >
     
    Justin Dutoit, Oct 6, 2004
    #3
  4. Re: Error 'BusinessLayer' does not contain a definition for 'MySoa

    So your proxy object doens't contain a def for your soap header field. I just
    tried writing a quick web service that uses a soap header. It seems to work
    fine in c#, the only difference between my code and yours is that the proxy
    contained a field for the header in the syntax [SoapHeaderObjType]Value.

    Refresh your web reference (right click on the web reference in the solution
    explorer, choose update). then clikc "show all files" for that project.
    Expand the serivice in the explorer and drill down to the reference file.
    this is your proxy. Look at the class def. you will see the field that
    exposes your header and the type defined in this fiel as well.

    I tested my code in C# but i assume it to work the same in VB

    Let me know if this helped....

    "Justin Dutoit" wrote:

    > Thanks for replying, but I don't think I need NetworkCredential, it's custom
    > authentication, where a distant web app is calling my web service by
    > supplying a username and password. Have a look at the web service code.
    >
    > Tks
    > Justin
    >
    > "tom wisnowski" <> wrote in message
    > news:...
    > > try:
    > > SampleSvcs.Service1 svcs = new SampleSvcs.Service1();
    > > svcs.Credentials = new System.Net.NetworkCredential("user", "password",
    > > "domain");
    > >
    > >
    > > "Justin Dutoit" wrote:
    > >
    > > > Hey. I have the error CS0117 'BusinessLayer' does not contain a

    > definition
    > > > for 'MySoapHeader'. Below is a link to the asmx source, and the code

    > which
    > > > calls the web service. MS seems to do the same thing at
    > > >

    > http://www.dotnetjunkies.com/QuickStart/aspplus/default.aspx?url=/quickstart
    > > > /aspplus/doc/secureservices.aspx
    > > >
    > > > I'd appreciate any help. Thanks
    > > >
    > > > Justin Dutoit
    > > >
    > > > http://justindutoit.port5.com/QuickshopDocs/businesslayer.asmx.txt
    > > >
    > > > void callws(Object Source, EventArgs e) {
    > > >
    > > > BusinessLayer business = new BusinessLayer();
    > > > AuthHeader auth = new AuthHeader();
    > > > auth.Username = "justindutoit";
    > > > auth.Password = "paulpaul";
    > > > business.MySoapHeader = auth; // <<< error here
    > > >
    > > > info.Text = business.Test();
    > > >
    > > > }
    > > >
    > > >
    > > >

    >
    >
    >
     
    =?Utf-8?B?dG9tIHdpc25vd3NraQ==?=, Oct 7, 2004
    #4
    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.
Similar Threads
  1. Ashish Kanoongo
    Replies:
    1
    Views:
    623
    Vjekoslav Babic
    Feb 3, 2004
  2. Luis Esteban Valencia
    Replies:
    1
    Views:
    4,325
    =?Utf-8?B?Vmtv?=
    Jan 6, 2005
  3. Earl Teigrob
    Replies:
    1
    Views:
    422
    Shravan
    Mar 1, 2004
  4. Joel Zinn

    ItemDataBound error: does not contain a definition for

    Joel Zinn, Sep 14, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    930
    Joel Zinn
    Sep 14, 2006
  5. Jason Carlton
    Replies:
    11
    Views:
    252
    Dr J R Stockton
    Dec 8, 2009
Loading...

Share This Page