NAS mystery with Automation

MagicNAV
Member Posts: 8
Hello,
I have the problem with Automation. My Automation is COM object (DLL file). I use NAV2009 with SQL database in Windows Server 2003.
When I started directly the codeunit and create Automation in NAV Classic Client, it's work.
When started the codeunit by NAS, it's fail. I didn't get any error, but I saw that the scheduler task was still running and never stopped.
I tested with the same windows user, so the rights are the same.
My extact of code is:
CLEAR("Export Class");
IF ISCLEAR("Export Class") THEN BEGIN
CREATE("Export Class");
I saw that the NAS was hanged by the CREATE("Export Class") line.
Has anybody ideas? Thank you.
I have the problem with Automation. My Automation is COM object (DLL file). I use NAV2009 with SQL database in Windows Server 2003.
When I started directly the codeunit and create Automation in NAV Classic Client, it's work.
When started the codeunit by NAS, it's fail. I didn't get any error, but I saw that the scheduler task was still running and never stopped.
I tested with the same windows user, so the rights are the same.
My extact of code is:
CLEAR("Export Class");
IF ISCLEAR("Export Class") THEN BEGIN
CREATE("Export Class");
I saw that the NAS was hanged by the CREATE("Export Class") line.
Has anybody ideas? Thank you.
0
Comments
-
Im guessing it is a Three tier setup?
If so you might want to specify where you are going to run the automation. (Client or Server)
[Ok :=] CREATE(Automation [,NewServer] [,OnClient])
For your example you might want to try
CREATE([automation], TRUE, TRUE)
This will create the automation on the client computer0 -
I am using NAV 2009 R2 Classic, not Microsoft Dynamics NAV 2009 RTC.
There are two tiers: only NAV client and SQL server.
I tryed CREATE([automation], TRUE, TRUE), but situation is the same.0 -
Some automations cannot run under NAS, mainly if they are using visual components.
NAS is hanging when you are using automation in the process too often. There is memory leak with each CREATE. If you can, use single instance codeunit to create the automation and reuse it each time during the NAS process...0 -
When I used the NAV 4.03 version, the functionality works without error.
So, maybe somebody has some ideas?0 -
I solved the problem. I set in registers my dll threading model value from empty to apartment.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