tutorials.de Buch-Aktion 05/2012
ERLEDIGT
NEIN
ANTWORTEN
1
ZUGRIFFE
591
EMPFEHLEN
  • An Twitter übertragen
  • An Facebook übertragen
AUF DIESES THEMA
ANTWORTEN
  1. #1
    Badgott Badgott ist offline Mitglied Gold
    Registriert seit
    Feb 2002
    Beiträge
    111
    Hi ich habe hier ein Programm was bei mir auf meinem PC super läuft doch sobald ich es auf einem anderen PC starte wo kein .NET drauf ist will er von mir eine dll haben. kann mir da vieleicht jemand helfen vieleicht mache ich auch beim exe erstellen etwas falsch werden dort dlls mitgelifert wenn ich das Programm erstelle?

    Code:
    PHP-Code:
    TcpClient tcpClient = new TcpClient();
        try{
            
    tcpClient.Connect("www.contoso.com"11000);
            
    NetworkStream networkStream tcpClient.GetStream();

            if(
    networkStream.CanWrite && networkStream.CanRead){

                
    // Does a simple write.
                
    Byte[] sendBytes Encoding.ASCII.GetBytes("Is anybody there");
                
    networkStream.Write(sendBytes0sendBytes.Length);
          
                
    // Reads the NetworkStream into a byte buffer.
                
    byte[] bytes = new byte[tcpClient.ReceiveBufferSize];
                
    networkStream.Read(bytes0, (int) tcpClient.ReceiveBufferSize);
      
               
    // Returns the data received from the host to the console.
               
    string returndata Encoding.ASCII.GetString(bytes);
               
    Console.WriteLine("This is what the host returned to you: " returndata);

              }
              else if (!
    networkStream.CanRead){
                  
    Console.WriteLine("You can not write data to this stream");
                  
    tcpClient.Close();
              }
              else if (!
    networkStream.CanWrite){             
                  
    Console.WriteLine("You can not read data from this stream");
                  
    tcpClient.Close();
              }
           }
           catch (
    Exception e ) {
                      
    Console.WriteLine(e.ToString());
           } 
    MFG Badgott
     

  2. #2
    krypta krypta ist offline Mitglied Gold
    Registriert seit
    Nov 2000
    Ort
    at
    Beiträge
    104
    gibst ja eh schon die fehlerquelle selbst an ~>
    [...]

    ... auf einem anderen PC starte wo kein .NET...

    [...]
    redist (also die runtime) installieren und es laeuft ~> http://msdn.microsoft.com/downloads/...mpositedoc.xml (ausser es gibt noch andere probz ...)