473,395 Members | 1,568 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,395 software developers and data experts.

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

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/QuickSt...rl=/quickstart
/aspplus/doc/secureservices.aspx

I'd appreciate any help. Thanks

Justin Dutoit

http://justindutoit.port5.com/Quicks...layer.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();

}
Nov 18 '05 #1
3 2028
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/QuickSt...rl=/quickstart
/aspplus/doc/secureservices.aspx

I'd appreciate any help. Thanks

Justin Dutoit

http://justindutoit.port5.com/Quicks...layer.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();

}

Nov 18 '05 #2
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" <to**********@discussions.microsoft.com> wrote in message
news:7F**********************************@microsof t.com...
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/QuickSt...rl=/quickstart /aspplus/doc/secureservices.aspx

I'd appreciate any help. Thanks

Justin Dutoit

http://justindutoit.port5.com/Quicks...layer.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();

}

Nov 18 '05 #3
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" <to**********@discussions.microsoft.com> wrote in message
news:7F**********************************@microsof t.com...
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/QuickSt...rl=/quickstart /aspplus/doc/secureservices.aspx

I'd appreciate any help. Thanks

Justin Dutoit

http://justindutoit.port5.com/Quicks...layer.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();

}


Nov 18 '05 #4

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

Similar topics

0
by: Justin Dutoit | last post by:
Hey. Take a look at this link. http://justindutoit.port5.com/QuickshopDocs/businesslayer.asmx.txt When I call the web service, I have the error CS0117 'BusinessLayer' does not contain a...
3
by: Ann Marinas | last post by:
Hi there, I am currently developing an ASP.NET program that connects to a SQL Server 2000 database. I also have SQL Server 2005 Express installed on the same local machine. Prior to...
1
by: rcoco | last post by:
Hi, I'm having this error, 'Bsc_Test1.src.controls.cont' does not contain a definition for 'ChartTitle' 'Bsc_Test1.src.controls.cont' does not contain a definition for 'gcolors'...
0
by: rcoco | last post by:
Hi, I'm having this error, 'Bsc_Test1.src.controls.cont' does not contain a definition for 'ChartTitle' 'Bsc_Test1.src.controls.cont' does not contain a definition for 'gcolors'...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
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...

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.