- Posted by miketeye on August 22, 2008
Share on Facebook
I had a desktop application developed in asp.net 2003 which deployed some crystal reports with the built in Crytal Reports .Net edition.
I have always wanted to deploy the application for network use, to make it easier to roll-out maintenance and upgrades to the core program. I have however always had difficulty in doing so because of Crystal Descisions keycodeV2.dll file which by default is at the location C:\Program Files\Common Files\Crystal Decisions\1.0\Bin.
If I then run the program from a server network share, the program launches on the workstation alright, but anytime, I access any of the embedded crystal reports, the program brings up an error that it "cannot find keycodev2.dll or invalid keycode". I therefore had to put up with creating a setup project after every update and uninstalling and re-installing the program on all client workstations after evry modification to the program.
Today I found a way out. How?, well it turns out, it is possible to place a copy of the valid keycodev2.dll from the directory above into the same share location from which you launch the program. Is that the fix?, no not yet, in addition to that, you need to launch the .Net framework configuration tool from control panel\Administration tools\Microsoft.Net framework 1.1 Configuration and perform the following step:
1. click Configure code access security policy
2. click Increase Assembly Trust
3. Choose Make Changes to this computer or Make changes for the current user only depending on your needs
4.Click Next
5. Click Browse and select the .dll or .exe file for your program and click Next
6. Drag the slider to Full if you TRUST your program
7. Click Next and then Click Finish
If all went well, you should be able to create a shortcut to the .Net program fom the Network share and run the program without any permission errors and also have Crystal reports use the keycodev2.dll file from the share location.
HTH.