Windows error 0x80131537, -2146233033

Detailed Error Information

COR_E_FORMAT[1]

Message"The format of one argument does not meet the contract of the method."
Comment The format of one argument does not meet the contract of the method.

HRESULT analysis[2]

FlagsSeverityFailure
Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode19 (0x013)
NameFACILITY_URT[2][3]
DescriptionThe source of the error code is .NET CLR.[2][3]
Error Code5431 (0x1537)

Questions

5votes
6answers

.NET Core 3.1 CreateHostBuilder Cannot parse JSON file

I am experiencing an error when trying to run my ASP.Net Core 3.1 project. The error is at CreateHostBuilder within Program.cs public class Program { public static void Main(string[] args) { CreateHostBuilder(args).Build().Run(); } public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args).ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup<Startup>(); }); } which has not been edited [...] read more
c#
visual-studio
visual-studio-code
asp.net-core-mvc
3votes
0answers

Windows 10 Store app deployment failed, Invalid URI

DEP0600: Deployment failed. UriFormatException - Invalid URI: The format of the URI could not be determined. [0x80131537] I have a MonoGame UWP app, that will not deploy to the local machine for debugging. I can however, deploy to a remote machine. Update: I pulled my repository into a new, duplicate [...] read more
deployment
uwp
windows-store-apps
windows-10-universal
monogame
1vote
1answer

Upgrading Azure Functions to 5.0 : System.UriFormatException

I have been working on upgrading one of our Azure Functions implementations to .net 5. I have battled may demons already but just as I though I had sorted out all the config and dependency injection changes, it throws a curve ball at me. After host.RunAsync in Main, I get [...] read more
asp.net
azure-functions
.net-5
1vote
1answer

Base64 encoded String that contains exclamation points causing exception

Unfortunately, I cannot post the string as it contains sensitive data. I have created an API that is in use at my company. We have a partner that is attempting to use said API. In a part of the JSON there we expect a base64 encoded string of a digitally [...] read more
c#
encoding
base64
1vote
2answers

Azure App Configuration - How to set a secret

I follow this guide to set up Azure App Configuration. But I think I misunderstand this line: dotnet user-secrets set ConnectionStrings:AppConfig "Endpoint=<your_endpoint>;Id=<your_id>;Secret=<your_secret>" Or rather; what is what... * your_endpoint = I set my Primary Key Connection String (copied from the App Configuration resource in Azure) * your_id = The guid [...] read more
azure
azure-configuration
azure-app-configuration
1vote
3answers

Can't deserialize from ObjectId to String in a MongoDb collection query

Whenever I am trying to get a list of Ids from a collection: var messages = db.GetCollection<MessageExchange>(collectionName); var ids = messages .AsQueryable() .Where(_=> true) .Select(x => x.Id) .ToList(); I am getting a cast error: > System.FormatException HResult=0x80131537 Message=Cannot deserialize a > 'String' from BsonType 'ObjectId'. Source= StackTrace: I am not [...] read more
c#
mongodb
casting
mongodb-.net-driver
1vote
1answer

ChangeStreamDocument.ClusterTime always throws FormatException

I am on Windows 7 using MongoDB.Driver 2.7.0 in a net461/netstandard2.0 dll against a local install of community server 4.0.2 with a single replica set configured. I am listening to a change stream on a collection, but when I simply try to access the ClusterTime property of the resulting ChangeStreamDocument [...] read more
c#
.net
mongodb
1vote
0answers

IgnoreExtraElementsConvention is not ignoring _id during deserialization to POCO objects

I am using version 2.5 of the official MongoDB C# driver and I am encountering an issue where the IgnoreExtraElementsConvention is not being useful to me when a document gets deserialized to a POCO object. The exception i get [snip] System.FormatException HResult=0x80131537 Message=Element '_id' does not match any field or [...] read more
c#
mongodb
deserialization
1vote
1answer

Index (zero based) must be greater than or equal to zero and less than the size of the argument list IBM .net core

I am tying to use IBM DB .NET Provider for MS .NET Core and no matter what I do with creating my context every time I try to use it I get the following error. "Index (zero based) must be greater than or equal to zero and less than the [...] read more
entity-framework
asp.net-core
db2
1vote
1answer

