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
T

Tom Paluzzi

@Tom Paluzzi
About
Posts
9
Topics
6
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • deserialize to C# class from external config file?
    T Tom Paluzzi

    I'm using System.Configuration in .NET 2.0 to load in values from an externally specified config file and deserialize them into a C# class. During deserialization, I'm getting an exception thrown by .NET It's having a problem with the element seen below. I've tried different things, but still I can't get the deserialize to succeed. Here's the problem in detail below. Can anybody tell me what I'm doing wrong? Shouldn't [xmlArray] work? Thx, Tom The app.config file looks like this:

    DataAccess.config looks like this: The C# class looks like this: using System; using System.Xml.Serialization; using System.Configuration; namespace Framework.Data { /// /// Represents the root of all data access configuration information. /// public class DataAccessConfig : ConfigurationSection { #region Constructor(s) /// /// Initializes a new instance of the class. /// public DataAccessConfig() { _sectionName = _defaultSectionName; } #endregion #region Config Manager private const string _defaultSectionName = "dataAccessSection"; private string _sectionName; #region Connection Config private ConnectionConfigCollection _connections = new ConnectionConfigCollection(); /// /// Gets or sets the collection of connection configuration items associated with this application. /// /// The collection of connection configuration items associated with this application. [XmlArray("connections")] [XmlArrayItem("c

    C# csharp xml json help question

  • Network Email Sniffer in C#?
    T Tom Paluzzi

    Hello... I'm in the process of writing a network analyzer in C# for an IT project. One of the project requirements is for the analyzer to report some metadata concerning Exchange-based emails that go out to the internet. Currently, I've got a simple listening socket (RAW socket) that is intercepting the network packets. The questions are: 1) Where in the IP packet (Ehternet, IP, or TCP header) can I inspect to determine that it's an Exchange-related packet and needs to be process (inspected) further. I'm pretty sure the IP packet would be of type TCP, but 2) Where in that series of bytes does it specify Exchange, the to:/from:/subject:/ etc. Is it the TCP header, IP?? 3) Is the a doable thing? I'm assuming that Exchange is using SMTP for sending the email(s). Any info would be extremely helpful... Thx, T

    C# csharp sysadmin business question

  • Workaround for Raw sockets in Windows XP SP2?
    T Tom Paluzzi

    I'm writing a network sniffer in C# on Windows XP SP2 using VS 2005 and .NET 2.0, and apparently with SP2 Microsoft has disabled the ability to create Raw Sockets. Does anybody know if there is a workaround so that Raw Sockets will work? Other than going to a different OS? Thx, Tom

    .NET (Core and Framework) csharp visual-studio sysadmin question

  • Socket.IOControl() error # 10022 in Visual Studio 2005?
    T Tom Paluzzi

    Dave, If I'm following the links you are talking about correctly, one of them mentions turning on ICF if running SP1, and the other mentions if u want to use raw sockets without restriction, use Windows 2003 Server. In both cases it seems as if the issue is with sending data on Raw sockets. In my example, i'm actually trying to receive data on raw sockets. So, given that, it seems like it should work. This error is preventing me from proceeding. Any other thoughts on how to solve this? Also, Thanks again for your help to this point. Tom

    .NET (Core and Framework) csharp visual-studio help dotnet question

  • Socket.IOControl() error # 10022 in Visual Studio 2005?
    T Tom Paluzzi

    Yes, Windows XP SP2 and under an Admin privileged account. Does that mean it can't be done?

    .NET (Core and Framework) csharp visual-studio help dotnet question

  • Socket.IOControl() error # 10022 in Visual Studio 2005?
    T Tom Paluzzi

    Dave, I knew that the error means Invalid Argument, but looking at the docs for WSAIoCtl, the values I'm passing in all seem valid. Socket.RcvAll is a constant in .NET, and the other two are optional values. Every other code snippet i've seen has similar values for IoControl(). Any other thoughts? Thx, Tom

    .NET (Core and Framework) csharp visual-studio help dotnet question

  • Socket.IOControl() error # 10022 in Visual Studio 2005?
    T Tom Paluzzi

    The following is code written in C# using .NET Framework 2.0 and VS 2005. I'm getting an exception, error #10022, when I call IOControl(). I tried different values for the parameters to IOControl(), and still get the same error. Can anybody help clear this up as to why I'm getting this error? Thx, T socket.SetSocketOption(SocketOptionLevel.IP,SocketOptionName.HeaderIncluded,1); byte []IN = new byte[4]{1, 0, 0, 0}; byte []OUT = new byte[4]; int SIO_RCVALL = unchecked((int)0x98000001); int ret_code = socket.IOControl(IOControlCode.ReceiveAll, IN, OUT); ret_code = OUT[0] + OUT[1] + OUT[2] + OUT[3]; if(ret_code != 0) ret_val = false;

    .NET (Core and Framework) csharp visual-studio help dotnet question

  • System.Net.Sockets for reading IP packets?
    T Tom Paluzzi

    I'm writing an application in C# that needs to sniff all IP packets coming into a certain server. I've tried to create a socket, bind, listening for connections, but I'm getting an exception when i try to listen on the created socket. It says "the operation is not supported on the type of object". I tried changing how I defined the IPEndPoint, and the SocketType and ProtocolType enumerations when creating the socket. Does anybody know the correct setup of the socket in order to inspect IP packets? Not at the TCP layer, but lower in OSI model. Is Here's the code. Thx, Tom try { // Build local end point IPAddress localAddr = IPAddress.Parse(Constants.LOCALHOST); IPEndPoint endpoint = new IPEndPoint(localAddr, Constants.PORT); // create new IP socket. server = new Socket(AddressFamily.InterNetwork,SocketType.Raw,ProtocolType.IP); // SetupSocket(server); // Bind the socket to the local IP addr and port server.Bind(endpoint); // Start listening for connections, allowing for max # to be queued. server.Listen(Constants.MAX_CONNECTION_QUEUE); // loop until the service is stopped. while (ServiceStarted) { // Wait asynchronously for connections to be accepted. server.BeginAccept(new AsyncCallback(this.AcceptCallback), server); // yield if (ServiceStarted) { Thread.Sleep(new TimeSpan(0, 0, 5)); } . . . } } catch(SocketException e) { throw e; }

    .NET (Core and Framework) csharp sysadmin question workspace

  • What is the best way to process Ethernet frames in real-time C#?
    T Tom Paluzzi

    Hi... I'm writing a Windows Service in C# that when started opens a socket (Listening Port) that reads ethernet frames, inspects the payload, and logs to a DB certain data within the payload. Obviously I want the frames to be processed at a speed that doesnt' cause any lost packets. So, do I create a thread for each received frame, to keep the main thread from being blocked? Do I use a thread pool manager? What's the best design for processing the frames in real-time or close to real-time as possible? Any suggestions/code snippets would be greatly appreciated. Thanks, Tom thomas.paluzzi@havensolutionsgroup.com

    C# question csharp database com design
  • Login

  • Don't have an account? Register

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