tags:

views:

122

answers:

1

Using this code I can not create a connection using IIS 7 with Windows Authentication.

        try
        {
            Axapta axapta = new Axapta();
            axapta.Logon("", "", "", "");
            //Or this> axapta.Logon("COMPANY", "NL-nl", "OBJECTSERVER", "");
            System.Diagnostics.Debug.WriteLine("yep");
            axapta.Logoff();
        }
        catch (Exception ex)
        {
            System.Diagnostics.Debug.WriteLine(ex.ToString());
        }

When changing App Pool Identity to a user with rights in Axapta then I can create a connection. So it seems like the App Pool Identity is used.

Is it even possible to get this do without using the LogonAs method? Is there some other way short of asking the user for they're credentials?

Appreciate any help on this,

Ralf

A: 

Hi

If you set the Impersonate=true flag in the web config you should be able to do this.

/Jonas

I will try, next Wednesday at my client. Thanks for your suggestion
rdkleine