Could not load type '' (blank) when ref .NET assembly
Charleh
Member Posts: 44
I've created an assembly that I want to be able to call from C/SIDE in the Role-Tailored Client in Dynamics NAV2013.
I've got this all working locally but when trying to deploy to the server I can't compile the codeunit that references the .NET assembly
I have a variable of type DotNet but when trying to choose a subtype I get this error:
Could not load type '' <-- nothing between the single quotes!
I've followed all steps in the MSDN guide (save exporting the types I want to use) I've got this working locally. I can actually get it running by installing the assembly into the GAC, but I don't want to have to do this when it should work otherwise
(the add in is also registered in the Client Add-in table and is strong-named with the correct public key token in the table)
These are the things I've tried:
* Building for .NET 4.5, 4 and 3.5 all of which worked locally but not on server
* Dropping the dll in the client and service add-ins folder
* Dropping the dll into windows/system32 folders
* Running everything as administrator (dev environment, service etc etc - I'm logged on as a domain administrator)
* Ripping clumps of my own hair out
All the assembly does is calls out to some webservices and a couple of other things, I just can't work out why I can't get it to work
I suspect it's permission related since installing to GAC seems to make it happy
Any ideas?
Thanks in advance
I've got this all working locally but when trying to deploy to the server I can't compile the codeunit that references the .NET assembly
I have a variable of type DotNet but when trying to choose a subtype I get this error:
Could not load type '' <-- nothing between the single quotes!
I've followed all steps in the MSDN guide (save exporting the types I want to use) I've got this working locally. I can actually get it running by installing the assembly into the GAC, but I don't want to have to do this when it should work otherwise
(the add in is also registered in the Client Add-in table and is strong-named with the correct public key token in the table)
These are the things I've tried:
* Building for .NET 4.5, 4 and 3.5 all of which worked locally but not on server
* Dropping the dll in the client and service add-ins folder
* Dropping the dll into windows/system32 folders
* Running everything as administrator (dev environment, service etc etc - I'm logged on as a domain administrator)
* Ripping clumps of my own hair out
All the assembly does is calls out to some webservices and a couple of other things, I just can't work out why I can't get it to work
I suspect it's permission related since installing to GAC seems to make it happy
Any ideas?
Thanks in advance
Charleh
0
Comments
-
depending on the environment ... sometimes DLL's get blocked when you copy files from here to there... ... security reasons... :whistle:
however... check your dll wheter it is blocked ... look at the pic in this blog..
http://zamboch.blogspot.ch/2011/02/jni4 ... lease.html
Another way to find out the problem:
Use the fusion log viewer... and see whats going on in the background...
http://www.hanselman.com/blog/BackToBas ... rrors.aspx
happy troubleshooting
0 -
Ah nice one, that has fixed it - I forgot about this feature as I've seen issues with assembly loading before and discovered this was the cause!
Easy to forget about all the security enhancements in newer versions of Windows Server
Thanks!Charleh0 -
you are welcome
One of those great windows security features ](*,)0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 328 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