Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
U

User 12626416

@User 12626416
About
Posts
3
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to Transfer xml file from remote server to another
    U User 12626416

    private void FileSave() { SqlConnection con = new SqlConnection(connstr); SqlCommand cmd = new SqlCommand("Sp_Rep", con); cmd.CommandType = CommandType.Text; con.Open(); string val = cmd.ExecuteScalar().ToString(); XmlDocument xmldoc = new XmlDocument(); xmldoc.LoadXml(val); xmldoc.Save("C://Shankar//Shankar.xml"); FromLocal(); ToRemote(); con.Close(); } public void FromLocal() { try { //string hostName = Dns.GetHostName(); // Retrive the Name of HOST // Get the IP //string myIP = Dns.GetHostByName(hostName).AddressList[0].ToString(); Console.WriteLine("That program can transfer small file. I've test up to 850kb file"); Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP); // m_socWorker = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP); //String szIPSelected = "172.31.1.111"; //String szPort = "80"; String szIPSelected = "10.2.2.28"; String szPort = "580"; int alPort = System.Convert.ToInt16(szPort, 10); System.Net.IPAddress remoteIPAddress = System.Net.IPAddress.Parse(szIPSelected); System.Net.IPEndPoint ipEnd = new System.Net.IPEndPoint(remoteIPAddress, alPort); sock.Connect(ipEnd); //IPEndPoint ipEnd = new IPEndPoint(IPAddress.Any); // Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP); ///Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP); // sock.Bind(ipEnd); sock.Listen(100000); //clientSock is the socket object of client, so we can use it now to transfer data to client if(ipEnd != null) { Socket clientSock = sock.Accept(); string fileName = "Shankar.xml"; string filePath = "C://Shankar//Shankar.xml";//Your File Path; byte[] fileNameByte = Encoding.ASCII.GetBytes(fileName); byte[] fileData = System.IO.File.ReadAllBytes(filePath + fileName); byte[] clientData = new byte[4 + fileNameByte.Leng

    C# sysadmin help xml tutorial

  • How to Transfer xml file from remote server to another
    U User 12626416

    Yes thats the problem how to connect remote system using ip address using coding

    C# sysadmin help xml tutorial

  • How to Transfer xml file from remote server to another
    U User 12626416

    I have some problem for- transfer xml file from one server to another using ip address ,same network is working fine,but different network is not working,cant able to connect,anybody can help me to solve this

    C# sysadmin help xml tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups