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

  • edited November 2023
    .NET 4 doesn't allow loading of DLLs from remote network locations by default. You can enable it, but it has to be done on each machine. To do so, you go to a machine's 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config' folder (or wherever .NET is installed on that machine) and open the machine.config file. There should be a XML node somewhere in that document. You have to add the following XML into that node.

    <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.
  • I tried adding that line into the machine.config file, restarted my system, still experiencing same issue. Going to keep troubleshooting and get back to you.

    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!
  • I should have pointed you to caspol.exe initially, as this is how you'd automate this process. Perhaps it does the same thing and will not fix the issue, but it's worth trying. It looks like you can do something like:

    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.
  • Kevin,

    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!
  • Ugh, I always forget to check that. Good catch.
Sign In or Register to comment.