NetSendAppender NetMessageBufferSend Method | Apache log4net™ SDK Documentation

Sends a buffer of information to a registered message alias.

Namespace: log4net.Appender
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    protected static int NetMessageBufferSend(
    	string serverName,
    	string msgName,
    	string fromName,
    	string buffer,
    	int bufferSize
    )

    Protected Shared Function NetMessageBufferSend (
    	serverName As String,
    	msgName As String,
    	fromName As String,
    	buffer As String,
    	bufferSize As Integer
    ) As Integer

    protected:
    static int NetMessageBufferSend(
    	String^ serverName,
    	String^ msgName,
    	String^ fromName,
    	String^ buffer,
    	int bufferSize
    )

    static member NetMessageBufferSend :
            serverName : string *
            msgName : string *
            fromName : string *
            buffer : string *
            bufferSize : int -> int

#### Parameters

serverName
  Type: System
  String
  The DNS or NetBIOS name of the server on which the function is to execute.
msgName
  Type: System
  String
  The message alias to which the message buffer should be sent
fromName
  Type: System
  String
  The originator of the message.
buffer
  Type: System
  String
  The message text.
bufferSize
  Type: System
  Int32
  The length, in bytes, of the message text.

#### Return Value

Type: Int32

If the function succeeds, the return value is zero.

Remarks

The following restrictions apply for sending network messages:

Platform | Requirements
--- | ---
Windows NT | No special group membership is required to send a network message. Admin, Accounts, Print, or Server Operator group membership is required to successfully send a network message on a remote server.
Windows 2000 or later | If you send a message on a domain controller that is running Active Directory, access is allowed or denied based on the access control list (ACL) for the securable object. The default ACL permits only Domain Admins and Account Operators to send a network message. On a member server or workstation, only Administrators and Server Operators can send a network message.

For more information see Security Requirements for the Network Management Functions.

See Also

#### Reference

NetSendAppender Class
log4net.Appender Namespace