Здравствуйте. Помогите ввести пароль и логин в вебслужбу.
выскакивает ошибка : Запрос HTTP не разрешен для схемы проверки подлинности клиента "Anonymous". От сервера получен заголовок проверки подлинности "Basic realm="SAP NetWeaver Application Server [D03/040]"".
config клиента
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.diagnostics>
<sources>
<!-- В этой секции определяется конфигурация ведения журнала для My.Application.Log -->
<source name="DefaultSource" switchName="DefaultSwitch">
<listeners>
<add name="FileLog"/>
<!-- Раскомментируйте следующую секцию для записи в журнал событий приложения -->
<!--<add name="EventLog"/>-->
</listeners>
</source>
</sources>
<switches>
<add name="DefaultSwitch" value="Information" />
</switches>
<sharedListeners>
<add name="FileLog"
type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
initializeData="FileLogWriter"/>
<!-- Раскомментируйте следующую секцию и замените APPLICATION_NAME на имя своего приложения для записи в журнал событий приложения -->
<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
</sharedListeners>
</system.diagnostics>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="ZWSBSK_GET_ACTS" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="Transport">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
<binding name="ZWSBSK_GET_ACTS1" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="https://d03.enmashbel.ru:5200/sk/getacts"
binding="basicHttpBinding" bindingConfiguration="ZWSBSK_GET_ACTS"
contract="ServiceReference1.zwssk_Get_Acts" name="ZWSBSK_GET_ACTS" />
</client>
</system.serviceModel>
</configuration>
код :
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Private myMathServicet As New proba3.ServiceReference1.zwssk_Get_ActsClient
Private myMathServicet1 As New proba3.ServiceReference1.Z_SK_GET_ACTS
Private myMathServicetr As New proba3.ServiceReference1.Z_SK_GET_ACTSResponse
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
myMathServicet.ClientCredentials.UserName.UserName = "MMM44"
myMathServicet.ClientCredentials.UserName.Password = "4321"
myMathServicet1.ERDAT = "02.11.2020"
myMathServicetr = myMathServicet.Z_SK_GET_ACTS(Z_SK_GET_ACTS1:=myMathServicet1)
End Sub
на myMathServicetr = myMathServicet.Z_SK_GET_ACTS(Z_SK_GET_ACTS1:=myMathServicet1) ругается.
что делаю не так?