I shouldn't have to cram all my work into form files. I just want to be able to put a solution and executable on the share drive and run it without an absurd amount of nonsense about security. If I store the files on my (not backed up) C:, then it will run wonderfully, until I put it on the share drive for everyone to use, and I'm back to my same problem. It gives "partially trusted caller" errors for accessing a module, even when "allowpartiallytrustedcallers" is set in the assembly. If I store my solutions on the backed up network drive, then it won't run a single thing ever. I have a copy of VB 2008 (recently upgraded from VB6). How about we rephrase this into a question that everyone can answer? I have the exact same problem as the initial poster. WARNING: If you enable this feature and start a Console that has a current directory of an UNC name, start applications from that Console, and then close the Console, it could cause problems in the applications started from that Console. Use this tool at your own risk.Īdd the value DisableUNCCheck REG_DWORD and set the value to 0 x 1 (Hex). Microsoft cannot guarantee that any problems resulting from the use of Registry Editor can be solved. WARNING: Using Registry Editor incorrectly can cause serious, system-wide problems that may require you to reinstall Windows NT to correct them. Here's what I did Made a registry entry to be able to use a UNC path as the current directory. All of the other answers on this relate to older software, so I am adding this answer to update this frequently found question with the solution that worked for me. Although I could open the solution, I could not compile. I understand this is an older thread, but this was the best thread I found when looking to solve a similar issue I had visual studio 2013 on a virtual box (using Win 8.1) and the code on the host machine (Win 7). I wanted to put this up because I spent half a day trying to figure this out and figured it might save someone else some time. My solution is to go the the Debug Output Location in the Project Properties, click browse and go to my previously made output location on my network drive and Voila!!! There are plenty of ways to do this but VS will magically be able to recognize mapped drive letters. My project is local but my output was intended to be thrown up on the network.Īnyways, the problem is probably about the administrator context but one way to fix it which I found while digging around online is to get Visual Studio to browse to the drive in question some how. I couldn't read/write files in code, output my executables or anything. Then, I shut down and the next day nothing works. I set up my project and began working on it and had no issues. Visual Studio wouldn't recognize a network location I had mapped for a drive letter for anything. NET Framework, simply call CasPol for each version using the full path as below:Ĭ:\Windows\Microsoft.NET\Framework\v7\CasPol -m -ag 1 -url file://YourSharePath* FullTrustĬ:\Windows\Microsoft.NET\Framework\v9\CasPol -m -ag 1 -url file://YourSharePath* FullTrust To trust a network share for all versions of the. Just a note, I have also personally had more success with using 1 as a code group instead of 1.2. NET Framework 2.0/3.0/3.5, it will require setting CasPol for those versions as well. The reason is that, unless you are carefully paying attention, the Visual Studio Command Prompt defaults to adding the. If you are used to using the Visual Studio Command Prompt to quickly get to CasPol, you may find that some of your projects will not seem to respect your new FullTrust settings. However, when moving from Visual Studio 2008 (.NET Framework 2.0/3.0/3.5) over to Visual Studio 2010 (.NET Framework 4.0), you may find yourself scratching your head. If you are like me and you store all your code on a server, you will have likely learned about trusting a network share using CasPol.exe. Trusting Network Shares with Visual Studio 2010 /. In the interests of actually answering the question, I copied this comment from :
0 Comments
Leave a Reply. |