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

server unavailable while logon from Web Service

394 views
Skip to first unread message

c.sen...@googlemail.com

unread,
Jan 2, 2008, 9:50:29 AM1/2/08
to
Hy Group,

I have some trouble while logon to my aos instance from a web service
using the COM Connector.
Here are the lines of code:

>>IAxapta3 ax = new Axapta3();
>>ax.Logon("", "", "", "");

If I try this from Visual Studio 2005 all works fine, but when I
publish this WebService I get an error:

>>The server is unavailable. Microsoft Dynamics will try to connect to other servers in your configuration.

My Web.config ist set to impersonate=true ...
The Location where the Webservice runs is the same w2k3 Server where
the AOS runs.
I also tried this within a Windows Form Application and there for it
runs in VS2005 AND Outside VS2005.

Have Anyone an idea please ;(

Thanks a lot....

Markus

unread,
Jan 2, 2008, 4:54:01 PM1/2/08
to
sounds familiar, web applications use a restricted access due security
issues. Have a look in the IIS configuration there is a tab where you can set
the security for scripts running on a server. Ask your server admin for
detailed information
--
My LinkedIn Profile:
http://www.linkedin.com/in/noebauer
Xing:
https://www.xing.com/profile/Markus_Noebauer

Dilip

unread,
Jan 2, 2008, 8:19:06 PM1/2/08
to
On Jan 2, 7:50 pm, "c.sennew...@googlemail.com"

Hi,

Please check Event viewer to get more error details. Also, check the
IIS -> Dynamics AX Application pool whether it has started and this
pool should be using the same Business connector proxy account which
you have configured in AX Business Connector proxy form.

Hope this helps.

Thanks and Regards,
Dilip
http://daxdilip.blogspot.com/

c.sen...@googlemail.com

unread,
Jan 3, 2008, 4:49:56 AM1/3/08
to

hi,

thanks for your answers...
the application pool is still running and under "aaplicationpool"-
>properties->identity I use the proxy user account which I have insert
in axapta.
But it do not work.
Where can i find the event viewer ???

Thanks a lot

Chris

Dilip

unread,
Jan 3, 2008, 6:05:25 AM1/3/08
to
On Jan 3, 2:49 pm, "c.sennew...@googlemail.com"
> Chris- Hide quoted text -
>
> - Show quoted text -

Hi Chris,

Can you try Ax.LogonAs instead of ax.logon?
Event viewer can be found by navigating to Control Panel-
>Administrative tools->Event viewer, there usually under Application
tab you will find the errors or information which is logged by ax or
other applications like sql, iis etc.

c.sen...@googlemail.com

unread,
Jan 3, 2008, 6:27:07 AM1/3/08
to

hy dilip

i am not able to perform a LogonAs
I tried it from VS2005 (where the Logon() Method worked fine) with the
following Line
ax.LogonAs("axaDA", "DEVAX05-220N", "axaconnect", "DEVAX05-220N",
"netlog", "SHD", "de", "192.168.230.128:2714", "C:\\Temp\
\DevAX.conf");

But I just get a System.Runtime.InteropServices.COMException :(
axaconnect is my proxy User Account which I have inserted in Axapta.

I did not find the Event Viewer jet... this may cause of senseless
translations to my german installation ;-) i have looked in AX client!
is this correct ?

thanks a lot for your help

chris

Dilip

unread,
Jan 4, 2008, 6:45:57 AM1/4/08
to
On Jan 3, 4:27 pm, "c.sennew...@googlemail.com"
> chris- Hide quoted text -

>
> - Show quoted text -

Hi Chris,

Event viewer is a Windows utitlity which resides under Control Panel,
Go to Start->Settings->Control Panel->Administrative tools.
Alternatively, you can type "eventvwr" at run command. This is
shortcut ;-) to navigate to event viewer.
Please find this KB article from Microsoft regarding using event
viewer.
http://support.microsoft.com/kb/308427

Regarding LogonAs, Could you try it this way:

Microsoft.Dynamics.BusinessConnectorNet.Axapta ax;
System.Net.NetworkCredential nc = new
System.Net.NetworkCredential("axaconnect", "YourPassword");
ax = new Microsoft.Dynamics.BusinessConnectorNet.Axapta();
ax.LogonAs(strUserName.Trim(), "", nc, "", "", "", "");

Also, can you check in your web.config if <trust level="Full"> is set.
Please do the changes,reset your IIS and test again.

c.sen...@googlemail.com

unread,
Jan 4, 2008, 7:53:41 AM1/4/08
to
> viewer.http://support.microsoft.com/kb/308427

>
> Regarding LogonAs, Could you try it this way:
>
> Microsoft.Dynamics.BusinessConnectorNet.Axapta ax;
> System.Net.NetworkCredential nc = new
> System.Net.NetworkCredential("axaconnect", "YourPassword");
> ax = new Microsoft.Dynamics.BusinessConnectorNet.Axapta();
> ax.LogonAs(strUserName.Trim(), "", nc, "", "", "", "");
>
> Also, can you check in your web.config if <trust level="Full"> is set.
> Please do the changes,reset your IIS and test again.
>
> Thanks and Regards,
> Diliphttp://daxdilip.blogspot.com/

Hy Dilip,

I will try the point with the trust-level. But with the
BusinessConnectorNET I have the problem, that I have no web license to
test this fact
do you know if the COM WebUser and the .NET WebUser is the same
license ?
From a WindowsApplicationForm I can perfom a LogonAs with the .NET
Connector but not with the COM Connector ;.-(

Thanks

Chris

Axel Kühn

unread,
Jan 5, 2008, 12:44:02 PM1/5/08
to
Hi,

did you ever test the login with a spezified configuration file?
Something like this:
ax.Logon("", "", "", "C:\\myConfig.axc");

But keep in mind, that your "real" IIS must have access to this file.
--
Sincerely yours
Axel Kühn (visit my Dynamics AX blog at: http://blog.ak-home.net)

Dilip

unread,
Jan 7, 2008, 7:42:41 AM1/7/08
to
On Jan 4, 5:53 pm, "c.sennew...@googlemail.com"


Hi Chris,

AFAIK, .Net business connector and COM Connector comes with the base
license. COM Connector is for backward compatibility, you can run your
AX setup and choose COM Connector from additional roles. (Installation
wizard.)

Thanks and Regards,
Dilip

c.sen...@googlemail.com

unread,
Jan 8, 2008, 4:21:57 AM1/8/08
to

hy

i have got a solution for my problems. after i set up a proxy account
and created a applicationpool and website in iis I found a good
whitepaper from Metastorm
I did the following actions:

- run "cscript adsutil.vbs set w3svc/1/root/NTAuthenticationProviders
"Negotiate, NTLM" in c:\inetpub\adminscripts
- retstart IIS
- install MS Support Tools
- run "setspn -a HTTP/<IIS fully qualified name> domain\proxyaccount"
in command line
- afterwards I set the application pool's identity to the proxy
account I have created.

then it runs with LogonAs("myAxUser", "domain", "proxyAccount",
"domain", "passwd", "company", "language", , "configfile");

in Ax I wrote a small test class which returns the logged in AX user
ID within a string with the following:

return "Hello from Axapta User: " + curUser.Id();

So I think my problem is solved now.

I want to thank all users who helped me, and I am sure another
question will come soon ;-)

Thanks

Chris

Dilip

unread,
Jan 8, 2008, 12:31:50 PM1/8/08
to
On Jan 8, 2:21 pm, "c.sennew...@googlemail.com"

Hi Chris,

Good to know that your problem solved and thanks for posting the
troubleshooting steps.

thanks and Regards,
Dilip

0 new messages