Setting RasEntry's DnsSuffix raises ArgumentException

Nov 16, 2012 at 4:53 PM

Hi,

I'm experiencing an issue when setting the DnsSuffix on a RasEntry and then calling Update. The thrown exception is the following:

System.ArgumentException: 'entry' must have the PhoneNumber, DeviceType, DeviceName, FramingProtocol, and EntryType properties set as a minimum.Parameter name: entry   at DotRas.Internal.ThrowHelper.ThrowArgumentException(String argumentName, String resource, Object[] args)   at DotRas.Internal.ThrowHelper.ThrowArgumentException(String argumentName, String resource)   at DotRas.Internal.RasHelper.SetEntryProperties(RasPhoneBook phoneBook, RasEntry value)   at DotRas.RasEntry.Update()

I checked and the RasEntry has all five mentioned properties set.

I'm using the latest version (changeset 96926) in the trunk.

Please let me know if there is anything I can do to help you diagnose.

Thanks

Coordinator
Nov 17, 2012 at 2:34 AM

Well you must be missing something on it, below is the snippet of code that would be throwing that particular error:

if ((value.PhoneNumber == null && value.AlternatePhoneNumbers.Count == 0) || (value.Device == null || (value.Device != null && string.IsNullOrEmpty(value.Device.Name))) || value.FramingProtocol == RasFramingProtocol.None || value.EntryType == RasEntryType.None)
{
    ThrowHelper.ThrowArgumentException("entry", Resources.Argument_MissingRequiredInfo);
}

Also, I'm not sure if you're manually generating the entire entry or not, but if you are trying to create an entry I would suggest following the steps located here to assist you with creating a new entry. There are so many different combinations of settings, if you don't you're going to waste a lot of time trying to figure out what you need to set to make it work.

Nov 28, 2012 at 2:09 AM

I never generate entries manually, I always use the Windows assistant.

The day I posted this, the issue had happened to me 3 times. But since then, I haven't been able to reproduce it, and I tried.

I'll come back if I ever experience this behaviour again.

Thanks

Coordinator
Nov 28, 2012 at 2:54 PM

Well thanks for reporting it, if I hear anything from anyone else I'll look into it.