Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"LogonFailedException" when using web service

149 views
Skip to first unread message

Drum

unread,
Feb 8, 2007, 2:30:01 AM2/8/07
to
I have write a .NET2.0 web service to connect to the AX .NET business
connector, the codes are as following:

//the AX 4.0 application already have the user login account and proxy
account in the //following code
Axapta ax = new Axapta();
try
{
System.Net.NetworkCredential credential = new
System.Net.NetworkCredential("Eddie","MywindowsPassword");
ax.LogonAs("Eddie", null, credential, null, null, null, null);
ax.Logoff();
catch (Exception ex)
{
return ex.ToString();
}

Or simple call ax.Logon(null, null, null, null);

I got error as following:
“Microsoft.Dynamics.BusinessConnectorNet.LogonFailedException: Failed to
establish connection. at Microsoft.Dynamics.BusinessConnectorNet.Axapta.Logon
...”

However, when I create windows application just use as following:
try
{
ax.Logon(null, null, null, null);catch (Exception ex)
{
return ex.ToString();
}
Then work perfectly in the windows form. I do not know why.
Please help.

Thanks a lot

Kevin

unread,
Feb 9, 2007, 6:14:02 PM2/9/07
to
Do you have the correct License?

When you connect through the business connector from an ASP.NET site it logs
on as a 'Webuser' which requires a Webuser license for each connection and a
COM connector license.

If you are connecting through the business connector from a Winform/Console
applicaiton it loges on as a 'Worker' and only uses a COM connector license.

If you don't have any webuser licenses you will get that error on login.

Drum

unread,
Feb 13, 2007, 6:40:01 PM2/13/07
to
Hi Kevin:
Sorry to go back to you late. I only got back from our Networking guy
today. My windows login already has Admin permission in AX and we are fully
licensed to AX. So what web user license do I need, what should I do to
achieve this?

Thanks

Kevin

unread,
Feb 15, 2007, 9:24:02 PM2/15/07
to
I my suspicion that you don't have "Enterprise portal 'Web user' Licenses".
This is based off the fact that you can login via a windows console
application but not from your web service.

You'd have to check what licenses you purchased to be sure and if that is
the case you will have to buy some web user licenses. You'll have to contact
the reseller you bought Dynamics from to purchase the licenses. They are
sold in bundles of 25 (I believe) and are based on concurrent users. So if
you'll only have 10 concurrent users, the 25 user license should be fine, but
if you are going to have 75 cuncurrent users you will have to buy that number
of licenses.

Hope that helps.

Drum

unread,
Feb 15, 2007, 11:54:00 PM2/15/07
to
Actually, I am the only user for that AX application. I still can not use my
web service to connect AX .net business connector, now I also got the error
as"Failed to establish connection". And I still can use windows applicaiton
to connect .net business connector and retrieve data from that. I do not know
what I can do to use my web service to AX connect .net business connector!!
0 new messages