.NET

Reply
*Expert Elite*
chiefbraincloud
Posts: 752
Registered: ‎02-13-2008
Message 21 of 27 (275 Views)

Re: dll on the network, will that be a problem?

05-01-2012 04:53 PM in reply to: junoj

FYI, while TJK77 did not mention it, he must, and you will still have to use CASPOL to set the Code Access Security Policy Permissions to allow your .dll to be run from a network.  It is not optional under any circumstance prior to the .NET 4.

 

The only way to avoid it is to have your .dll installed on each machine.

 

And the way TJK77 suggested, requires either that you redo the CAS policy every time you update, or that you apply the policy to the folder, instead of the file.  I have a Network security specialist here that would string me up if I did that, because that would mean anything placed in that directory would be allowed to execute (not just things loaded into AutoCAD).

 

And it would mean you can't do demand loading, or you have to change the registry entry that specifies the file every time you update.

Dave O.                                                                  Sig-Logos32.png
Contributor
TJK77
Posts: 14
Registered: ‎03-22-2012
Message 22 of 27 (265 Views)

Re: dll on the network, will that be a problem?

05-02-2012 05:04 AM in reply to: chiefbraincloud

Sorry, I forgot to mention all users running AutoCAD 2012, my dll is compiled using .NET 4.

Mentor
Rob.O
Posts: 259
Registered: ‎06-25-2007
Message 23 of 27 (256 Views)

Re: dll on the network, will that be a problem?

05-02-2012 07:35 AM in reply to: chiefbraincloud

Since we are sharing deployment secrets, I will share mine as well.  Not sure if anyone will like it, but it works well for us.

 

To avoid the networked .DLL fiasco, I load all of our applications from the users local machine using the Autoloader utility (AutoCAD 2012 and up).  

 

I store all of the .DLLs on our server in a secure location.  I have a login script that deletes all of the folders in the ApplicationPlugins folder on each local machine and then re-copies the folder structure and its contents from the server back to the ApplicationPlugins folder of the local machine.  Everything in that folder is autoloaded when AutoCAD starts up depending on parameters in each specific Autoloader .XML file.

 

So if I need to make a change, I re-build, put the file on the server.  The next time the users log into their machine, the script runs and updates the contents of the ApplicationPlugins folder.  AutoCAD is started and all of the required apps are loaded!

 

On a very rare occasion a user will get an "unknown command" on one of the tools (as if something was not copied over properly), so I simply have them run the script manually, or have them log off and back on again!  If they just run the script manually, they don't even need to close AutoCAD as it will autoload and new files dumped into the ApplicationPlugins folder!

 

Works great!  The really nice thing is that I can do this with CUI menus as well!

 

Like I said, not sure if anyone will like it, but it works well for us!

 

*Expert Elite*
dgorsman
Posts: 5,134
Registered: ‎10-12-2006
Message 24 of 27 (249 Views)

Re: dll on the network, will that be a problem?

05-02-2012 07:47 AM in reply to: Rob.O

The new autoloader system is definitely on my list of evaluations for our next major version upgrade.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
Adopt. Adapt. Overcome. Or be overcome.
A good question will be halfway to a good answer.


*Expert Elite*
dgorsman
Posts: 5,134
Registered: ‎10-12-2006
Message 25 of 27 (250 Views)

Re: dll on the network, will that be a problem?

05-02-2012 07:50 AM in reply to: chiefbraincloud

Always nice to have a boss like that :smileyhappy:  Mine isn't a fool by any means, but he readily admits he has no idea of the how or why of most of what I do, so I can operate with very little oversight as long as the clients and users are happy.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
Adopt. Adapt. Overcome. Or be overcome.
A good question will be halfway to a good answer.


Distinguished Contributor
junoj
Posts: 116
Registered: ‎02-26-2009
Message 26 of 27 (248 Views)

Re: dll on the network, will that be a problem?

05-02-2012 08:00 AM in reply to: Rob.O

Hi Dull_Blades, the way you have it set up is similar to the way I currently have my VBA set up. The only difference is that when the user starts the AutoCad it checks the network to see if an update is available. If an update is available then it does the copy.  I was planning to eventually do the same with dll files but because I will have a lot of updates initially I was hoping I could just have the stuff on the network until all bugs are resolved. The way things are turning to be I may end up doing the same thing with dll as I have done with VBA.

 

Also, fyi, I have a Uploader code that copy the stuff from the network, if I get error during copy all the user has to do is to restart autocad again and it will do the copy again until it done correctly. This way the user never has to load anything manually. Below is the process:

 

AutoCAD starts à a loaded code checks if a new ‘Loader.dvb’ is available à if Yes it then copies the ‘Loader.dvb’ from network and starts it à The ‘Loader’ then checks to see if an update is available à if Yes it then copies all the dvbs from network.

 

This approach gives me the flexibility to change the ‘Loader.dvb’ at any time and automate every step of the update even menu and palettes replacement/update.

Distinguished Contributor
jmaeding
Posts: 956
Registered: ‎12-27-2006
Message 27 of 27 (239 Views)

Re: dll on the network, will that be a problem?

05-02-2012 09:20 AM in reply to: Rob.O

IMO, running things locally is the only way to go.

People always want to start with tools on network, then the boss says "Bob has to work off site", then you make some offline setup, then get tired of supporting two setups.

You soon realize a local setup has many advantages, like letting the user scew things up, and it gets set back on login.

Also, you can update server files like menu dll's, as the users do not have them in use.

We have used robocopy.exe for years to mirror server tools to local, super slick and free.

Be aware that there is a newer robocopy that handles daylight savings time when looking at file times.

Its size is 208kb, and its tricky to find. I can post if anyone needs it.

 

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community