Exemplo n.º 1
0
        public static void LoadLocal()
        {
            string policy = LocalPolicy;

            _server = new SocketPolicyServer(policy);
            int result = _server.Start();
        }
Exemplo n.º 2
0
        public static void LoadPort(int port)
        {
            string policy = string.Format(
                @"<?xml version='1.0'?>
              <cross-domain-policy>
	              <allow-access-from domain=""*"" to-ports=""{0}"" />
              </cross-domain-policy>", port);

            _server = new SocketPolicyServer(policy);
            int result = _server.Start();
        }
Exemplo n.º 3
0
        public static void LoadFile(string filename)
        {
            string policy = string.Empty;

            if (!File.Exists(filename))
            {
                Logger.LogError("Could not find policy file '{0}'.", filename);;
                return;
            }
            using (StreamReader sr = new StreamReader(filename))
            {
                policy = sr.ReadToEnd();
            }
            _server = new SocketPolicyServer(policy);
            int result = _server.Start();
        }
Exemplo n.º 4
0
 public static void LoadFile(string filename)
 {
     string policy = string.Empty;
     if (!File.Exists(filename))
     {
         Logger.LogError("Could not find policy file '{0}'.", filename);;
         return;
     }
     using (StreamReader sr = new StreamReader(filename))
     {
         policy = sr.ReadToEnd();
     }
     _server = new SocketPolicyServer(policy);
     int result = _server.Start();
 }
Exemplo n.º 5
0
 public static void LoadAll()
 {
     string policy = AllPolicy;
     _server = new SocketPolicyServer(policy);
     int result = _server.Start();
 }
Exemplo n.º 6
0
 public static void LoadPort(int port)
 {
     string policy = string.Format(
     @"<?xml version='1.0'?>
       <cross-domain-policy>
           <allow-access-from domain=""*"" to-ports=""{0}"" />
       </cross-domain-policy>", port);
     _server = new SocketPolicyServer(policy);
     int result = _server.Start();
 }