User Profile

Collapse

Profile Sidebar

Collapse
jallred
jallred
Last Activity: Mar 3 '08, 07:56 PM
Joined: Feb 18 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • jallred
    replied to How To Use A Database In Your Program
    in .NET
    If you're using .NET 3.5, consider using LINQ (Language Integrated Query).

    Assume that you have a customer database. The following query would select the customers in Oregon:

    Customer[] Customers = GetCustomers();
    var query =
    from c in Customers
    where c.State == "Oregon"
    select c;

    Quick and easy!
    John
    See more | Go to post

    Leave a comment:


  • jallred
    replied to Socket Server Problem
    in .NET
    If you have access to the proxy, forward the appropriate port to your server.

    If you have access to your firewall, you can do one of two things: either forward the appropriate port to your server, or move your server into the DMZ.

    Have fun!
    John
    [link removed]
    See more | Go to post

    Leave a comment:


  • jallred
    replied to Finding Broken Link in WebSite
    in .NET
    Spot on. For each url, use the code at http://msdn2.microsoft .com/en-us/library/system.net.http webrequest.getr esponse.aspx, check the status code of the response. 200 is OK, while 404 is the typical broken link. Other status codes will require some judgement.

    John
    http://blogs.msdn.com/usisvde/...
    See more | Go to post

    Leave a comment:


  • jallred
    replied to HttpWebRequest reuse problems
    in .NET
    See the code at http://www.thescripts. com/forum/showthread.php? p=3075511#post3 075511 for a more typical use of HttpWebRequest.

    John
    http://blogs.msdn.com/usisvde/...
    See more | Go to post

    Leave a comment:


  • Unfortunately, you really can't do that -- there is a bunch of state internal to a socket, so you can't just copy the 5-tuple information (type of stream, source ip and port, destination ip and port) to another socket and have it work.

    Since your API is already handling the socket, perhaps you should use a stream (System.IO.Stre am) to handle the in and out byte streams.

    John
    http://blogs.msdn.com/usisvde/...
    See more | Go to post

    Leave a comment:


  • jallred
    replied to Routers ip address
    in .NET
    Your question is a bit unclear. If you want the router of the destination -- that is, the last routable ip address at the destination, look at the destination ip.

    For the router on your end, do a traceroute and find the first routable ip address (that is, one that doesn't start with 192.168, 10., or 172.16). Or, roll your own traceroute by setting TTL to 1, then, 2, and so on.

    John
    http://blogs.msdn.com/usis...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...