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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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