web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

.NET Connector in ASP.NET with Windows Authentication Impersonation

(0) ShareShare
ReportReport
Posted on by 80

I've set up a site to use Impersonation and when I write to a file on the with the content of the currently logged on User, it is the correct impersonated user.

All computers are connected to a domain with Active Directory and the correct user is printed into the file that I write with the following lines of code:

WindowsIdentity.GetCurrent().Name,
Thread.CurrentPrincipal.Identity.Name,                       
ServiceSecurityContext.Current.WindowsIdentity.Name

These are written from a WCF Service.

The WCF Service should logon to AX using the Logon(null, null, null, null) to use the currently logged on User.

However! When I access the page from a different computer in the network than the one hosting the IIS, i still get the same username in the text-file I write, but it tells me "You are not logged on to Microsoft Dynamics".

BUT when the First request after iisreset is from the Hosting IIS machine, with the same User logged in via Remote Desktop, I can start the site and logon to AX.

And after that I can access the site With the same user from other computer, but I cannot access it with different users.

This is really hard to explain, any questions or suggestions why the Impersonation seems to fail start the business connector over network?

We use:
.NET 4.0
WCF
AX 2008
Windows Server 2008
IIS 7

Thanks
// F

*This post is locked for comments

I have the same question (0)
  • user5555 Profile Picture
    7,437 on at

    Hi,

    I did just play with VS2008 and the business connector. Your architecture is not quite clear to me. You have IIS running with a WCF service, this service is called through http on various pc's with various user authentications?

    What I remember:

    1. Look for the proxy of the business connector, maybe you need it in IIS, also the security of the application pool should match this proxy user. I remember a post, book or whitepaper on this
    2. Look for a post in which is stated that the business connector cannot be closed properly when changing the aos. Maybe same for your situation.

    Not sure if I help you, but you may have some leads to investigate further.

    J.

  • Filip Ekberg Profile Picture
    80 on at
    Thank you for your answer.

    I will try to be a bit more clear here. We are not using a specific proxy user. Each user that authenticates with the website is the Owner of the thread spawning the business connector.

    Which means that the Process is started by the logged on user using impersonation.

    Do you remember the name of that whitepaper? Maybe it could be of some help.
    Cheers
  • user5555 Profile Picture
    7,437 on at

    Hi,

    Chapter 10 of the Inside Dynamics AX book. Also referring to chapter 7 since Enterprise Portal is using similar setup with Business Connector.

    J.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans