Before running the U2U caml query builder application on my WFE server, all seems to be working fine, here all means:

  1. I have created a console application, which was running fine, but after the above incident I am getting System.NullReferenceException:Object reference not set .......!!! While the same exe is running fine on the other WFE server
  2. When I am adding user to FBA database, I am getting error like The Web application at 'https://xxxx/portal/profile' could not be found. Verify that you have typed the URL correctly. If the URL should be serviy existing content, the system adminstrator may need to add a new request URL mapping to the intended application. And it was running fine a day before, and when I searched the error it was suggested to add user in WSS_WPG_Admin group, I did so but it couldn't helped me out.

Could someone please suggest what went wrong and how can I troubleshoot the error. OS:Win 2016 SharePoint 2019 2 WFE servers and 1 DB server

1 Answer 1


Please try Below in your visual studio console application

  1. Change The Target CPU to any CPU - Go to visual Studio project properties and change its property Target CPU to AnyCPU and rebuild the Project.
  2. Please check if the account you run the code have the correct access to SharePoint database. provide the application pool identity account full access to SQL.
  • Hi, I tried with your suggestions but not worked for me. Target set to "Any CPU" and the account I am using is the administrator account, can you please suggest what may be the consequences running the u2u software, I strongly suspect something has happened after running the u2u. FYI we use FBA and windows authentication process and u2u doesn't support FBA login. Sep 6, 2021 at 5:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.