Windows error 0x80004003, -2147467261

Detailed Error Information

E_POINTER[1]

MessageInvalid pointer
Declared inwinerror.h

HRESULT analysis[2]

FlagsSeverityFailure
Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode0 (0x000)
NameFACILITY_NULL[2][1]
DescriptionThe default facility code.[2][1]
Error Code16387 (0x4003)

Questions

41votes
25answers

Can't Add View from Controller in VS 2015 : "There was an error running the selected code generator"

I'm following a video tutorial where I'm required to create an empty ASP.NET Web Application with MVC, using Visual Studio 2015, being new to ASP.NET world, I'm following step by step. I got my project created well, next step adding a View from an existing Controller, I got hit by [...] read more
asp.net-mvc
visual-studio
visual-studio-2015
33votes
4answers

Visual Studio 2017 Broken and Cannot Uninstall or Repair

I am having an issue with starting Visual Studio 2017 Enterprise and I cannot report a problem to Microsoft's Developer Commnuity because it requires running Visual Studio 2017. Crap! I was updating VS 2017 with an update from this week and during this my PC crashed and I had to [...] read more
visual-studio-2017
27votes
4answers

Could not load file or assembly. Invalid pointer (Exception from HRESULT: 0x80004003 (E_POINTER))

I have rebuilt my solution and got the following compilation error: > Error 9 'Could not load file or assembly 'ComponentArt.Web.UI, > Version=2009.1.1819.35, Culture=neutral, PublicKeyToken=9bc9f846553156bb' or > one of its dependencies. Invalid pointer (Exception from HRESULT: 0x80004003 > (E_POINTER))' D:..\MyProj.Account\LC The dll is in infra folder and is moved finaly [...] read more
c#
asp.net
componentart
12votes
4answers

ASP.NET Core Testing - get NullReferenceException when initializing InMemory SQLite dbcontext in fixture

