2
Answers

Running a C# app across the network

vaden.cobb

vaden.cobb

21y
2.1k
1
Have a small problem. When I run this code on my PC, it works. If I place it out on a network share and run it from my PC, I get Security errors. I guess what the code is doing is trying to grab the environmental data on the PC with the network share. How can I change the focus, so that I can execute the application from a network share? using System; using System.IO; using System.Management; public class NetTest { public static void Main() { string pcName = "", userId = ""; pcName = Environment.MachineName; userId = Environment.UserName; Console.WriteLine("Computer Name : " + pcName); Console.WriteLine("User ID : " + userId); } }
Answers (2)