Bug Fix #62: DeviceDomainId may be null
This commit is contained in:
@@ -499,7 +499,7 @@ namespace Disco.BI.DeviceBI
|
|||||||
response.DeviceComputerName = adMachineAccount.Name;
|
response.DeviceComputerName = adMachineAccount.Name;
|
||||||
response.DeviceDomainName = adMachineAccount.Domain.NetBiosName;
|
response.DeviceDomainName = adMachineAccount.Domain.NetBiosName;
|
||||||
}
|
}
|
||||||
else
|
else if (ActiveDirectory.IsValidDomainAccountId(RepoDevice.DeviceDomainId))
|
||||||
{
|
{
|
||||||
string accountUsername;
|
string accountUsername;
|
||||||
ADDomain accountDomain;
|
ADDomain accountDomain;
|
||||||
@@ -508,6 +508,11 @@ namespace Disco.BI.DeviceBI
|
|||||||
response.DeviceDomainName = accountDomain == null ? null : accountDomain.NetBiosName;
|
response.DeviceDomainName = accountDomain == null ? null : accountDomain.NetBiosName;
|
||||||
response.DeviceComputerName = accountUsername;
|
response.DeviceComputerName = accountUsername;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
response.DeviceDomainName = Request.DeviceDNSDomainName;
|
||||||
|
response.DeviceComputerName = Request.DeviceComputerName;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user