RcBuilder@walla.com
call centre: 054-5614020

web config mail settings – smtp tag

Posted by: RcBuilder  /   Category: configuration / Mail / MailAddress / MailMessage / Network / smtp / SmtpClient / SOURCE CODE / System.Net.Mail   /   No Comments
17
Nov
2014

web config mail settings - smtp tag we can use the smtp built-in tag to define our outgoing mail server instead of using app keys configuration <system.net> <mailSettings> <smtp from="rcbuilder@gmail.com"> <network host="smtp.gmail.com" password="XXXXX" port="587" userName="somemail@domain.com"/> </smtp> </mailSettings> </system.net> using using System.Net.Mail; MailMessage myMessage = new MailMessage(); myMessage.To.Add(new MailAddress("somemail@domain.com", "ROBY")); myMessage.Subject = "HELLO ROBY"; myMessage.Body = "TEXT TEXT TEXT TEXT TEXT TEXT TEXT"; myMessage.IsBodyHtml = true; SmtpClient mySmtp = new SmtpClient(); mySmtp.EnableSsl =.

Read more

netstat – open ports

Posted by: RcBuilder  /   Category: DOS Commands / netstat / Network   /   No Comments
09
Nov
2014

netstat - open ports -- all open ports -- c:\netstat -- listening ports -- c:\netstat -an |find /i "listening" -- communicating ports -- c:\netstat -an |find /i "established" -- find open port -- c:\netstat -an |find /i "3389" -- find string -- c:\netstat -ano |findstr.

Read more

Http Status Codes

Posted by: RcBuilder  /   Category: Http Status Codes / JAVASCRIPT / Network / Request / SOURCE CODE / WebClient / WebRequest   /   No Comments
12
Oct
2014

Http Status Codes Continue = 100 SwitchingProtocols = 101 OK = 200 Created = 201 Accepted = 202 NonAuthoritativeInformation = 203 NoContent = 204 ResetContent = 205 PartialContent = 206 MultipleChoices = 300 Ambiguous = 300 MovedPermanently = 301 Moved = 301 Found = 302 Redirect = 302 SeeOther = 303 RedirectMethod = 303 NotModified = 304 UseProxy = 305 Unused = 306 RedirectKeepVerb = 307 TemporaryRedirect = 307 BadRequest = 400 Unauthorized = 401 PaymentRequired = 402 Forbidden = 403 NotFound.

Read more

DoTelnet c#

Posted by: RcBuilder  /   Category: Network / SOURCE CODE / TCP / Telnet   /   No Comments
30
Jul
2014

DoTelnet c# public static bool DoTelnet (string url,int port) { try { TcpClient tcpClient = new TcpClient(url, port); return true; } catch (Exception ex) { return.

Read more

WebRequest with Proxy

Posted by: RcBuilder  /   Category: Network / Proxy / SOURCE CODE / Stream / WebRequest   /   No Comments
07
Jul
2014

WebRequest with Proxy HttpWebRequest WebReq = (HttpWebRequest)WebRequest.Create(url); .... .... WebReq.Proxy = new WebProxy("119.233.255.24:843", true); .... .... HttpWebResponse WebResp = (HttpWebResponse)WebReq.GetResponse(); .... .... using (Stream response = WebResp.GetResponseStream()) using (StreamReader content = new StreamReader(response)) return.

Read more

Network Stream Using Socket Async

Posted by: RcBuilder  /   Category: Network / Socket / SOURCE CODE / Stream / TCP / Value Types   /   No Comments
17
Jun
2014

Network Stream Using Socket Async SERVER  public class Server { private Socket listener = null; private const int PORT = 6655; private bool isListening = false; private Encoding encoder = Encoding.UTF8; public void Start() { if (isListening) return; isListening = true; listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); listener.Bind(new IPEndPoint(IPAddress.Any, PORT)); listener.Listen(0); listener.BeginAccept(onSocketAccepted, null); } private void onSocketAccepted(IAsyncResult ar) // LOOP { using (var client = listener.EndAccept(ar)) HandleClient(client); listener.BeginAccept(onSocketAccepted, null); } private void HandleClient(Socket client) { var buffer_read = new byte; int.

Read more

Network Stream Using Socket

Posted by: RcBuilder  /   Category: Network / Socket / SOURCE CODE / Stream / TCP / Value Types   /   No Comments
17
Jun
2014

Network Stream Using Socket SERVER public class Server { private Socket listener = null; private const int PORT = 6655; private Encoding encoder = Encoding.UTF8; public void Start() { using (listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) { listener.Bind(new IPEndPoint(IPAddress.Any, PORT)); listener.Listen(100); // connection pool while (true) { using (var client = listener.Accept()) { var buffer_read = new byte; int bytes_read = client.Receive(buffer_read); string request = string.Empty; if (bytes_read > 0) { using (var ms = new MemoryStream()) { ms.Write(buffer_read,.

Read more

Network Stream Using TCP

Posted by: RcBuilder  /   Category: Network / Socket / SOURCE CODE / Stream / TCP / Value Types   /   No Comments
17
Jun
2014

Network Stream Using TCP SERVER public class Server { private TcpListener listener = null; private const int PORT = 6655; private Encoding encoder = Encoding.UTF8; public void Start() { listener = new TcpListener(IPAddress.Any, PORT); listener.Start(); while(true){ using (var client = listener.AcceptTcpClient()) { string request = string.Empty; using (var stream = client.GetStream()) { // read request from client using (var ms = new MemoryStream()) { byte; int bytes_read = 0; bytes_read = stream.Read(buffer_read, 0, buffer_read.Length); if (bytes_read.

Read more

HttpWebRequest with proxy

Posted by: RcBuilder  /   Category: Network / Regular Expressions / SOURCE CODE / Stream / WebRequest   /   No Comments
22
May
2014

using the HttpWebRequest to perform requests via proxy servers USING HttpStatusCode STATUS; string res = Helper.GET("http://noc.co.il/", string.Empty, "187.84.187.8:80", out STATUS); var ip = Regex.Match(res, @"<b>Your \s+ IP \s+ address \s+ is: \s+ (?<address>\d+\.\d+\.\d+\.\d+)</b>", RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace).Groups.Value.Trim() ------ public static string GET(string url, string vars, string Proxy, out HttpStatusCode STATUS) { try { STATUS = HttpStatusCode.OK; if (vars != string.Empty) { if (!vars.StartsWith("?")) vars = "?" + vars; url =.

Read more
12
  • פיתוח מערכות
  • פתרונות טכנולוגים
  • קידום אתרים
  • בניית אתרים