Hi Experts,
I have exposed a page as a Web Service and trying to insert records using this Page Web Service from SSIS.
I have written code in SSIS Script Task to access Page Web Service and to insert Recods. Everything works fine until i get into any NAV related Errors (EX: Dimension Value 124 does not exist), after i get the NAV error, if i tried to connect to NAV using same SSIS Package
i get the following error message:
Event Type: Failure Audit
Event Source: MSSQL$PPS
Event Category: (4)
Event ID: 18456
Date: 11/10/2010
Time: 22:27:45
User: NT AUTHORITY\ANONYMOUS LOGON
Computer: NAV-SQL-01
Description:
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. [CLIENT: 123.123.123.123]
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 18 48 00 00 0e 00 00 00 .H......
0008: 0d 00 00 00 45 00 54 00 ....N.A.V
0010: 2d 00 58 00 4d 00 2d 00 -.S.Q.L.-.
0018: 30 00 31 00 5c 00 50 00 0.1.\.N.
0020: 50 00 53 00 00 00 07 00 A.V.....
0028: 00 00 6d 00 61 00 73 00 ..m.a.s.
0030: 74 00 65 00 72 00 00 00 t.e.r...
I have installed NAV 2009 SP1 in 3 tier environment, Doman Account as a Service Account for SQL Server and NAV Server.
If i go back to NAV Server and access the Web Services once from IE, and then if i go back to my SSIS Package it works fine.
Any time i get into any NAV related error message, i can't reconnect to NAV unless i go back to NAV server and access the Web Service once from that Server.
Please let me know your suggestions!!
Thanks
Comments
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
I am passing an Object Variable (expensedetails_docno) to SQL Script Task. I am also calling different company web service based on data, so i am also passing the Company Name to this script task.
I am using SQL 2005, so i can't add a web reference to the NAV Page Web Service , so I have created a VB Proxy class using wsdl.exe and imported the new class directly into the Scipt. Class Name: NAVJobGLJournal.
Dim oleDA As New OleDbDataAdapter
Dim dt As New DataTable
oleDA.Fill(dt, Dts.Variables("expensedetails_docno").Value)
Dim lineCount As Integer
lineCount = dt.Rows.Count
Dim i As Integer
Dim baseURL As String = "http://123.123.123.123:7047/DynamicsNAV/WS/"
Dim compName As String = Dts.Variables("Company").Value.ToString
Dim jobJnlPageURL As String = baseURL + compName + "/Page/JobGLJournal"
Dim jobJnlService As New JobGLJournal_Service()
jobJnlService.Url = jobJnlPageURL
jobJnlService.UseDefaultCredentials = True
Dim JobJnlArray As JobGLJournal() = New JobGLJournal(lineCount) {}
For i = 0 To dt.Rows.Count - 1
JobJnlArray(i) = New JobGLJournal()
JobJnlArray(i).Journal_Template_Name = "JOBS"
JobJnlArray(i).External_Document_No = CStr(dt.Rows(i).Item("document_id"))
Next
jobJnlService.CreateMultiple("DEFAULT", JobJnlArray)
Try
For i = 0 To dt.Rows.Count - 1
JobJnlArray(i).Description = dt.Rows(i).Item("description").ToString
JobJnlArray(i).Posting_Date = CDate(dt.Rows(i).Item("approved_date"))
JobJnlArray(i).Amount = CDec(dt.Rows(i).Item("amount_credit"))
JobJnlArray(i).Shortcut_Dimension_1_Code = CStr(dt.Rows(i).Item("product_line"))
' i have deleted other assignment lines from here..
Next
jobJnlService.UpdateMultiple("DEFAULT", JobJnlArray)
Catch ex As Exception
' Delete Blank Records
For i = 0 To dt.Rows.Count - 1
jobJnlService.Delete("DEFAULT", JobJnlArray(i).Key)
Next
End Try
FYI: i am able to import the data into different companies, everything works fine until i get into a Dimension error or "Job No." does not exist error. Once i get the NAV error, then i am not able to connect to WS.
Thanks
U can Try This Code
jobJnlService.UseDefaultCredentials = False;
jobJnlService.Credentials = New System.Net.NetworkCredential(UserName,Password);
Senior NAV Developer
Microsoft Dynamics NAV
Thanks for your reply..
We have tried that option too, it didn't work, we are getting the same error message.
When we debug the application, sytem is assigning the credentials as we specified but when system tries to connect to NAV WS, we are getting the error message. System is generating the error message at this line: jobJnlService.CreateMultiple("DEFAULT", JobJnlArray)
Thanks
Webservice are running under NETWORK SERVICE account or Domain account ?
Senior NAV Developer
Microsoft Dynamics NAV
So everything works - and once you have received an exception from NAV you can no longer connect.
Also not if you write another small application connecting? or connect with a browser from the machine connecting?
Doesn't sound like a delegation issue
The event log you have displayed is that from the machine with your script or from the NAV server?
I am guessing it is from the first - are there any entries in the log on the NAV Server?
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
Does anyone found the solution for this problem? It's a problem of delegation? I already tried to change the delegation settings and the problem remains.
Thanks a lot.
Ricardo
it seems to be okay....
i already create SPN
i already delegate and using kerberos
but when i check in the event viewer in db server... why it still said login failed for user NT AUTHORITY\ANONYMOUS LOGON ??
reason : Token-based server access validation failed with an infrastructure error
I also allow myself to ask in this thread if there were a solution found.
We are experiensing the same - one day it works fine, and we can connect through IE, Chrome and a PHP-webapp - but then sunddenly we can not connect and have to go to the server and make a connection which make it available again from outside the domain... #-o
Any help is much appriciated.
Troubleshooting multi-machine installations of NAV 2009
maybe this will help...
And check your SPN's with SetSPN -X
Know this is a shot in the dark but does anyone know how this issue got resolved?