Service-Tier automation failure

xo
Member Posts: 34
I've built an automation which behaves differently when run on the classic client compared to when run on the service-tier.
This behavior was of course discovered when we moved this automation to run on the service-tier.
The first issue was that the whole RTC client crashed. The event log on the service-tier and google searches revealed that this was caused by some reflection code which does not do proper overload resolution. After changing the automation and recompiling this now appears to work (no more overloads).
The second problem, which we still have, is that the automation (which is a .NET COM-interop assembly) cannot find a certificate in the certificate store. It has no problem finding this certificate when run on the classic client (on the service-tier machine) but it cannot find the same certificate using the same code when run thru the service-tier. The code uses standard .NET crypto API's*. This is quite perplexing to and hard to debug.
Since this automation is a .NET assembly you may want to suggest we just call it as a .NET assembly but this will not do because then we loose the ability to run the code in the classic client where it must be run as a scheduled job as well. Besides this we already tried to do that just as a temporary workaround and found out that this gave another permissions error.
Any pointers as to what could be the issue here? Security priviledges of the service-tier?
](*,)
Thanks in advance.

* System.Security.Cryptography.x509
This behavior was of course discovered when we moved this automation to run on the service-tier.
The first issue was that the whole RTC client crashed. The event log on the service-tier and google searches revealed that this was caused by some reflection code which does not do proper overload resolution. After changing the automation and recompiling this now appears to work (no more overloads).
The second problem, which we still have, is that the automation (which is a .NET COM-interop assembly) cannot find a certificate in the certificate store. It has no problem finding this certificate when run on the classic client (on the service-tier machine) but it cannot find the same certificate using the same code when run thru the service-tier. The code uses standard .NET crypto API's*. This is quite perplexing to and hard to debug.
Since this automation is a .NET assembly you may want to suggest we just call it as a .NET assembly but this will not do because then we loose the ability to run the code in the classic client where it must be run as a scheduled job as well. Besides this we already tried to do that just as a temporary workaround and found out that this gave another permissions error.
Any pointers as to what could be the issue here? Security priviledges of the service-tier?
](*,)
Thanks in advance.

* System.Security.Cryptography.x509
0
Comments
-
Depends on where the certificate is stored. If in computer store or in user store...0
-
Thanks kine. Moving the certificate to a different store location solved that issue. Now the next issue is an error when trying to access the private key (it appears): "Keyset does not exist", an exception originating from System.Security.Cryptography.Pkcs.PkcsUtils.CreateSignerEncodeInfo(CmsSigner signer, Boolean silent). I guess because the service-tier service is running as a user without the necessary permissions. Will check if we can run it as a different user and change the permissions - unless you have a better idea.0
-
Have you tried this? http://msdn.microsoft.com/en-us/library/aa702621.aspx
There is how to find the key and set permissions...0 -
Hi Kine. Yes, I tried that but it didn't change anything - tried with several SID's. It could be I did something wrong there of course. For the time being I've created a workaround so we don't have to use the service-tier for calling this automation... for now.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