SystemFormatException in RegisterView after adding Username to ASP MVC Identity

I extended the ASP MVC Identity User in my application. Added Username to the model, to all the Viewmodels where it is necesary and also updated my views and Controllers. Entity: public class ApplicationUser : IdentityUser { public string Username { get; set; } public string Country { get; set; [...] read more
c#
asp.net-mvc
asp.net-identity
1vote
1answer

SSIS XML Source Error - Input string was not in a correct format

I have an attribute tlost with the definition below in the XSD file. I have tried both use="required" and use="optional". <xs:attributeGroup name="defense"> <xs:attribute name="tlost" use="required" type="xs:decimal"/> </xs:attributeGroup> In the XML document I am trying to import I will get a value like the following: <defense ast="0" category="special_team" tlost="0" int="0"/> I [...] read more
sql
xml
package
ssis-2012
1vote
1answer

Continue SSIS Package After Error

What I did so far: 1.Set Propagate to False 2.set MaximumErrorCount to high value on ForeachContainer 3. set FailPAckageONFailure to true on each task in workflow 4. set ForceExecutionResult to Success on DataFlow 5. set ForceExecutionResult to Success on Package Yes, the execution is successful enter image description here [https://i.stack.imgur.com/ElLrh.png] [...] read more
xml
sql-server-2008
ssis
oledb
business-intelligence
1vote
1answer

Data Flow Task, XML Source error

I am developing an SSIS application with VS and SQL Server 2008. I am still new to SSIS, however. I have successfully created one project with an XML Task connected to a Data Flow Task. But as part of this same solution I created an identical project with XML Task [...] read more
xml
ssis
xsd
task
0votes
0answers

Microsoft Edge WebView2 - The format of the URI could not be determined

This post is about Microsoft Edge WebView2 control. When working on WebView2WpfBrowser sample from github here, I get the following error at the following code in file MainWindow.xaml.cs file. The sample runs fine except when in the the address bar I type a URL and click on Go button next [...] read more
c#
wpf
webviewchromium
webview2
0votes
1answer

ConfigureAppConfiguration throws UriFormatException when I try to connect to my Azure key vault

I am trying to connect to key vault using Using Client Id & Certificate. I am getting an error. My code was working before adding the .ConfigureAppConfiguration part in Program.cs. Not sure how to summarise the whole process because it's been very lengthy (I have mostly followed a tutorial called [...] read more
c#
azure
ssl-certificate
x509certificate
azure-keyvault
0votes
1answer

FormatException int.Parse() even when passing correct format string value

I am trying to initialize the appsettings to FileUploadSetting object through startup using AddSingleton DI. Even though the value passed to int.Parse() method in different property just to access the converted value of AllowedFileSize is "3145728‬" then also it gives error as FormatException. What i am doing wrong ? appsettings.json [...] read more
c#
asp.net-core
properties
startup
appsettings
0votes
0answers

TimeSpan.Parse Not Working When Processing CSV File

I am trying to upload tracks to my SQL database via a CSV file, but when I try to process the file, I get this exception: System.FormatException HResult=0x80131537 Message=String was not recognized as a valid TimeSpan. Source=<Cannot evaluate the exception source> StackTrace: <Cannot evaluate the exception stack trace> Neither formatting [...] read more
asp.net
vb.net
linq
webforms
0votes
0answers

How to use NewLazyDLL (golang) to custom dll export from c# to set parameters

I wrote a custom dll export in c# which is working in c This is my c# code for dll export [DllExport] /* GetMSLResult from the parameter as lat, lon, and gps elevation */ public static double GetMSLResult(IntPtr lat, IntPtr lon, IntPtr gpsElevation) => Helper.GetMSL(Helper.GetGeoID(Helper.IntPtrToDouble(lat), Helper.IntPtrToDouble(lon)), Helper.IntPtrToDouble(gpsElevation)); which is working [...] read more
windows
go
dll
ffi
0votes
1answer

Adding Accept multipart/related;type=application/octet-stream to HttpRequestMessage throws error

var request = new HttpRequestMessage(HttpMethod.Get, new Uri("http://someurl")); request.Headers.Add("Accept","multipart/related;type=application/octet-stream"); above code throws below exception System.FormatException HResult=0x80131537 Message=The format of value 'multipart/related;type=application/octet-stream' is invalid. Source=System.Net.Http StackTrace: at System.Net.Http.Headers.HttpHeaderParser.ParseValue(String value, Object storeValue, Int32& index) at System.Net.Http.Headers.HttpHeaders.ParseAndAddValue(String name, HeaderStoreItemInfo info, String value) at System.Net.Http.Headers.HttpHeaders.Add(String name, String value) at deleteit.Program.Main(String[] args) in c:\users\310227436\source\repos\deleteit\deleteit\Program.cs:line 14 My [...] read more
c#
http
asp.net-core
.net-core
httpclient
0votes
1answer

Not recognising hours Mins and seconds as part of a valid date format

Trying to parse this string into a datetime variable: var test = "2018 11 24 17 3 57 345"; var format = "yyyy MM dd HH mm ss fff"; var dt = DateTime.ParseExact(dt, format, CultureInfo.InvariantCulture); I get this error: System.FormatException HResult=0x80131537 Message=String '2018 11 24 17 3 57 345' was [...] read more
c#
date-conversion
0votes
1answer

BulkWrite operation in MongoDB failing with invalid escape sequence

I am running the code below and receiving the subsequent error: Code: using MongoDB.Bson; using MongoDB.Driver; using System.Collections.Generic; namespace MongoBulkWriteSerializationFailure { class Person { public string Firstname; public string Lastname; } class DummyClient { private IMongoCollection<BsonDocument> _collection; public DummyClient() { _collection = (new MongoClient("mongodb://root:password@localhost:27017/")).GetDatabase("my_db").GetCollection<BsonDocument>("persons"); } public void Upsert(Person person) { [...] read more
c#
mongodb
0votes
2answers

Message=Input string was not in a correct format. in c#

The following exception is being thrown in the first while loop that I convert to double: System.FormatException HResult=0x80131537 Message=Input string was not in a correct format. Source=mscorlib StackTrace: at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) at System.Convert.ToDouble(String value) at WindowsFormsApp6.Form1.button1_Click(Object sender, EventArgs e) in C:\Users\King\source\repos\WindowsFormsApp6\WindowsFormsApp6\Form1.cs:line 52 at System.Windows.Forms.Control.OnClick(EventArgs e) at [...] read more
c#
-1votes
1answer

Input string was not in a correct format. vb.net

I am trying to sum the contents of two text boxes one of them having data from a database but I keep getting the error above with these details System.FormatException HResult=0x80131537 Message=Input string was not in a correct format. Source=mscorlib StackTrace: at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, [...] read more
vb.net
textbox
-1votes
1answer

Many date format conversion

I need function to standardize date format. I have string with date: 2015-12-01T00:00:00+00:00, 12/31/2018 01:00:00 etc. I try this code: public static DateTime ToDateTime(this string date) { return DateTime.ParseExact(date, "yyyy-MM-dd", System.Globalization.CultureInfo.InvariantCulture); } but I have error: System.FormatException HResult=0x80131537 Message=The string was not recognized as a valid DateTime element. Source=mscorlib Ślad [...] read more
c#
-2votes
1answer

After converting from csharp to vb when using an online converter

The csharp code works perfectly but when i convert it, it's not working, i dont know what i am doing wrong. It compiles, but when i click the button to call the function, it gives me the error below, Help will be appreciated, thank you. Csharp code: private void button1_Click(object [...] read more
vb.net
-3votes
1answer

Unhandled IO error in a bootstrapper WPF(C#) .cs

New errorenter image description here [https://i.stack.imgur.com/0SgXg.png]Okay so I get an error and I don't know how to fix it, any help will be gladly welcome. it's in WPF 2019 visual studio. It's a .cs program [program.cs] at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) at System.Uri..ctor(String uriString) at Bootstrapper.Program.Main(String[] args) in [...] read more
c#
.net
wpf
visual-studio

Comments

Leave a comment

(plain text only)

Sources

  1. https://github.com/dotnet/coreclr/blob/v1.1.0/src/inc/corerror.xml
  2. https://msdn.microsoft.com/en-us/library/cc231198.aspx
  3. winerror.h from Windows SDK 10.0.14393.0

User contributions licensed under CC BY-SA 3.0