
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2017 03:39 PM
Unexpected failure while connecting to Asset. Object reference not set to an instance of an object.
We are on Version 6.0.100.29
and all the nodes that we are pushing to are Windows 7
Solved! Go to Solution.
- Labels:
-
General Discussion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2019 07:33 PM
erodriguez wrote:
I know this is an old post but how did this get resolved. I am having the same issue. Although once in a while my deployment goes through. Been dealing with support and everything seems to checkout. Not sure what to do at this point. Please advise.
To get back on the topic of this thread: I've seen object reference errors thrown during deployments in cases where the RemoteDeployment_x64.exe file that gets written to the local computer during deployments is not accessible. This can be due to a firewall, anti-virus, etc. This file gets written to the C:\Windows\LsDeployment folder during the deployment process.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2020 10:30 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2019 08:22 PM
This is what Lansweeper sent me to fix the issue:
The technical details of the error as seen in your website log indicate that the error is related to asset/user relations.
Your Summary screenshot doesn't show the asset/user relation section of the tab, but we assume the problem assets have one or more asset/user relations of which the Active Directory user no longer exists. You do indicate you terminated a user. One other customer has reported the object reference error under these circumstances. Ordinarily, if an Active Directory user is deleted from Lansweeper, either manually or through cleanup options, its relations are removed as well. This mechanism is broken in Lansweeper 7.2 for cleanup options, resulting in relations remaining in the database even though the user was removed.
We had already reported the aforementioned issue to our developers. The case has ID LAN-4114 in our system and will be referred to as such in our changelog once fixed: https://www.lansweeper.com/changelog/
At the moment, we unfortunately don't have an estimated release date for a fix. For now, you can resolve the issue by manually deleting the faulty relations from the database. To do this, you can run the script below in the Script Execution tab of this tool: Program Files (x86)\Lansweeper\Tools\DatabaseMaintenance.exe. Replace what we've highlighted with the ID of the asset that's in error. An asset's ID is visible in the URL of its Lansweeper webpage.
We recommend backing up your installation prior to running any scripts: https://www.lansweeper.com/knowledgebase/backing-up-your-installation/
On an unrelated note, we would also recommend updating to the latest 7.2 build (7.2.100.33) by following these instructions: https://www.lansweeper.com/knowledgebase/updating-your-installation/
Delete
From tblAssetUserRelations
Where tblAssetUserRelations.AssetID = 506 And tblAssetUserRelations.IsLocalUser =
0 And tblAssetUserRelations.Username Is Not Null And
tblAssetUserRelations.Userdomain + '\' + tblAssetUserRelations.Username Not In
(Select tblADusers.Userdomain + '\' + tblADusers.Username From tblADusers)
You should also be able to resolve the issue for all assets at once by running the modified script below. Again though, back up your database first, to be safe. The script below deletes all relations between assets and domain users where the domain user is no longer present in tblADusers.
Delete
From tblAssetUserRelations
Where tblAssetUserRelations.IsLocalUser =
0 And tblAssetUserRelations.Username Is Not Null And
tblAssetUserRelations.Userdomain + '\' + tblAssetUserRelations.Username Not In
(Select tblADusers.Userdomain + '\' + tblADusers.Username From tblADusers)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2019 07:30 PM
pte wrote:
Hello,
This is what Lansweeper sent me to fix the issue:
The technical details of the error as seen in your website log indicate that the error is related to asset/user relations.
Your Summary screenshot doesn't show the asset/user relation section of the tab, but we assume the problem assets have one or more asset/user relations of which the Active Directory user no longer exists. You do indicate you terminated a user. One other customer has reported the object reference error under these circumstances. Ordinarily, if an Active Directory user is deleted from Lansweeper, either manually or through cleanup options, its relations are removed as well. This mechanism is broken in Lansweeper 7.2 for cleanup options, resulting in relations remaining in the database even though the user was removed.
We had already reported the aforementioned issue to our developers. The case has ID LAN-4114 in our system and will be referred to as such in our changelog once fixed: https://www.lansweeper.com/changelog/
At the moment, we unfortunately don't have an estimated release date for a fix. For now, you can resolve the issue by manually deleting the faulty relations from the database. To do this, you can run the script below in the Script Execution tab of this tool: Program Files (x86)\Lansweeper\Tools\DatabaseMaintenance.exe. Replace what we've highlighted with the ID of the asset that's in error. An asset's ID is visible in the URL of its Lansweeper webpage.
We recommend backing up your installation prior to running any scripts: https://www.lansweeper.com/knowledgebase/backing-up-your-installation/
On an unrelated note, we would also recommend updating to the latest 7.2 build (7.2.100.33) by following these instructions: https://www.lansweeper.com/knowledgebase/updating-your-installation/
Delete
From tblAssetUserRelations
Where tblAssetUserRelations.AssetID = 506 And tblAssetUserRelations.IsLocalUser =
0 And tblAssetUserRelations.Username Is Not Null And
tblAssetUserRelations.Userdomain + '\' + tblAssetUserRelations.Username Not In
(Select tblADusers.Userdomain + '\' + tblADusers.Username From tblADusers)
You should also be able to resolve the issue for all assets at once by running the modified script below. Again though, back up your database first, to be safe. The script below deletes all relations between assets and domain users where the domain user is no longer present in tblADusers.
Delete
From tblAssetUserRelations
Where tblAssetUserRelations.IsLocalUser =
0 And tblAssetUserRelations.Username Is Not Null And
tblAssetUserRelations.Userdomain + '\' + tblAssetUserRelations.Username Not In
(Select tblADusers.Userdomain + '\' + tblADusers.Username From tblADusers)
Important note here: the main post here is about an object reference error received when deploying. The issue that was resolved via your support ticket was about receiving an object reference error when editing assets. Two very different things.
I would advise against running this script unless recommended to by us.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2018 05:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2019 07:33 PM
erodriguez wrote:
I know this is an old post but how did this get resolved. I am having the same issue. Although once in a while my deployment goes through. Been dealing with support and everything seems to checkout. Not sure what to do at this point. Please advise.
To get back on the topic of this thread: I've seen object reference errors thrown during deployments in cases where the RemoteDeployment_x64.exe file that gets written to the local computer during deployments is not accessible. This can be due to a firewall, anti-virus, etc. This file gets written to the C:\Windows\LsDeployment folder during the deployment process.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2019 08:23 PM
erodriguez wrote:
I know this is an old post but how did this get resolved. I am having the same issue. Although once in a while my deployment goes through. Been dealing with support and everything seems to checkout. Not sure what to do at this point. Please advise.
Check out the latest post for an answer to your question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2017 02:53 PM
- A summary of the issue
- Program Files (x86)\Lansweeper\Service\Errorlog.txt
- An export of Deployment\Installer Logs
- A testconnection.exe output for an asset for which this issue exists, run testconnection.exe directly from your Lansweeper server towards the FQDN of the asset, using your scanning credentials.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2017 08:40 PM
Deleting and re-adding did not work. Everything adds and scans fine but same deployment error msg.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2017 08:12 PM
