NAS returns error "The Stream has returned a read error

KYDutchie
Member Posts: 345
Hi All,
I'm trying to get a field in the Sales Header to be updated thru the NAS.
I am using MSMQ for this, the message is really simple, it contains 3 elements, the first one is hardcoded 'UPS' then the Sales order Number between parenthesis and the amount between parenthesis. UPS(No.)(Amt).
I created a single instance code unit that is started by codeunit 1.
I have configured my NAS and it does login correctly. I can see that in the Application Event Viewer. But each time I put a message in my Queue, the NAS picks it up but then returns this "The stream has returned a read error." message and nothing happens.
But when I start that same codeunit directly in the Object Designer, it works perfectly.
Does anybody have an idea what I am doing wrong? ](*,)
Thank You,
KYDutchie
I'm trying to get a field in the Sales Header to be updated thru the NAS.
I am using MSMQ for this, the message is really simple, it contains 3 elements, the first one is hardcoded 'UPS' then the Sales order Number between parenthesis and the amount between parenthesis. UPS(No.)(Amt).
I created a single instance code unit that is started by codeunit 1.
I have configured my NAS and it does login correctly. I can see that in the Application Event Viewer. But each time I put a message in my Queue, the NAS picks it up but then returns this "The stream has returned a read error." message and nothing happens.
But when I start that same codeunit directly in the Object Designer, it works perfectly.
Does anybody have an idea what I am doing wrong? ](*,)
Thank You,
KYDutchie
Fostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.
0
Comments
-
KYDutchie wrote:Hi All,
I'm trying to get a field in the Sales Header to be updated thru the NAS.
I am using MSMQ for this, the message is really simple, it contains 3 elements, the first one is hardcoded 'UPS' then the Sales order Number between parenthesis and the amount between parenthesis. UPS(No.)(Amt).
I created a single instance code unit that is started by codeunit 1.
I have configured my NAS and it does login correctly. I can see that in the Application Event Viewer. But each time I put a message in my Queue, the NAS picks it up but then returns this "The stream has returned a read error." message and nothing happens.
But when I start that same codeunit directly in the Object Designer, it works perfectly.
Does anybody have an idea what I am doing wrong? ](*,)
Thank You,
KYDutchie
it looks like your user does not have enough rights to access MSMQ and I guess you are using an other user than the NAS user when you ran the single-instance codeunit as a test.
Try to login to windows with the NAS service user (NAS stopped), then login with windows authentification in Navision, run the single-instance codeunit and retry. If it still fails, there seems to be a windows permision problem, if it works, there is a NAS.EXE related problem.Torsten
MCP+I, MCSE NT, Navision MCT (2004,2005)0 -
Hi Torsten,
Since I am running everything locally and with the same user account, (I did set up the NAS Service to log in with my account), I don't think it is a permission error. More so because every user has full control over the queue. I am really confused what is going on. I tried to have the NAS session write messages into the application log, but it doesn't even get that far.
Thank you
KYDutchieFostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.0 -
KYDutchie wrote:Hi Torsten,
Since I am running everything locally and with the same user account, (I did set up the NAS Service to log in with my account), I don't think it is a permission error. More so because every user has full control over the queue. I am really confused what is going on. I tried to have the NAS session write messages into the application log, but it doesn't even get that far.
Thank you
KYDutchie
one thing to note: although the same user is used, you require at least a poweruser for the service as the service is run in another context (desktop).
Is the user you are using a local admin ?
You can run the NAS.EXE from the commandline to see whether it is related to the NAS.EXE or the fact that it fails when run as a service.nas.exe appservername=NASTEST,servername=Localhost,startupparameter=NAS,company=CRONUS
Torsten
MCP+I, MCSE NT, Navision MCT (2004,2005)0
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