1

Getting that error message when trying to do an F5 on a WCF Service Library project that is stored on a network location.

I've added the following to both my app.config and the devenv.exe.config:

<configuration>
  <runtime>
    <loadFromRemoteSources enabled="true"/>
  </runtime>
</configuration>

Still doesn't help. None of the files are from an external site. The .dll it actually references is the same .dll file the Project creates when it builds ... so I'm at a loss for why it can't reference that same .dll at this time.

leppie
  • 115,091
  • 17
  • 196
  • 297
cavillac
  • 1,311
  • 12
  • 22
  • that little bit of code / example really doesn't tell anyone much..what does the code or the rest of the .config file look like in regards to the network location..? – MethodMan Mar 20 '13 at 20:11
  • This configuration should be done in your app's config file and not devenv's – Dhawalk Mar 20 '13 at 20:15
  • Dhawalk - I mentioned that I've put it in both .configs just as a precaution. DJ KRAZE, what do you need to see? The code, itself, sits on a remote location and when I build it successfully builds successfully to a remote location - It's only when I try to debug (F5) that I get the error mentioned. The file it references is the same file it builds - the code is really inconsequential at that point as the error is not a result of the code but rather VS2010 trying to enter Debug mode while referencing a remote .dll. – cavillac Mar 20 '13 at 20:30

2 Answers2

0

Load a dll from shared network drive in C#

See that answer. Looks like you need to add the location to the list of trusted locations on the machine you are using.

Community
  • 1
  • 1
JeremyK
  • 1,075
  • 1
  • 22
  • 45
0

I have had the same problem today.

The application trying to host your Wcf service is not devenv.exe, but WcfSvcHost.exe.

Its location is "C:\Program Files\Microsoft Visual Studio XX.0\Common7\IDE" (Replace XX with your Visual Studio version, of course).

You can simply add <loadFromRemoteSources enabled="true"/> in the runtime section of the WcfSvcHost.exe.config file and it should work.

Unfortunately this same error message can be related to other problems, but I guess this is exactly your instance as it was mine.

Stefano d'Antonio
  • 5,874
  • 3
  • 32
  • 45