I have a test fixture in which I initialize my SQLite in-memory dbcontext, shown below: public static MYAPPDBContext Create() { var options = new DbContextOptionsBuilder<MYAPPDBContext>() .UseSqlite("DataSource=:memory:") .Options; var context = new MYAPPDBContext(options); context.Database.OpenConnection(); // this is where exception is thrown context.Database.EnsureCreated(); return context; } When I call the Create() method, [...] read more
c#
sqlite
asp.net-core
xunit
in-memory-database
7votes
1answer

Windows 10 Pro 64 bit version 1607 fails to install KB3176938 with 0x800F0922

So this is a Windows 10 Pro 64 bit version 1607 system, Insider edition on a slow ring. Some days ago it was repeatedly failing KB3176934 with the same 0x800F0922. I didn't find out the root cause and how to prevent it. My purpose is to find other who has [...] read more
64-bit
windows-update
windows-10-v1607
5votes
1answer

iText keeps throwing NullReferenceException

I've got one issue with iText right now. I've created a WindowsForms application with C#, it uses iText for generating pdf files with orders. I'm using it in my work, just to save some time and simplify my work a bit, but it's only for me. About a week ago [...] read more
c#
asp.net-core
itext
3votes
1answer

iText7 convert HTML to PDF "System.NullReferenceException."

> OLD TITLE: iTextSharp convert HTML to PDF "The document has no pages." I am using iTextSharp and xmlworker to convert html from a view to PDF in ASP.NET Core 2.1 I tried many code snippets I found online but all generate an exception: "The document has no pages." Here [...] read more
pdf
.net-core
itext
itext7
xmlworker
3votes
1answer

How do I properly manage the lifetime of a Qubit in C#

I'm playing around with Q#, which uses C# as a driver. I'd like to pass a Qubit object to the Q# code but it isn't working as expected. C# Driver using Microsoft.Quantum.Simulation.Core; using Microsoft.Quantum.Simulation.Simulators; namespace Quantum.QSharpApplication1 { class Driver { static void Main(string[] args) { using (var sim = new [...] read more
c#
q#
3votes
2answers

Debug my asp.net mvc inside VS 2012 will return this error "HTTP Error 500.0 - Internal Server Error"

I am working on an asp.net mvc-4 web application inside visual studio 2012 professional. last week everything was working fine, where i were able to debug the project. but today when i debug my project i got this error:- > HTTP Error 500.0 - Internal Server Error An error message [...] read more
asp.net
asp.net-mvc
visual-studio-2012
iis-express
windows-server-2012-r2
3votes
1answer

How to Mock AutoMapper IConfigurationProvider in x-unit unit testing in asp.net core

I'm writing unit test for my UserRepository class where I'm using AutoMapper ProjectTo<T> Queryable Extensions for projection. Here is how the class looks like: public class UserRepository:IUserRepository { private readonly UserManager<UserEntity> _userManager; private readonly IConfigurationProvider _mappingConfiguration; public UserRepository( UserManager<UserEntity> userManager, IConfigurationProvider mappingConfiguration) { _userManager = userManager; _mappingConfiguration = mappingConfiguration; } [...] read more
c#
unit-testing
automapper
moq
xunit
2votes
0answers

ASP.NET Core blazor dependency injection error: System.NullReferenceException?

Using SqlSugar ORM, based on blazor, dependency injection business service, an error is reported when calling, and it is empty。 SqlSugarService: public static class SqlSugarService { private static readonly ILog log = LogManager.GetLogger(typeof(SqlSugarService)); public static void AddSqlSugarSevice(this IServiceCollection services) { if (services == null) throw new ArgumentNullException(nameof(services)); services.AddScoped<ISqlSugarClient>(o => { [...] read more
c#
.net
asp.net-core
orm
blazor
2votes
3answers

Cannot install Visual Studio 2017 community edition after sudden shutdown

I started installing VS and then my computer turned off suddenly (due to overheating). When I was reinstalling it, an error message appeared saying: Can't install in a non empty folder. So I deleted the folder C:\Program Files (x86)\Microsoft Visual Studio\2017\community Then, when I tried to install it, it failed. [...] read more
visual-studio
installation
visual-studio-2017
reinstall
1vote
1answer

Adding new package breaks the .NET 5 application

I've been trying to figure out why my console application fails the instant I introduce a new package. Using IdentityModel.OidcClient and Microsoft.AspNetCore.Server.Kestrel only works, but when adding Microsoft.Extensions.Configuration.Json it throws exception. I don't reference the new package in code either, I just add it to the project. Steps to reproduce: [...] read more
c#
.net-5
kestrel-http-server
identitymodel
1vote
0answers

SetOutputToDefaultAudioDevice() gets NullException

i've wanted to try out the SSML but everytime i try to run my code i get a null exception at SetOutputToDefaultAudioDevice() . I am using the Example Code from Microsoft: using System; using System.Speech.Synthesis; namespace SSML_Test { class Program { static void Main(string[] args) { // Initialize a new [...] read more
c#
.net
visual-studio-2017
ssml
1vote
0answers

ASP.NET Framework web app setting contract to null when file is "large"

I have an ASP.NET framework web application that processes documents and returns it in a template contract. If I send it a smaller document (143KB) it processes fine and sets the template contract properly (ie. template contract is not null): Template set properly for smaller file If I try a [...] read more
asp.net
rest
1vote
0answers

"'Object reference not set to an instance of an object" When I Started App

I have got some Classes implements IHostedService. EmailSendService: public class EMailSendService : IHostedService, IDisposable { private Timer _timer; private IMailAccountService _mailAccountService; private IMailTaskDAL _mailTaskDal; private LoggerServiceBase _loggerServiceBase; public EMailSendService(IMailAccountService mailAccountService, IMailTaskDAL mailTaskDal) { _mailAccountService = mailAccountService; _mailTaskDal = mailTaskDal; _loggerServiceBase = (LoggerServiceBase)Activator.CreateInstance(typeof(DatabaseLogger)); } private void SendMail(object state) { var isAnyMailSended [...] read more
asp.net-core
task
asp.net-core-3.1
asp.net-core-hosted-services
ihostedservice
1vote
1answer

Blazor server-side, razor page: Object reference not set to an instance of an object

I am using .NET 5 version 5.0.100-rc.1.20452.10 , ASP.NET Core Blazor server-side. I mimic this example https://github.com/DevExpress-Examples/blazor-server-dxdatagrid-export/blob/19.2.2%2B/CS/DxDataGridExportingWithReports/Pages/Index.razor#L22 My error System.NullReferenceException HResult=0x80004003 Message=Object reference not set to an instance of an object. Source=acc133blazor StackTrace: at acc133blazor.Pages.DeclaredData.Account.AccountsPage.<OnInitializedAsync>d__10.MoveNext() in D:\acc133blazor\acc133blazor\Pages\DeclaredData\Account\AccountsPage.razor:line 144 @foreach (Tuple<string, string> urlInfo in ExportUrlInfo) { <a href="@urlInfo.Item1" download target="_blank">@urlInfo.Item2</a> } [...] read more
c#
asp.net-core
razor
blazor
blazor-server-side
1vote
1answer

Mutiple Refreshable CollectionViewSources of single Observable Collection

Is there any way that I can have multiple views on a single Observable Collection, with different filters, that I can Refresh? I have an Observable Collection called Proficiencies. I have three list boxes, each should display a subset of the Proficiencies items, filtered on a value within the Proficiencies [...] read more
c#
wpf
1vote
3answers

vb.net DataGridView prevent user clicking on column

I have a DataGridView (DGV) that I am adding items to from a SQLite DB MANUALLY My setting for the Selection Mode have been CellSelect and FullRowSelect may have tried others The Errors and Issues are varied depending on where the user clicks on the DGV The code as it [...] read more
vb.net
datagridview
1vote
1answer

Use ContinueDialogAsync in ProActive message after ending dialog turn

I am trying to 'pause' a bot conversation and resume it via a ProActive Message. The way I have been trying to do so is by ending the dialog turn to 'pause' the conversation. Following I'm using ContinueDialogAsync in my ProActive message to 'resume' the conversation. Below is how I'm [...] read more
botframework
azure-bot-service
bot-framework-composer
1vote
0answers

iTextSharp issues wherein null reference exception

I am using iTextSharp with C# to fill an editable PDF. Everything was working fine, but suddenly I am getting an error on the PdfStamper line. PdfReader pdfReader = new PdfReader(File.ReadAllBytes(pdfTemplatePath)); PdfStamper pdfStamper = new PdfStamper(pdfReader, new FileStream(newFile, FileMode.Create,FileAccess.Write)); AcroFields pdfFormFields = pdfStamper.AcroFields; The error is System.NullReferenceException HResult=0x80004003 Message=Object reference [...] read more
itext
1vote
0answers

Why does moving controls between panels cause an exception in deferred render?

I am trying re-parent controls from one panel to another like this: oldPanel.Children.Remove(control); newPanel.Children.Add(control); Which works fine with every control until i try to do it with the LAST child of the oldPanel, where i get: System.NullReferenceException HResult=0x80004003 Message=Object reference not set to an instance of an object. Source=Avalonia.Visuals StackTrace: [...] read more
avaloniaui
1vote
1answer

UnitTesing with Autofac, Moq - Getting Value cannot be null exception

I'm using EF6. The generated code is something like: public partial class MyDataContext : DbContext,IMyDataContext { public MyDataContext() : base("name=mydata") { } public virtual DbSet<getProjectsDraft> getProjectsDrafts { get; set; } } and the dbcontext interface is like this: public interface IMediciDbContext : IDisposable { DbSet<getProjectsDraft> getProjectsDrafts { get; set; } [...] read more
c#
entity-framework
unit-testing
moq
autofac
1vote
0answers

Microsoft.SqlServer.Types assembly causes problems with geography datatype. How to fix?

After upgrading and changing my project to target network .NET 4.8 and upgrading used Nuget packages to the latest version in package manager. This brought up a host of problem. Most pressing was the inability to use Geography data type in DataReader and Entity Framework. The error in data reading [...] read more
c#
asp.net
.net
sql-server
.net-assembly
1vote
2answers

Iterate through web pages and download PDFs

I have a code for crawling through all PDF files on web page and download them to folder. However now it started to drop an error: > System.NullReferenceException HResult=0x80004003 Message=Object reference not > set to an instance of an object. Source=NW Crawler > StackTrace: at NW_Crawler.Program.Main(String[] args) in > C:\Users\PC\source\repos\NW [...] read more
c#
web-scraping
web-crawler
html-agility-pack
1vote
1answer

System.Windows.Forms.WebBrowser wait until page has been fully loaded

I have been trying a lot of different solutions with wait and async. Nothing seems to work. I was not able to find solution that actually fully waits until page has been fully loaded. All codes are waiting some time but not until page has been loaded and I am [...] read more
c#
web-scraping
dynamics-crm
webbrowser-control
1vote
1answer

C# Exception User-Unhandled

I am building a C# Excel Add-on to replace string xxx to yyy and find files in batch in a given folder path: string replace = "xxx"; string replacement = "yyy"; foreach (FileInfo file in listOfFiles) { foreach (Excel.Worksheet xlWorkSheet in xlWorkBook.Worksheets) { Excel.Range r = (Excel.Range)xlWorkSheet.UsedRange; Excel.Range first = [...] read more
c#
excel
vsto
1vote
0answers

Error throw whilst saving programmatically created document containing image

I have C# function that saves a supplied image into a PDF file using VSTO. But it is throwing: > System.AccessViolationException HResult=0x80004003 > Message=Attempted to read or write protected memory. This is often an > indication that other memory is corrupt. Source= StackTrace: I have tried saving in various ways: [...] read more
c#
ms-word
vsto
1vote
1answer

How to update/overwrite existing file on Google Drive using Google Drive API v3

I am having an issue with updating existing file in Google Drive using Google Drive API v3. From the code below create (uploading document first time) works just fine (else statement) however, update fails. I have validated that fileId is correct. return file.Id; throws an exception fill is null. Any [...] read more
c#
google-api
google-drive-api
google-api-dotnet-client
1vote
1answer

Injecting validators in FluentValidation

This is my setup: public class BusinessUnitIdValidator : AbstractValidator<string> { public BusinessUnitIdValidator(IConfigSettings configSettings) { LovFile buidLovFile = configSettings.BuidLovFile; When(x => buidLovFile.IsValidationRequired.Equals("true", StringComparison.OrdinalIgnoreCase), () => { RuleFor(x => x).Must((buid) => IsValidBusinessUnitId(buidLovFile, buid)).WithMessage(ValidationResultConstants.INVALID_BUSINESS_UNIT_ID); }); } } public CreateCustomerRequestValidator(IValidator<string> _businessUnitIdValidator) { RuleFor(x => x).NotNull(); RuleFor(x => x.BusinessUnitId).NotNull().WithMessage(ValidationResultConstants.BUSINESS_UNIT_ID_SHOULD_NOT_BE_NULL); RuleFor(x => x.BusinessUnitId).SetValidator(_businessUnitIdValidator); } This is [...] read more
c#
fluentvalidation
1vote
1answer

SSIS package runs fine manually but throws error via JOB

SSIS Package Info I have a package which manipulate some data(received from an API), writes it into SQL Server Table and also converts it to ADODB Recordset to send it remotely to SAP. The package has no SQL or file connections (I'm connecting and writing into the database via c# [...] read more
sql-server
ssis
1vote
2answers

How to merge two datatables with PrimaryKeys?

I have two data tables and want merge columns and create as third table. //Given dt1 {A(PK),B,C,D} dt2 {a(PK),b,c,d} //Want dtResult {A,B,C,D,a,b,c,d} Do not want to lose ExtendedProperties so not Selecting DataColumn.ColumnName and adding as columns. Code: DataTable dt1 = new DataTable(); dt1.TableName = "dt1"; dt1.PrimaryKey = new DataColumn[] { [...] read more
c#
.net
datatable
1vote
1answer

HoloLens 2 Emulator Error 0x80004003 - Object reference not set to an instance of an object

I have been trying to deploy a Unity application to the Hololens 2 emulator for a while now and have not found a solution that works. I have run through every troubleshooting document and uninstalled and reinstalled every program to try and find the right fit but keep getting the [...] read more
hololens
windows-mixed-reality
hololens-emulator
1vote
0answers

Issue with Worksheet.Copy method from resource in VSTO

I am experiencing a problem with Excel Worksheet.Copy method in VSTO. The worksheet to be copied is stored as a resource file. The resource file is read every time the template needs to be copied. The code works perfectly fine when the template sheet is imported for the first time. [...] read more
excel
vb.net
vsto
1vote
1answer

Hololens emulator showing NullReferenceException

I'm trying to run a Hello World kind of problem for a HoloLens on emulator but it is showing error: The following unexpected error occurred during bootstrapping stage 'Connecting to the device '<device>'.': NullReferenceException - Object reference not set to an instance of an object. [0x80004003] I have tried making [...] read more
hololens
hololens-emulator
windows-mixed-reality
1vote
1answer

azure management client doesn't return any resource group

I am new to azure. I am trying to create ResourceGroup then trying to deploy a VM. But I am getting exception during accessing resourcegroups. I am following MSDN example given here: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/csharp-template I tried different subscription but no luck. Couldn't find any pointers online for this issue or I [...] read more
c#
azure
0votes
0answers

How to solve "windows resource protection could not run" when using sfc /scannow

When using sfc /scannow on my Windows 10 Pro 64bit system I am geting error "windows resource protection could not run the requested operation" This is from the CBS log: > 2017-02-01 10:29:29, Info CBS TiWorker: Client requests SFP repair object. > 2017-02-01 10:29:29, Info > CSI 00000002@2017/2/1:09:29:29.390 WcpInitialize (wcp.dll [...] read more
windows-10
0votes
0answers

WMI Issues when installing SQL 2014 (The specified module could not be found)

I am trying to install SQL 2014 on my Window 10 laptop and during rule checking I receive the following error: SQL error [https://i.stack.imgur.com/jI2SR.png] When I check for the Windows Management Instrumentation service on my laptop I find only Winmgmt which cannot be started due to the following error: Services [...] read more
windows-10
services
wmi
0votes
1answer

Windows 8.1 fail upgrade, rebooting

I own a Asus vivobook, which has a Windows 8 pro installed and has a secondary SSD for faster boot up only, not storage. When I try to upgrade to 8.1, I hit a fail upgrade 0x80004003. Now every time I login, the 8.1 installer will run at the background, [...] read more
windows
windows-8
windows-8.1
windows-8.1-upgrade
0votes
0answers

SQLite app gives AccessViolation on new SQLiteConnection Windows 10 v 20H2

Sqlite crashes on SqliteConnecion I have an application that uses Sqlite. I has been working perfectly for a couple of year. I'm using Nuget System.Data.SQLite.Core 1.0.113.7 I tried to run it and i get this exception. > System.AccessViolationException HResult=0x80004003 > Message=Attempted to read or write protected memory. This is often [...] read more
windows
sqlite
c#-4.0
0votes
1answer

How to implement null exception when using ToolStripMenuItem Owner Item

I'm trying to implement some code whereby I get the parent of the clicked toolstipmenuitem upto the root. If I query openly I eventually get a null exception from the one after the last parent, as you may expect where there is no parent to parent to get the parent [...] read more
c#
exception
0votes
0answers

Get ArgumentNullException when new gRPC channel on UWP release build

I am trying to develop UWP with gRPC. I got channel ArgumentNullException on release build, but debug build is fine and gRPC also works fine. It seems to related to UWP limitation (loopback). I also use checknetisolation command to add exception for my package. But it's still fail. Is there [...] read more
c#
uwp
grpc
0votes
0answers

OFFFILT.DLL.from program file not working in few servers in C#. Getting System.AccessViolationException exception

I am using code to read all kind of files and to achieve that i am using code available in below link. https://www.codeproject.com/Articles/13391/Using-IFilter-in-C This code internally using OFFFILT.DLL. This dll available in below two location in any windows system. C:\Program Files\Common Files\Microsoft Shared\Filters\OFFFILT.DLL C:\Windows\System32\OFFFILT.DLL My application using OFFFILT.DLL from program [...] read more
c#
filereader
0votes
1answer

Entity Framework Core many to many relation error: Object reference not set to an instance of an object

I am new to C# / EF Core and don't understand why I am getting a null reference exception: > System.NullReferenceException > HResult=0x80004003 > Message=Object reference not set to an instance of an object. > Source=WMS > > StackTrace: > at > WMS.Pages.Artikels.Artikel_Verkauf_erfassen.ArtikelVerkaufErfassen.d__33.MoveNext() > in D:\Project Arbeit\Code\WMS\Pages\Artikels\Artikel Verkauf > erfassen\ArtikelVerkaufErfassen.razor.cs:line [...] read more
c#
entity-framework-core
0votes
1answer

I am trying to set the Discord bot's status with D#+ but it gives me a nullreference exception every time

This also might not be the way to do it but if it isn't I can't find the right one anywhere. Anyways this is my code: await discord.UpdateStatusAsync(new DiscordGame("?help")); // Line 101 And this is the error System.NullReferenceException HResult=0x80004003 Message=Object reference not set to an instance of an object. Source=DSharpPlus [...] read more
c#
dsharp+
0votes
1answer

EntityFrameworkCore throws NullReferenceException when querying data

I'm using EF Core 2.2 to connect to an Oracle11g database (using these old versions is a must), when I try to query one of my tables it throws a NullReferenceException in the EF Core external code. The Query: string username = "Administrator"; var user = _context.Users.Where(x => x.UserName.ToUpper() == [...] read more
oracle
asp.net-core
oracle11g
entity-framework-core
0votes
0answers

JavaScript evaluation fails with the message: $ is not defined

VS 2019, .NET 5, AngleSharp* V0.14.0 I am looking for some clarity on the steps needed to evaluate the JavaScript inside a script tag. Here is the JavaScript I am trying to evaluate: <script> $(function () { $("#TextBoxPIN").bind('focus mouseenter', function () { $("#PIN").css("color", "#fc4258"); }); $("#TextBoxPIN").bind('blur mouseleave', function () { [...] read more
javascript
anglesharp
0votes
1answer

Model is Filled on PartialAsync Call but Null on Partial View C# Razor ASPCORE

I am creating a partial Model Async due to constraints of a library I am using. I call the partial and return a Model containing my progressModel data. The model's ProgressModel has data when it leaves the server and when it hits the partial I get an Object Reference Null [...] read more
c#
asp.net-core
razor
model
razor-pages
0votes
1answer

RepoDb - Extract function throws exception when using ExecuteQueryMultiple

when i execute the code below, it generates an exception. where am i going wrong? Code that generates exception specifically extractor.Extract: public Visit Get(long id, bool loadGraph = false) { const string sqlVisit = @"SELECT * FROM Visit WHERE Id = @VisitId;"; const string sqlCC = @"SELECT * FROM ChiefComplaint [...] read more
orm
micro-orm
0votes
0answers

How to use user-defined function in Entity Framework Core (Oracle)?

I am just starting to use Entity Framework Core with an Oracle database in a .NET Core 3.1 project and I keep running into problems when trying to call a user-defined function. The function in the database looks like this: FUNCTION fnc_hourly_data( p_quality IN t_quality_configurations.quality%TYPE DEFAULT NULL, p_date IN DATE [...] read more
c#
oracle
entity-framework-core
0votes
0answers

Error when compiling as a CLR library when importing dll from Edge.js

I tried using Edge.js for using .Net library with Node.js. I was able to use one of dll's successfully but for one of my other dll I get below error. Same error for every modification. Code is input = { template: 'C:\\Test1.docx', test: 'C:\\Test2.docx' }; var Comparision = edge.func(function(){/* #r [...] read more
edge.js
0votes
1answer

NullReference Exception in Blazors RenderTreeBuilder

So I'm working on a school project. I use blazor in the frontend and FluentValidation to validate forms. First, the exception: > System.NullReferenceException > HResult=0x80004003 > Message=Object reference not set to an instance of an object. > Source=TemperBapes > StackTrace: > at TemperBapes.Pages.Register.BuildRenderTree(RenderTreeBuilder __builder) I get the exception when calling [...] read more
html
rendering
blazor
fluentvalidation
0votes
0answers

Xamarin Forms UWP crash on start up

Debug output including stack trace: GLLDBG Permissions check SUCCEEDED ... GLLDBG: PetUI Displaying C:\Users\india\AppData\Local\Packages\0c046c82-7c9c-41e1-b7aa-0c1798833708_1d3xttr4xanc4\LocalState\photos\img676e113a6a9d41aa82bd2af2a6dc6631.jpg Exception thrown: 'System.ArgumentNullException' in System.Private.CoreLib.dll Exception thrown at 0x76EAA892 (KernelBase.dll) in PetDiary.UWP.exe: WinRT originate error - 0x80004003 : 'System.ArgumentNullException: Value cannot be null. at Xamarin.Forms.Platform.UWP.Platform.SetCurrent(Page newPage, Boolean popping, Boolean modal, Action completedCallback) at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__7_0(Object state) at [...] read more
c#
forms
xamarin
uwp
0votes
0answers

Unit test with Moq returns Object reference not set to an instance of an object. when calling method Base.GetAsync()

I am trying to do a unit test with Moq for this method: public class XsService : EntityResourceService<XModel, string>, IXResourceService<XModel, string> { private readonly IXsEntityRepository<XModel, string> XEntityRepository; Public XsService( iCorrelationContextAccessor correlationContextAccessor, IJsonApiContext jsonApiContext, IXsEntityRepository<XModel, string> XEntityRepository) : base(jsonApiContext, XEntityRepository) { this.XEntityRepository = XEntityRepository; } public async Task<IEnumerable<XModel>> GetXsAsync(UModel uModel) { [...] read more
json
api
.net-core
0votes
2answers

PInvoke implementation of a C SDK function causing memory violation

I am wanting to call a C DLL function from C#. The function is described in the C include header file as: #ifdef _WIN32 #ifdef CMGO_BUILD_DLL #define CMGO_DLL_API __declspec(dllexport) #else #define CMGO_DLL_API __declspec(dllimport) #endif #define CMGO_API_CC __stdcall #else #define CMGO_DLL_API #define CMGO_API_CC #endif typedef void* CMGO_DATACHANNEL_HANDLE; CMGO_DLL_API int CMGO_API_CC cmgo_create_datachannel(const [...] read more
c#
0votes
2answers

Why controller no works only in Html.PartialAsync?

Now I have a controller: public async Task<IActionResult> Location() { Models.LocationModel Location = null; //some logic return View(Location); } And here is the View: @model Vishdo.Models.LocationModel <div> <h5>@Model.City</h5> <span>@Model.Name</span> <span>@Model.Phone</span> </div> When I access the View by the URL(https://localhost:44372/home/location) directly, all works well. Now I add it into the _Layout.cshtml [...] read more
asp.net-core
.net-core
0votes
1answer

Adding DataTable to a List<DataTable>

I am trying to add a Data Table to a DataTable list (post a filter operation) that belongs to a kind of modal class. I am getting the below exception on my debug statement _return.SearchResult.Add(_i);. I am getting the same error in my actual statement as well _return.SearchResult.Add(_t);. Kindly help [...] read more
c#
list
datatable
0votes
0answers

Invalid pointer (0x80004003) [ SSIS Installation ]

I have been trying to install SSIS for the last 3 days but every time this error pops up. I have already tried reinstalling Visual Studio, MSSQL Server as well as SSDT and performed reconfiguration/re-installation at least 10 times, tried running it on administrator mode as well as, clearing the [...] read more
sql-server
visual-studio
ssis
ssms
0votes
0answers

Error when Compiling Cython into 32bit app

I have python code that I am using Cython to convert to C (in order to call from C# 32bit application). 1. When I use MSVC x86 Native Tool Command prompt to run: > python setup.py build_ext --inplace --compiler=msvc I get the error: python38.lib(python38.dll) : fatal error LNK1112: module machine [...] read more
python
c#
c
cython
0votes
0answers

CSV Flat Data processing with performance

I need some ideas how to increase performance to read from CSV file. I made one version is working well, but performance is no longer desirable when we have more than 200 000 line per CSV, the processing time is taking a lot of time, and the importing process is [...] read more
c#
csv
0votes
1answer

Creating HTML table from List throws null exception (Printing to console works)

Here is the method for generating HTML table: public static string CreateHTMLTable<T>(IEnumerable<T> list, params Func<T, (object, string)>[] fxns) // Used for generating HTML tables for Outlook { var sb = new StringBuilder(); sb.Append("<table>\n"); sb.Append("<thead>\n"); sb.Append("<tr>\n"); foreach (var fxn in fxns) sb.Append("<th>").Append(fxn(default).Item2).AppendLine("</th>"); sb.Append("</tr>\n"); sb.Append("</thead>\n"); foreach (var item in list) { sb.Append("<tr>\n"); [...] read more
c#
0votes
0answers

Can't create blank Android Xamarin app in VS 2017.the error shows

Can't create blank Android Xamarin app in VS 2017 The error shows invalid pointer (Exception from HRESULT: 0x80004003 (E_POINTER)) read more
c#
android
xamarin
0votes
0answers

Convert wmf to mathml crash after running many times

Use mathtype sdk 6.9 to convert many wmf to mathml file, after converting several hundreds of wmf files successfully, it crashed (unhandled exception) in below position of MathTypeSDK.cs(MTXFormSetTranslatorMgn function) retCode = MTXFormSetTranslator(options, transName); the exception details are: System.AccessViolationException HResult=0x80004003 Message=Attempted to read or write protected memory. This is often an [...] read more
mathtype
0votes
1answer

Entity Framework 6.4 throwing NullReferenceException with Azure Functions V3

I'm using Azure Functions V3 (.Net Core 3.1) and trying to call an Entity FrameWork class built using EF 6.4 (.Net 7.2) and Entity Framework is throwing a NullReferenceException. The same call succeeds while using .Net Core console app instead of Azure Function. Appreciate your help here. Here is my [...] read more
entity-framework-6
azure-functions
0votes
0answers

Model binding with view in .NetCore project gives object reference null error --

My problem is as you read in the above title - My project is in .NetCore. Am doing some calculations and returning some value from my controller to the related view. I have used Product as model class in my application. My controller code - [Route("ProductDetail")] [HttpGet] public IActionResult ProductDetail(int [...] read more
asp.net-core
model-view-controller
.net-core
mvvm
object-reference
0votes
1answer

How to troubleshoot VS2010 Build Mode errors

Sorry, I'm not sure how to phrase this question. I have a issue where I'm building a VS21010 Solution in both debug/Mixed CPU and in release. From what I can tell in the Configuration Manager all projects are set to build in Debug/Mixed CPU. However in my automated build t [...] read more
.net
visual-studio
visual-studio-2010
0votes
1answer

Insert Data from one Mysql table in Server A to Another Mysql Table inside SSIS

I'm trying to insert some id from MySQL Table T1 in Server A, into MySQL Table T2 in Server B inside an SSIS package. I've tried ADO.NET source for reading data and ADO.NET destination and it gives me this error: > [ADO NET Destination [2]] Error: System.NullReferenceException: Object > reference [...] read more
mysql
ssis
0votes
0answers

Object reference not set to an instance of an object when close with two cefsharp.winforms instances

My wpf uses two ChromiumWebBrowser(Cefsharp.Winforms) instances, one is for my website, one is for displaying pdf file, when I close the MianWindow, there is a crash like below: System.NullReferenceException HResult=0x80004003 Message=Object reference not set to an instance of an object. Source=CefSharp.WinForms StackTrace: 在 CefSharp.WinForms.ChromiumWebBrowser.InternalDispose(Boolean disposing) 在 CefSharp.WinForms.ChromiumWebBrowser.Dispose(Boolean disposing) 在 System.ComponentModel.Component.Dispose() [...] read more
cefsharp
0votes
0answers

What does a ArgumentNullException in Unity 3D + MRTK based project during deployment mean and how to solve it?

I'm in the midst of upgrading our Unity 2018.3 + MRTK project to Unity 2019.4. I've already encountered several issues while upgrading and thought I'll do a simple Unity 2019.4 + MRTK based application which simply consists of a cube placed in scene in order to better understand what's happening. [...] read more
c#
unity3d
mrtk
0votes
2answers

wpf combobox multibinding could not get combobox items (programmatically added or bind to database) of relative source combobox in first step

I want to disable some items of combobox by specific conditions. For this issue, I used multibinding. If I described all items of combobox in xaml, there is no problem. But I want to populate combobox items programmatically. So in this case , I could not get items, returns null, [...] read more
wpf
combobox
multibinding
0votes
1answer

How can I test LDAP using ASPNETBOILERPLATE?

ASPNET Boilerplate or ASPNETZero have the ability to integrate with LDAP. Apparently the configuration is easy, but it only lets me configure a Domain, a User and Password. I was wondering if anyone has a working example with a test server of LDAP? Currently I have enabled the LDAP Authentication: [...] read more
ldap
aspnetboilerplate
0votes
1answer

X509Certificate2.GetECDsaPrivateKey error keyHandle null value

I generated a pfx file with the following commands openssl ec -in apple-private-key.pem -pubout -out apple-public-key.pem openssl req -new -key apple-private-key.pem -x509 -nodes -subj "/CN=apple.my.com" -out certificat.pem openssl pkcs12 -in certificat.pem -inkey apple-private-key.pem -export -out certificate.pfx and when I try to load it only with the flag X509KeyStorageFlags.MachineKeySet this flag [...] read more
c#
.net
cryptography
x509certificate
x509certificate2
0votes
1answer

Getting null argument when implementing N-tiers architecture with Autofac

I created this simple WebAPI project containing the following library class * Coordination (ServiceLayer) * Domain (BusinessLayer) * Data (DataLayer) * Dtos (Dtos for webapi) Basically WebAPI project calls(reference) Dtos, and Coordination. Coordination Calls Domain and Domain call Data. This is what my structure look like. enter image description here [...] read more
c#
asp.net-web-api
dependency-injection
autofac
0votes
0answers

How to solve System.NullReferenceException when Transmitting iBeacon using windows-beacon-library

I want to transmit iBeacon from windows PC and I found this library https://github.com/AltBeacon/windows-beacon-library in C#. I don't have any knowledge about this language. I am trying to run this code in Visual Studio C# console application using System; using Altbeacon.Beacon; namespace TransBeacon { class Program { static void Main(string[] [...] read more
c#
windows
bluetooth
ibeacon
0votes
0answers

UWP: AccessViolationException on an attempt to open a page

I have a Xamarin.Forms application that uses FreshMvvm. On an attempt to open a particular page with this code: await CoreMethods.PushPageModel<DistributorsLocatorPageModel>(); after the execution passes the page's Init() method and all properties, the app crashes with the following error: > System.AccessViolationException > > HResult=0x80004003 > > Message=Attempted to read or [...] read more
xamarin.forms
uwp
access-violation
0votes
1answer

Not sure how to solve this NullReferenceException

I have a method that is supposed to take customer names, customer towns, and the fire extinguishers + serial numbers of each extinguisher that belongs to those customers, from an excel file, and write that information to a bunch of separate excel files depending on what customer the extinguishers belong [...] read more
c#
excel
nullreferenceexception
epplus
0votes
1answer

PostAsync Call from application level in boilerplate

UPDATE: The core issue is ABPSesssion gets null after the postasync request. i think if i can regain back my abpsssion it will work. I am trying to make an api call of postAsync type. Issue is i am getting the response perfectly well now when i i try to [...] read more
entity-framework
http-post
slack-api
aspnetboilerplate
0votes
1answer

System.AccessViolationException when handing an array over to a dynamically loaded c++ DLL in C#

I am dynamically loading a DLL originally written in C++ in a C# program and hand over an array as an argument like this: // That's only for being able to load the DLL dynamically during runtime [DllImport(@"C:\Windows\System32\kernel32.dll", EntryPoint = "LoadLibrary")] public static extern IntPtr LoadLibrary([MarshalAs(UnmanagedType.LPStr)] string dllToLoad); [DllImport(@"C:\Windows\System32\kernel32.dll", CharSet [...] read more
c#
c++
arrays
dll
pinvoke
0votes
0answers

Combobox' selecteditem set in xaml but bound property is null

I would like to train in c# and I created a WPF project in which are displayed some persons(with each a name and a work), and by selecting a field ('name' or 'work') and a search string, I would get all the persons filtered. for example, the field is 'name', [...] read more
c#
wpf
xaml
data-binding
0votes
1answer

PDFTron PDF to XOD conversion throws exception System.AccessViolationException

The below code that converts a PDF document to XOD using PDFNet nuget package (v6.8.56.6513) throws an exception. However, the previous version (v6.8.2.65223) of the nuget package works without any problem. To produce the issue, please download this file. Platform: .Net Framework v4.7.2, x64. using System; using pdftron; namespace PdfTronTest2 [...] read more
c#
pdftron
pdfnet
0votes
1answer

Retrieve data from multiple database tables to API in ASP.NET Core

I have a database in SQL Server stored locally with a number of different tables, all connected together by different types of relations (one-to-many and many-to-many). You can see some of theme like this: enter image description here [https://i.stack.imgur.com/ObIAG.png] I created a Web API for these with Entity Framework on [...] read more
c#
sql-server
api
asp.net-core
entity-framework-core
0votes
1answer

How to check NewtonJson Jarray null/empty error when request data from an API and display DataSet to Excel in C#

I'm trying to display the simple element of the array or value, below is my JSON string(an API from python pandas) { "msg": "success", "state": 10000, "data": { "data": [ { "index": 0, "test_1": 110, "test_2": "000001", "test_3": "CN", "test_4": "Bank", "test_5": 893, "test_6": 229 } ], "schema": { "fields": [...] read more
c#
arrays
json
excel
linq
0votes
2answers

C# : Cancelling MySqlCommand using CancellationToken giving NULLReferenceException

I was trying to cancel a MySqlCommand using a CancellationToken. The query executes successfully when cancellation is not requested. public async Task<int> ExecuteNonQueryAsync(string connectionString, string query, CancellationToken cancellationToken) { int affectedRowsCount = 0; await Task.Run(() => { using (MySqlConnection connection = new MySqlConnection(connectionString)) { using (MySqlCommand command = new MySqlCommand()) [...] read more
c#
mysql
.net
mysqlcommand
0votes
1answer

Result of mapper is NULL? How do I map my api request to a dto?

I'm making a call to an api, and then deserializing that response to a list, when i am then trying the response to a new list: public async Task<IEnumerable<RoadDto>> GetRoadStatusDetail() { List<Road> road = await CallApi(); return road .Select(x => _mapper.Map(x)); } private async Task<List<Road>> CallApi() { HttpClient client = [...] read more
c#
mapping
dto
0votes
0answers

System.NullReferenceException : entity was null

I'm working under Visual Studio 2017. I want to retrieve the comments the user is typing in the form. In order to do so, if there are no datas in the db, I'm using a post request, and if there are datas I'm using a put request. The post is [...] read more
asp.net
nullreferenceexception
0votes
0answers

Unable to indicate the html id for password field and not able to login to the page using Win Forms

enter image description here [https://i.stack.imgur.com/zPxLj.png]Trying to login to an Intranet site using WinForms and C#. Following is the code for login - webbrowserObject.Document.GetElementById("USER").SetAttribute("value", Properties.Settings.Default.UserEmail); webbrowserObject.Document.GetType("password").SetAttribute("Value", Properties.Settings.Default.UserPassword); webbrowserObject.Document.GetElementById("loginbtn").InvokeMember("submit"); Getting following error - Severity Code Description Project Path File Line Suppression State Error CS1501 No overload for method 'GetType' takes 1 arguments [...] read more
c#
winforms
0votes
1answer

Opening a Page in a Frame from a separate Frame/Page

I have a MainWindow with a Stackpanel full of buttons. I click on a button and a Frame(Frame1) is populated with a Page(page1). Page1 has its own stackpanel with a list of buttons. I also have Frame2 to the right of Frame1. Both Frame1 and Frame 2 are in the [...] read more
wpf
0votes
1answer

Parameter type cannot be null

I'm trying to execute an sp in ef core. I have defined a data model class for the sp results. It's been added as a DbSet in the context public class GroupedCountResult { [Required] [Column("varchar(100)")] public string Title { get; set; } [Column("varchar(20)")] public string Colour { get; set; } [...] read more
asp.net-core
ef-core-2.2
0votes
0answers

How to merge structure of two DataTables into one c#?

I have two data tables and want merge columns and create as third table. Do not want to lose ExtendedProperties so not Selecting DataColumn.ColumnName and adding as columns. Code: DataTable dt1 = new DataTable(); dt1.TableName = "dt1"; dt1.PrimaryKey = new DataColumn[] { dt1.Columns.Add("A") }; dt1.Columns.Add("B"); dt1.Columns.Add("C"); dt1.Columns.Add("D"); DataTable dt2 = [...] read more
c#
.net
datatable
nullreferenceexception
0votes
1answer

Could not find Nlog or one of its dependancies - edge-js

I'm trying to use this DLL through edge-js. When the code is built as just a simple c# program, it works without any issues. Unfortunately, when the port is coded over to edge-js it has trouble with Nlog, noting that it or its dependancies can't be found. I'm not too [...] read more
c#
node.js
dll
node-modules
nlog
0votes
0answers

Null value returning error all of a sudden

I've had this application running for over a year now with no issue and all of a sudden it's throwing an error on the code below. I have no idea why it started doing this. This is a production application. I've tried a few of the fixes found on the [...] read more
c#
null
nullreferenceexception
0votes
1answer

C# Timer passes null into Elapsed event handler's source parameter

Anytime I try to run this c# timer, the application errors out saying "parameter cannot be null: object source" I based my implementation off of a microsoft docs page. It's worth noting that this happens when the event is synchronous as well. private void SetTimer() { // TODO set to [...] read more
c#
timer
0votes
1answer

Why am I getting first node again on second iteration in this XDocument

I read about XML XDocument and running a few test but now I get the same first node on second lap in the foreach Here´s my C# code for the CRUD get: public IActionResult GetBookItems() { List<BookItem> BookItems = new List<BookItem>(); XDocument doc = _db.GetXmlDb(); foreach (XElement element in doc.Root.Descendants()) [...] read more
c#
asp.net
xml
xdoc
0votes
1answer

How to fix "nullreferenceexception" despite what's being referenced not being null?

Referring to Radio Button's using the below code to try to find the checked button keeps throwing NullReferenceException. I've tried referring to both it's .name and .tag properties, and they both worked on the first couple tries but then they started throwing NullReferenceExceptions, despite no changes to what they would [...] read more
vb.net
0votes
1answer

iText7 WmfImage from byte array throws IO Exception

can someone please confirm this is a bug? Loading a WMF file as WmfImage from a file (see code, method 1) works, but loading it from a byte array (method 2) fails. PdfWriter writer = new PdfWriter(dest); PdfDocument pdf = new PdfDocument(writer); Document document = new Document(pdf); // Method 1: [...] read more
c#
pdf
pdf-generation
itext7
wmf
0votes
1answer

Getting/setting columns with IColumnManager from C#/F#

I want to get and set visible columns in the Details View. I have a shell extension (implemented with a 3rd party library), and I add a menu item to the context menu when the user right-clicks on the folder background. By adding IObjectWithSite to my extension, I've been able [...] read more
winapi
f#
shell-extensions
0votes
1answer

Un-subscribing from event in other events

I'm failing to un-subscribe to an event while using a BackgroundWorker to handle when the un-subscribe event should be fired. I can un-subscribe in the AsyncRunner but not in BackgroundWorker1_RunWorkerCompleted. Context: This is part of a plug-in for Autodesk Revit. We want to update some files in the background but [...] read more
c#
.net
events
event-handling
revit-api
-1votes
1answer

CefSharp Set Object reference for buttons C#?

WinForms: I am new to Cefsharp and C# , just wrote a freeware 'Kid Safe Browser' in VS vb.net in visual basic , but IE11 is too limited . I am getting "Object reference not set" for all Buttons . How to fix this ? For example: How do I [...] read more
c#
visual-studio
cefsharp
winforms-to-web
-1votes
1answer

Form Application registry key

I have using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Media; using Microsoft.Win32; namespace Just_play_sounds_2 { public partial class Form1 : Form { private SoundPlayer soundPlayer; private RegistryKey reg; public Form1() { InitializeComponent(); this.WindowState = FormWindowState.Minimized; } private void [...] read more
c#
.net
windows
forms
-1votes
2answers

Datagrid combobox selectionchanged event argument differ between two pc's

Code: private void updateSeconderyCombobox(object sender, SelectionChangedEventArgs e) { object comboBox = null; if (sender is ComboBox) { comboBox = (ComboBox)sender; } else { comboBox = (TextBlock)sender; } DataGridRow row = (DataGridRow)dataGrid.ContainerFromElement((DependencyObject)comboBox); xyEntry newValues = null; if (row.Item != null) { newValues = (xyEntry)row.Item; } else { return; } Factors fs [...] read more
c#
wpf
combobox
datagrid
-2votes
1answer

How to get object property from a collection

In order to eliminate the need to write a really long Switch Statement, I want to get the object property from a collection that contains data. Here is my code: public class NCAABArchive { private int id; public int HScore; public string Road; public int RScore; public double Line; public [...] read more
c#
object
-2votes
1answer

NullReferenceException for PART_HeaderButton in WPF Calendar

I have a custom control template for my CalendarItem, and it works great except that when you click the month (<Button x:Name="PART_HeaderButton">) the app crashes with: > System.NullReferenceException: 'Object reference not set to an instance of an > object.' Here is most of the error detail. System.NullReferenceException HResult=0x80004003 Message=Object reference [...] read more
wpf
xaml
-3votes
1answer

Object reference not set to an instance of an object when calling a task function to send email

I have the following code in a controller. private ApplicationSignInManager _signInManager; private ApplicationUserManager _userManager; private ApplicationDbContext userDB; public ApplicationUserManager UserManager { get { return _userManager ?? HttpContext.GetOwinContext().GetUserManager<ApplicationUserManager>(); } private set { _userManager = value; } } public async Task SendEmail(string user_id, string subject, string user_email ) { await UserManager.SendEmailAsync(user_id, subject, [...] read more
c#
asp.net-mvc
multithreading
async-await
-3votes
1answer

OpenFileDialog1_FileOk event return NullReferenceException

I have the following code in Visual basic, Visual Studio 2017: Private Sub OpenFileDialog1_FileOk(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog1.FileOk CType(Controls(currEdit), Control).Text = OpenFileDialog1.FileName.ToString() End Sub and I am getting this error that is not resolved ... I am following a video tutorial of making a DOCK / Louncher [...] read more
vb.net
visual-studio
exception

Comments

Leave a comment

(plain text only)

Sources

  1. winerror.h from Windows SDK 10.0.14393.0
  2. https://msdn.microsoft.com/en-us/library/cc231198.aspx

User contributions licensed under CC BY-SA 3.0