I need to build monitoring into an existing .NET application. I will use SNMP to send the application's status to the Windows SNMP service. I have used a .NET library to create the SNMP SET request according to the MIB that I have been provided with, and with the correct community.
My code now sends multiple 'variables' in a SET request, for example:
Id: ".22.214.171.124.4.1.43607.1.1.1.1.1" (ObjectIdentifier) Data: 42 (Integer32)
On my machine I have enabled the SNMP service, configured a community with READ/WRITE permissions, and added localhost to the list of hosts to accept requests from.
When I send the SET request I get a response, but it has error status 17 which, according to MSDN means SNMP_ERRORSTATUS_NOTWRITABLE. The response also has error index set to 8, which is the number of variables I send. If I send 7 variables, the error index is set to 7.
I think the problem is that the Windows SNMP service is preconfigured to only accept SET requests for a fixed set of MIBs.
How can I get the Windows SNMP service to 'accept' my custom MIB SET request?
I downloaded and installed the Windows Server 2003 Resource Kit and tried to 'compile' the MIB file with mibcc.exe ("SNMP MIB Compiler") but I have not been able to compile any MIB files (even the most basic ones like SNMPv2-SMI.mib).