I've been having trouble getting my website login authentication to pass through to NAV webservices. My form login user is replaced by a NTSservice Account when ASP.net attempts to connect through the Webservices. I've found I can use an Impersonate user in the webconfig file but I would like to be able to use the NAV users if possible.
Instead of using this fixed windows account, you want each ASP.NET client user to map to an individual NAV windows login. Is that correct?
If all of this happens within a single windows domain, you are better off using windows authentication rather than forms auth. The hard part is configuring the ASP.NET host (presumably IIS) to present delegated credentials to the NAV web services.
If the users login from outside the host domain, but their forms credentials map to valid windows credentials inside the host domain, you may be able to exploit the technique described here http://visualstudiomagazine.com/articles/2004/05/01/activate-windows-impersonation-selectively.aspx to impersonate them.
This was only for experimentation, so you'll probably have to come up with something more clever for production, at least on the security management & storage side.
Now, first, in my web.config:
This stores the passwords in clear text, so I wouldn't suggest this is *the* way to go when you port to production. You'll probably have to come up with a clever system that allows you to populate your security system with Active Directory info or something.
Anyway, with Clear passwordFormat and enablePasswordRetrieval, you can call the Credential piece of the web service generation with the login information of your user.
Not sure if this helps even in the slightest, but it did technically work for me.
CEO, Spare Brained Ideas, Göteborg, Sweden
New (April 2021) Getting Started with Microsoft Dynamics 365 Business Central Book Available: "Your First 20 Hours with Business Central"