|
|
#1 |
|
Участник
|
Web services и SOAP
Всем привет.
Есть задача: с публичного портала дергать аксаптовый веб-сервис. Ax 2012 R2, Windows Server 2008. Проблема вкратце – на тестовом примере удалось обратиться к веб-сервису из VS2010, но не удалось через SOAP, возникли проблемы аутентификации пользователя на АОС-е. Причины не понятны. Тестовое окружение: 1) на одной машине установлены AOS и IIS 2) Web services on IIS установлены на дефолтный веб сайт (Default Web Site). 3) На форме Services and Application Integration Framework\Веб-сайты по соответствующему сайту проверка ошибок не выдает 4) Для Identity application pool сайта и соответствующего application для web services выбрана определенная доменная учетная запись 5) Аутентификация Default Web Site – anonymous 6) Аутентификация application для web services – windows (пробовал и с Basic аутентификацией) Создан простенький кастомный сервис, в классе единственный метод: Код: [SysEntryPointAttribute(false),
AifCollectionTypeAttribute('_flag', Types::String)]
public void setFlags(str _flag)
{
Table1 Table1;
;
Table1.Field1 = _flag;
Table1.insert();
}
Для проверки вызова сервиса в VS 2010 создан проект типа windows form application. Сервис добавлен в ссылки (при этом были запрошены реквизиты пользователя). В проекте форма с одной кнопкой, при нажатии которой работает код: Код: private void button1_Click(object sender, EventArgs e)
{
MyService.DyalServiceClient proxy = new MyService.DyalServiceClient();
;
try
{
MyService.CallContext context = new MyService.CallContext();
context.Company = "rus";
proxy.setFlags(context, "Ura");
MessageBox.Show("yes");
}
catch (Exception ex)
{
throw ex;
}
}
Код: Object Server 01: An error has occurred in the services framework. Method: AifMessageInspector::AfterReceiveRequest. Error: System.Security.SecurityException: Logon failure: unknown user name or bad password. at System.Security.Principal.WindowsIdentity.KerbS4ULogon(String upn, SafeTokenHandle& safeTokenHandle) at System.Security.Principal.WindowsIdentity..ctor(String sUserPrincipalName, String type) at System.Security.Principal.WindowsIdentity..ctor(String sUserPrincipalName) at Microsoft.Dynamics.Ax.Services.AxSessionInitBehavior.getUserSid(String logonAsUser) at Microsoft.Dynamics.Ax.Services.AxServiceOperationContext.InitializeSession() at Microsoft.Dynamics.Ax.Services.AxServiceOperationContext.InitializeContext() at Microsoft.Dynamics.Ax.Services.AxServiceOperationContext.Attach(OperationContext owner) at System.ServiceModel.ExtensionCollection`1.InsertItem(Int32 index, IExtension`1 item) at System.Collections.Generic.SynchronizedCollection`1.Add(T item) at Microsoft.Dynamics.Ax.Services.AifMessageInspector.AfterReceiveRequest(Message& request, IClientChannel channel, InstanceContext instanceContext) The Zone of the assembly that failed was: MyComputer Код: An account failed to log on.
Subject:
Security ID: RU\SPO
Account Name: spo
Account Domain: RU
Logon ID: 0x1dce2
Logon Type: 3
Account For Which Logon Failed:
Security ID: NULL SID
Account Name:
Account Domain:
Failure Information:
Failure Reason: Unknown user name or bad password.
Status: 0xc000006d
Sub Status: 0xc0000064
Process Information:
Caller Process ID: 0xce4
Caller Process Name: E:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin\Ax32Serv.exe
Network Information:
Workstation Name: RUAXDEV04
Source Network Address: -
Source Port: -
Detailed Authentication Information:
Logon Process: C
Authentication Package: Kerberos
Transited Services: -
Package Name (NTLM only): -
Key Length: 0
|
|
|
| Теги |
| ax2012r3, soap, wcf, web сервис, webservice, веб-сервис |
|
|
|