Best Practice - Web Service Logon

Toddy_Boy
Member Posts: 232
Hi All
Working with SQL Server R2 64 bit, Nav2009 Classic Client, Objects 2.6 (old school baby 8) ) we have developed an asp.net website to enable members of the outside world to interact with Navision via web services which works well, however we are having some authentication issues and I'm wondering what the bestter practice would be.
A domain user domainname\dn is used to run the Business Layer services. I would like, for consistency (and not o use another CAL) to use this user's credentials (username and password) when connecting the web service i.e.
objWSClass.Credentials = New Net.NetworkCredential("dn", "dnpassword", "domainname")
However this returns an error when trying to conect to the database when used in a web service call "Login failed when trying to connect to SQL Server", if I use my credentials (I am local SQL Admin) everything works fine.
So, have I missed something obvious setting up the domain\dn user or is the better practice to use a dedicated user to authenticate?
Steve
Working with SQL Server R2 64 bit, Nav2009 Classic Client, Objects 2.6 (old school baby 8) ) we have developed an asp.net website to enable members of the outside world to interact with Navision via web services which works well, however we are having some authentication issues and I'm wondering what the bestter practice would be.
A domain user domainname\dn is used to run the Business Layer services. I would like, for consistency (and not o use another CAL) to use this user's credentials (username and password) when connecting the web service i.e.
objWSClass.Credentials = New Net.NetworkCredential("dn", "dnpassword", "domainname")
However this returns an error when trying to conect to the database when used in a web service call "Login failed when trying to connect to SQL Server", if I use my credentials (I am local SQL Admin) everything works fine.
So, have I missed something obvious setting up the domain\dn user or is the better practice to use a dedicated user to authenticate?
Steve
Life is for enjoying ... if you find yourself frowning you're doing something wrong
0
Answers
-
1) CALs are not about accounts, it is about physical users working with the system. Doesn't matter if you have 100 accounts in the system when physically using it is only one person. It is one CAL. If you have one account,used with 100 users,it is 100 CALs...
2) Is the account defined in NAV and have some roles assigned?0 -
Hi Kine
I can logon with windows authentication as the domain\dn no problem, the user has Super rights.
SteveLife is for enjoying ... if you find yourself frowning you're doing something wrong0 -
-
Hi Kine
Nothing was done with Kerberos for my user (the one that logs the web service on no problem), although we had to do a lot of Kerberos and SPN stuff to get the domain\dn user to function correctly when being used as the service account.
I get the feeling it's something to do with the SQL Server account or admin user account, however both myself and the domain\dn user are local admins on all machines.
SteveLife is for enjoying ... if you find yourself frowning you're doing something wrong0 -
Than try to go through event logs on the service tier and on the SQL server to find more. Look into SQL if the authnetication request is for ANONYMOUS or for correct account. Check that the account have correct permissions on SQL to login...0
-
Error Log on the SQL Server shows
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors.
What does that mean :-k We resolved errors like this with the Kerberos SPN stuff when setting up domain\dnLife is for enjoying ... if you find yourself frowning you're doing something wrong0 -
I recommend to check again the SPNs, date and time on the servers, and that the user account is not somehow disabled for Krberos and delegation (untrusted for delegation etc.)0
-
Toddy. Did you find an answer to this problem?0
-
Yes with the aid of our Dynamics partner.
It was a problem with the SPNs and Kerberos. The SPNs were set up incorrectly, these needed to be amended by using the adsiedit.msc - Active Directory Security Information editor for setting SPN's via a GUI. This is part of W2003 Server support tools SP2. Here is a fuller description of what was done and used, hope it's useful.
KerbTray - Kerberos toolkit for looking at Kerberos tickets - download from Microsoft
Setting SPN's for SQL Clusters - and multiple SQL instances http://support.microsoft.com/kb/319723
The key points here are:
1. Use the instructions in the KB article to set the SPN's for SQL - these are dynamically set using these instructions.
2. Set the SPN's on the service names using adsiedit - they DO include the port numbers.
3. Once the SPN's have been setup for the services (SQL service account and Nav server account), the delegation information that needs to be added to the NAV Server account (via active directory users and computers) will be driven by the SPN's that have been set up on the SQL service.
4. Use the kerberos tool to check that the SPN's are working for the RTC connectivity to the NAV server.Life is for enjoying ... if you find yourself frowning you're doing something wrong0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions