Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
RevDotNet Error when sending email
I keep getting this error whenever I try sending an email. The SRPMail.dll file is already loaded into the right path. The SRP Mail Utility version I have is 3.0.3.3. Any ideas?
Comments
<loadFromRemoteSources enabled="true"/>
I'd imagine that the machine would need to be restarted for the change to take effect. I'd also wager that this is only necessary if you are running OI from a UNC path. I'm guessing that if each machine were accessing OI via a drive letter path, e.g., W:\Revsoft\OI, then it wouldn't be a problem either. I'm not an IT expert, though, just a code monkey, so take this suggestion with a grain of salt.
I know it's annoying, but this is the world we live in now. Remote execution is a major security issue and is getting locked down more and more.
The SRP Mail function works just fine in my development environment that's on a different network/subnet address and OI is being run from a UNC path in that environment which worked fine. Going to compare both environments and see why this is failing in my production environment.
I did try running it from an account that has access to OI using a drive letter 'O:\oi9\oinsight.exe' in production and still experienced the same issue.
I'll get back to you shortly if I make any progress.
Thank you!
caspol.exe -addfulltrust srpmail.dll
Of course, you'll have to run this from the directory containing caspol.exe and probably run in admin mode.
Issue has been resolved. I tried running the caspol.exe tool and that didn't fix the problem. I ended up reverting back the machine.config file back to its original version. After some research, I found out that the some dlls need to be unblocked within its properties if it came in from a different system, in this case it was SRPMAIL.dll. After checking the unblock button and restarting my system, I was able to successfully send an email. Screenshot is below.
Thank you!
Solution 1
Make sure that OpenInsight doesn't receive an 'Open File - Security Warning' message when launching the process. This is a Windows message that sometimes appears when you launch a program from a network location that Windows doesn't trust. If your OpenInsight session shows this message, please resolve the warning message because it can impact the loading of SRPMail.dll. Directions for adding a trusted network location.Solution 1a - Things To Verify
Verify srpmail.dll resides in the OpenInsight directory and the path to run OpenInsight is a trusted network location. For instance, don't set a network location path in the list of trusted network locations and then launch OpenInsight from a UNC or IP address.Solution 2 - Use With Caution
Adding a configuration entry to `C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.conf` (or wherever your current 32-bit 4.0 Framework config is located) will also resolve the issue. However, this impacts everything on the computer, so this should only be done as a troubleshooting step. To make the change, open the file and look for `' . If you find the tag replace it with:<runtime> <loadFromRemoteSources enabled="true"/> </runtime>
Otherwise, if the tag already exists, simply add add
<loadFromRemoteSources enabled="true"/>
.The changes appear to take effect the next time OpenInsight is launched - no reboot is required.
Comments on Caspol.exe
Internal testing of the command `caspol.exe -addfulltrust srpmail.dll` didn't prove to resolve the issue. While this may be useful in some situations it generally isn't required and the solution to use caspol.exe would require srpmail.dll to have a strong name signature.