Faldegast

I have a network drive where i have moved all my C# projects. The problem is when i run the projects i get a security warning and later a security exception. The only solution i found so far is to move the app to a locar drive and run it there. How do i fix that so the drive is treated like a local drive.

There are also an annoying popup when i start a native exe that i would prefer to remove.


Re: Visual C# General Problem witn C# app on network drive.

Karthikeya Pavan Kumar .B

Check this link Running app from network drive






Re: Visual C# General Problem witn C# app on network drive.

Faldegast

This doesnt solve the problem with building, running and debugging an application from the network drive. What i want is for every .net app on the network drive to run as if it was running from a local drive.




Re: Visual C# General Problem witn C# app on network drive.

Peter Ritchie

You'll have to run the .NET Framework 2.0 Configuration and explicitly grant rights the network path you want to not have LocalIntranet_Zone rights. You can do this by creating a new code group for a URL then use the network UNC where you want your files to be run/debugged from and assign it fulltrust.






Re: Visual C# General Problem witn C# app on network drive.

Faldegast

I tried changing the entire zone to full trust but that didnt work. Ill try this to.




Re: Visual C# General Problem witn C# app on network drive.

Faldegast

I found the solution to de .NET problem elsewere.
It is to run "
caspol -cg 1.2 FullTrus" from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

The quesition now is if thre is a way to find that path trough code. "v2.0.50727" seam to be something that may be a bad idea to hardcode as it will probably change in future versions of .NET. Perhaps looping trouth the framework directory and chech every subdir for caspol and run it is a better idea

The native exe problem is still unsolved, but that one is only an annoyment.




Re: Visual C# General Problem witn C# app on network drive.

OmegaMan

Faldegast wrote:
I found the solution to de .NET problem elsewere.
It is to run "
caspol -cg 1.2 FullTrus" from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

The quesition now is if thre is a way to find that path trough code. "v2.0.50727" seam to be something that may be a bad idea to hardcode as it will probably change in future versions of .NET. Perhaps looping trouth the framework directory and chech every subdir for caspol and run it is a better idea

The native exe problem is still unsolved, but that one is only an annoyment.



using System.Reflection;
...
Assembly cur = Assembly.GetExecutingAssembly();
Console.WriteLine(cur.ImageRuntimeVersion); // 2.0.50727


I have an article on my blog which might provide some new insights, entitled .Net Trust Tribal Knowledge.