cancel
Showing results for 
Search instead for 
Did you mean: 

unauthorized with client authentication schema

Former Member
0 Kudos

Gurus,

I use VS 2008 and try to call a web service from SAP BAPI

I tested the web service using SOAMANAGER which required a user name and password for 'Basic' authentication.

However, the .net client code below produces the error message:

*The HTTP request is unauthorized with client authentication schema 'Anonymous'.*

*The authentication header received from the server was 'Basic realm='"SAP Web Application Server[SERVER1]"*

mo_proxy.ClientCredentials.UserName.UserName = "myuser";

mo_proxy.ClientCredentials.UserName.Password = "mypassword";

mo_proxy.Open();

// This line generates the error message listed above:

DisplayRET = mo_proxy.ZKKBAPI_ALM_ORDERHEAD_GET_LIST(DisplayIN,

ref ET_RESULT,

ref ET_TEMPLATE,

ref ET_RANGES,

ref BAPIRET2);

mo_proxy.Close();

Thanks for any help.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Looks like you are using Service Reference.

Try using WebReference if your target framework is not >2.0

Regards,

Vikas

Former Member
0 Kudos

... I wish to add some more details as well...

The app.config indicate the security type is None instead of Basic.

The URL i used while adding service in VS 2008 is in the below format...

http://<host_name>:<port_number>/sap/bc/soap/wsdl/?services=ZKKBAPI_ALM_ORDERHEAD_GET_LIST&sap-clien...

Thanks for any help

Former Member
0 Kudos

Hi,

See my response on your related question: [How to change authentical in .net proxy|]

Best regards, William.