When working in .NET, you may encounter these two errors: System.IO.FileNotFoundException and System.Security.SecurityException. Read this topic to learn why these errors occur and how to handle them.
When you run a VBVoiceapplication that was built in an earlier version of VBVoice.NET, you will get a System.IO.FileNotFoundException error. This occurs because the .NET Framework is looking for the version of the VBVoiceDotnetInterface.dll that the application was built with, but this library no longer exists.
You can package the old VBVoiceDotnetInterface.dll with the binary.
You can re-compile the project with the new VBVoiceDotnetInterface.dll.
To configure the Microsoft .NET Framework:
Start mscorcfg.msc or run Microsoft .NET Framework Configuration from the Control Panel Administrative Tools
Select Add Application to Configure in the right pane
Choose the application you would like to configure and click OK
Select Managed Configured Assemblies in the right pane
Select Configure an Assembly in the right pane
Select Choose an Assembly from the assembly cache
Click on Choose Assembly
Locate and select VBVoiceDotNetInteface.dll
Click on Finish
Select the Binding Policy tab from the VBVoiceDotNetInterface Properties
Enter the Requested Version and the New Version (for example, Requested Version = 5.1.88.0 and New Version = 5.1.102.0)
Click OK to restart Visual Studio
When you try to create a project on a UNC path, a System.Security.SecurityException error occurs when you then compile or run the .NET VBVoice application over the LAN. This error occurs because a UNC path is not a trusted location for a project. Your project may not run correctly when you attempt to debug or run from this location.
To give a file share FullTrust permission:
Start mscorcfg.msc or run Microsoft .NET Framework Configuration from the Control Panel Administrative Tools
Expand the Runtime Security Policy node, the Machine node, the Code Groups node, the All_Code node, and then highlight the LocalIntranet_Zone node
Select Add a Child Code Group in the right pane
Choose Create a New Codegroup
Enter a name for the code group and then click Next
Choose a Condition Type of URL
Enter the UNC path to the share location of your project, using the format file///\\servername\sharename\* where \\servername\sharename is the name of the share
Note: Make sure to add the asterisk (*) to the end of the path
Click Next
Choose Use Existing Permission Set of FullTrust
Click Next
Click Finish
Restart Visual Studio