Recent Discussions
Duck Game Crashes
I am hoping that someone here might be able to steer me in the right direction. I have posted in the game's forum, but I am not receiving any support there. I have a new laptop running Windows 11. We are getting frequent game crashes while playing Duck Game. I am wondering if it is a compatibility issue as the game is older. Any help would be GREATLY appreciated. Here is our most recent crash report: System.InvalidOperationException: An unexpected error has occurred. at Microsoft.Xna.Framework.Graphics.GraphicsDevice.DrawUserIndexedPrimitives[T](PrimitiveType primitiveType, T[] vertexData, Int32 vertexOffset, Int32 numVertices, Array indexData, Int32 indexOffset, Int32 primitiveCount, VertexDeclaration vertexDeclaration, _D3DFORMAT indexFormat) at DuckGame.MTSpriteBatcher.FlushVertexArray(Int32 start, Int32 end) in C:\gamedev\duckgame_current_steam\duckgame\DuckGame\src\MonoTime\Render\SpriteBatcher.cs:line 709 at DuckGame.MTSpriteBatcher.DrawBatch(SpriteSortMode sortMode) in C:\gamedev\duckgame_current_steam\duckgame\DuckGame\src\MonoTime\Render\SpriteBatcher.cs:line 485 at DuckGame.MTSpriteBatch.End() in C:\gamedev\duckgame_current_steam\duckgame\DuckGame\src\MonoTime\Render\MTSpriteBatch.cs:line 151 at DuckGame.Layer.End(Boolean transparent, Boolean isTargetDraw) in C:\gamedev\duckgame_current_steam\duckgame\DuckGame\src\MonoTime\Layer.cs:line 897 at DuckGame.Layer.Draw(Boolean transparent, Boolean isTargetDraw) in C:\gamedev\duckgame_current_steam\duckgame\DuckGame\src\MonoTime\Layer.cs:line 1154 at DuckGame.LayerCore.DrawLayers() in C:\gamedev\duckgame_current_steam\duckgame\DuckGame\src\MonoTime\Layer.cs:line 381 at DuckGame.Level.DoDraw() in C:\gamedev\duckgame_current_steam\duckgame\DuckGame\src\MonoTime\Level.cs:line 1081 at DuckGame.Level.DrawCurrentLevel() in C:\gamedev\duckgame_current_steam\duckgame\DuckGame\src\MonoTime\Level.cs:line 198 at DuckGame.MonoMain.RunDraw(GameTime gameTime) in C:\gamedev\duckgame_current_steam\duckgame\DuckGame\src\MonoTime\MonoMain.cs:line 2524 at DuckGame.MonoMain.Draw(GameTime gameTime) in C:\gamedev\duckgame_current_steam\duckgame\DuckGame\src\MonoTime\MonoMain.cs:line 2246 Last 8 Lines of Console Output: Creating ghost (1442) @received Activating NMItemSpawned (2044->2045)((0)(H)LawMac,76561198093753884)(16) @received Activating NMFireGun (2045->2046)((0)(H)LawMac,76561198093753884)(16) @sent Sent NMKillDuck (421)((0)(H)LawMac,76561198093753884)(16) Creating ghost (1443) @received Activating NMItemSpawned (2046->2047)((0)(H)LawMac,76561198093753884)(16) Creating ghost (8879) Creating ghost (8880) Date: 04/19/2024 03:58:56 Version: 1.1.7717.16376 Platform: Windows 10 (Steam Build 8782838)(SFX) Online: 1 (C,0.01582697) Mods: nomods Time Played: 00:39:02 (140607) Special Code: men20 Resolution: (A)1920x1080 (G)1920x1080 (Fullscreen(W))(RF 140420) Level: Content/levels/deathmatch/office01_8.lev Command Line:1.1KViews0likes3CommentsJoin return red in visual studio
Hi everyone, I am newbe in .NET Core, please info what's wrong in my code? i want to join query using EF, but inside the visual studio tools, my join query return red. please see attached image bellow: the join return underline red so i can't run the project. how to fixed it? Thankyou and best regards.17Views0likes0CommentsMaui How to upload a file to web API in .NET 9
Hi, everyone I'm trying to upload an image to an API from a maui project. But when I send the file, the response is always BadRequest. However the API works if I use Postman. I create a client in a console project and it worked. So I don't know why the same code in .NET MAUI it doesn't work. Problem is not in URI or something. I hope you could help me. Reegrets. Victor Cueto API throws the next exception: Microsoft.AspNetCore.Http.BadHttpRequestException: Required parameter "IFormFile image" was not provided from form file. at lambda_method3(Closure, Object, HttpContext, Object) at Microsoft.AspNetCore.Http.RequestDelegateFactory.<>c__DisplayClass103_2.<<HandleRequestBodyAndCompileRequestDelegateForForm>b__2>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context) code Minimal API: error:34Views0likes0CommentsDotnet core Oracle 23c SSL connection not working on Linux environment and works on Windows
Our data direct ADO.NET oracle driver is having an issue with SSL connection on Linux platform and the same connection is working on windows environment with Oracle23c server. Are there any known limitations with dotnet core on linux environment with SSL/TLS connections. Trace : InnerException: System.IO.IOException Message: Unable to read data from the transport connection: Connection reset by peer. Source: System.Net.Sockets Stack Trace at System.Net.Sockets.NetworkStream.Read(Span`1 buffer) at System.Net.Security.SslStream.EnsureFullTlsFrameAsync[TIOAdapter](TIOAdapter adapter) at System.Net.Security.SslStream.ReadAsyncInternal[TIOAdapter](TIOAdapter adapter, Memory`1 buffer) at System.Net.Security.SslStream.Read(Byte[] buffer, Int32 offset, Int32 count) The same application works on Windows environment.268Views0likes3Comments🚀 Kickstart Your .NET Journey with Microsoft Learn!
Hey .NET enthusiasts! Are you new to .NET or looking to refresh your skills? Microsoft Learn has an Introduction to .NET module that walks you through the fundamentals of .NET, .NET Core, and the .NET Framework. This is a free, hands-on learning experience designed to get you started quickly. What you'll learn: The basics of .NET and why it's powerful How .NET supports multiple platforms Running your first .NET application Start learning here: Microsoft Learn Introduction to .NET Have you used .NET in your projects? Share your experiences and let’s discuss below!14Views0likes0CommentsSpecify locale/language for exception messages to user during runtime.
I am using VB 2022 with .NET 8 & 9. I develop applications that allow the user to specify which language they want the GUI elements to be displayed in while the application is running - regardless of what language the users' MS Windows profile is set to. The reason I do this is because some companies (mine included) require all systems to be set to the U.S. English (EN-US) regional/locale settings. This is very easy for me to achieve, even for expected user errors which I can head off. However, unexpected system error messages are always displayed in the English language because the system is set to the English language. Is there any known way to force unexpected error/exception messages to be displayed in a language other than the system's current language? If I knew every single possible error that could be thrown up, as well as its corresponding error code/number, I could create translations myself. But, unfortunately, I have no way of listing every possible system error that could be thrown up during runtime. It would be nice if Microsoft had a COMPLETE list of these somewhere. But every list I've seen is fragmented and incomplete, and sometimes doesn't include a corresponding error code with the message. Try 'Attempt the following block of code. '/////////////////////////////////////////////// ' E X E C U T E S O M E C O D E H E R E ! '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Catch e As System.Exception 'Trap any unexpected system error. MessageBox.Show(e.HResult.ToString & NewLine & e.Message, MyCaption, MessageBoxButtons.OK, MessageBoxIcon.Error) 'Display the error message to the user. End Try Even though the user's system is set to the English language, I want to be able to display the message passed in the 'e.Message' member from the codes sample in whatever language the user has specified their GUI to display in during that application's runtime. Any ideas how to achieve this? BTW... the ability to do this would be an AWESOME feature for Microsoft to add to future .NET releases.14Views0likes0CommentsNeed Advice on Asp.Net MVC project
Hey, I just need advice on my first project. I am highly frustrated rn. I dont know where to start. I am creating a web-application on Asp.Net MVC using Entity framework with SQL server Till now: I find the template and created the layout and index page on mvc Its only me on the project. Its about a week and i am really losing my mind how to connect each dots(specification). To complete my project. I have some question. I am sorry, i dont think, so this is the right platform for this or not. I dont want to waste anyone time here. Thanks for your time and consideration.535Views0likes2CommentsIssue with SignIn Key validation while using Orcid as External login Provider with Identity Server
Hi, I am working on integrating Orcid as second external login provider in my Identity Server based SSO application in Asp.Net Core. I have added necessary configurations in startup.cs file for Orcid provider as below services.AddAuthentication() .AddOpenIdConnect("ORCID", "ORCID", options => { options.SignInScheme = IdentityServerConstants.ExternalCookieAuthenticationScheme; options.SignOutScheme = IdentityServerConstants.SignoutScheme; options.ClientId = {myclientid}; options.ClientSecret = {myclientsecret}; options.Authority = {authorityurl}; options.ResponseType = "code"; options.Scope.Clear(); options.Scope.Add("openid"); // ORCID-specific scope for basic authentication options.Scope.Add("/authenticate"); options.CallbackPath = new PathString({myapplicationpath}); options.GetClaimsFromUserInfoEndpoint = true; options.SaveTokens = true; options.Configuration = new Microsoft.IdentityModel.Protocols. OpenIdConnect.OpenIdConnectConfiguration { AuthorizationEndpoint = "https://sandbox.orcid.org/oauth/authorize", TokenEndpoint = "https://sandbox.orcid.org/oauth/token", Issuer = "https://sandbox.orcid.org" }; options.TokenValidationParameters = new Microsoft.IdentityModel.Tokens.TokenValidationParameters() { NameClaimType = "sub", RoleClaimType = "role" ValidateIssuer = true, ValidIssuer = "https://sandbox.orcid.org", ValidateIssuerSigningKey = true, ValidateAudience = false, // ORCID does not return 'aud' in ID token ValidateLifetime = true, RequireExpirationTime = true }; options.ClaimActions.MapJsonKey(ClaimTypes.NameIdentifier, "orcid"); options.ClaimActions.MapJsonKey(ClaimTypes.Name, "name"); options.ClaimActions.MapJsonKey(ClaimTypes.Email, "email"); options.Events.OnAuthorizationCodeReceived = authorizationCtx => { // access code thru authorizationCtx.TokenEndpointRequest.Code var code = authorizationCtx.TokenEndpointRequest.Code; return Task.FromResult(0); }; options.Events.OnTokenResponseReceived = tokenResponse => { var idToken = tokenResponse.TokenEndpointResponse?.IdToken; var accessToken = tokenResponse.TokenEndpointResponse.AccessToken; Console.WriteLine($"Access Token: {accessToken}"); Console.WriteLine($"ID Token: {idToken}"); // Handle the response manually to prevent further processing tokenResponse.HandleResponse(); // Redirect the user to the callback path (or another page) var callbackUrl = {mycallbackurl}; // Change this to your desired redirect URL tokenResponse.HttpContext.Response.Redirect(callbackUrl); return Task.FromResult(0); }; options.Events.OnRemoteFailure = ctx => { ctx.HandleResponse(); ctx.Response.Redirect("/error?message=" + ctx.Failure.Message); return Task.CompletedTask; }; }).AddJwtBearer(options => { options.Authority = "https://sandbox.orcid.org"; options.Audience = {myclientid}; options.RequireHttpsMetadata = true; }); I am able to login to Orcid and receives authorization code and further receive access token and id token in OnTokenResponseReceived event. But after continuing, gets signature validation error as below IDX10501: Signature validation failed. Unable to match keys: kid: {orcid keyid} token: {token keyid}.... I verified the signin keys at both end and they are correct Can anyone suggest the cause of the error and how to fix it? How can I validate the signin key and return back to my redirect url? Or suggest a complete flow on how to implement this integration. Thanks.36Views0likes0CommentsHow to stop "A potentially dangerous Request.Path" with "<"
Hello, I've been getting "A potentially dangerous Request.Path value was detected from the client (<)." recently and it is causing the application pools in IIS to stop working. The url they are trying to pass through is similar to this: https://test.com:443/cds/pubs/bib/<my_tag_9ac1214b650a30718aced57527fd64c4/> If users can past this URL at any point on my site, how can I stop it from constantly stopping my site and still being safe from SQL injection, Cross Site Scripting or some other vulnerability? Can I encode it before the page is processed so "<" becomes "<"? That way this will not be considered a dangerous Request.Path. Thank you48Views1like0CommentsVersioning my Maui Android App
Previously the way to define version code for Android in Maui .csproj file was like this: <!-- Versions --> <ApplicationVersion>3.1.2</ApplicationVersion> <AndroidVersionCode>3</AndroidVersionCode> With the new release of Visual Studio Preview, this has changed to: <ApplicationVersion>3</ApplicationVersion> It works, from Visual Studio, I can bundle a new .aab package (see image below). We see the version code is defined to 3. Unfortunately the version is defined to 1.0.0 and I don't know how to change this. ...when imported on the Google Play Console, it look like this: Unfortunately, when imported I only see the versionCode 3 (which is defined in the .csproj file as ApplicationVersion). What about the versionName (in parentheses) ? Nothing is planned in the .csproj file ? When imported on the Google Play Console, I don't want to have 3 (1.0.0) but I want 3 (3.1.2)... https://developer.android.com/studio/publish/versioning versionCode — A positive integer used as an internal version number. versionName — A string used as the version number shown to users.25KViews0likes8CommentsSolutions for Blazor problems
Hi, I've significantly reduced render times, section rendering and configuration, API exposure, ... And I am starting thinking of sharing. I've never done this before, so I am wondering how to offer my Blazor framework API. Feacures I've implemented: Defer rendering (on standard component level - as naturalrendering pipeline) Custom sections (with custom state proagation and optimization minimizing render requests - my sections allow for full generic settings usable in section definition component with any amount of RenderFragment or other parameters): <YourSection Param1="StateWatchedParam1" Param2="StateWatchedParam2"> <RenderFragment1> StateWatchedContent with single render on whole section outlet </RenderFragment1> <RenderFragment2> StateWatchedContent with single render on whole section outlet </RenderFragment2> </YourSection> Unit of Work system with unltimited dependency tree of steps described by FluentAPI and accessed only by input model from client side - thus limiting any API exposure. You would have to know descriptor, rights and then guess allowed steps and stil only can fill model with input data - nothing more ... LinQ projector pattern with lego building FluentAPI system - where any business logic can be break into named step in specific named projector, so you are out of ordinary expression tree completely. That projector pattern is correctly written to check for Queryable Provider and to work with the same expression tree also for Enumerable. (Thus the same lego pieces can work for client.) Blazor component messagging done on direct Task API system - so without any queue or backlog. You can directly pass any data between any Blazor component and you are doing it in direct way without any delay or data transfer. Here I have SignalR also in the same system - allowing server to communicate with any component needed. And whole system is communicating with ToastLogger, thus any issue/unhandled exception can be (and it is) instantly logged and toasted to user. Background runner - thus any Task in Blazor can be called to just RunInBackground and it is immediately handled in Task lock mechanism, Exception mechanism and with correct Blazor stae update pipeline thus allowing for partial renders and mid render switch to background process finishing later and rendering from that deferred background.28Views0likes0Comments[ASP.NET CORE] Exchange Web Services Throw HTTP 401 When Called from IIS
Hi, Currently, I can't get Microsoft.Exchange.WebServices to work with Exchange 2019 On-Premise. Send Email feature is working OK on Development but as soon I deployed it to IIS, it stopped working with following error: Microsoft.Exchange.WebServices.Data.ServiceRequestException: The request failed. The remote server returned an error: (401) Unauthorized. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized. at System.Net.HttpWebRequest.GetResponse() at Microsoft.Exchange.WebServices.Data.EwsHttpWebRequest.Microsoft.Exchange.WebServices.Data.IEwsHttpWebRequest.GetResponse() at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request) --- End of inner exception stack trace --- at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request) at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ValidateAndEmitRequest(IEwsHttpWebRequest& request) at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.InternalExecute() at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute() at Microsoft.Exchange.WebServices.Data.ExchangeService.InternalCreateItems(IEnumerable`1 items, FolderId parentFolderId, Nullable`1 messageDisposition, Nullable`1 sendInvitationsMode, ServiceErrorHandling errorHandling) at Microsoft.Exchange.WebServices.Data.ExchangeService.CreateItem(Item item, FolderId parentFolderId, Nullable`1 messageDisposition, Nullable`1 sendInvitationsMode) at Microsoft.Exchange.WebServices.Data.Item.InternalCreate(FolderId parentFolderId, Nullable`1 messageDisposition, Nullable`1 sendInvitationsMode) at Microsoft.Exchange.WebServices.Data.EmailMessage.InternalSend(FolderId parentFolderId, MessageDisposition messageDisposition) I'm using same Exchange Settings (URL, Credentials, etc.) for both instance but it is only worked on Development. My Site is using App Pool User which is registered on Exchange Mailbox Users. How to fix this issue? Thanks in advance. Best Regards, Henoch65Views0likes0CommentsGraph API getAsync() in C#
This is cross posted in Azure as well. If I use graph in a console application I get the information that I request. Such as test = await graphClient.Users.GetAsync(); If I try this in a WebMethod in the code behind of a page or in an .asmx, it never returns with the data. I know this has been mentioned before in many forums, but I did not have issues in V1.0 of the SDK. When I try to use V5+ I can't seem to get the information back. Any ideas on overcoming the issue? Any help would be great.22Views0likes0CommentsHow to install android apps on the computer by downloading apk files form internet in window 11?
I know how to install android apps in computer but there is a problem disturbing me. It can only be done in window 11. Steps to do it-download windows subsystem for android form Microsoft store>Open windows subsystem for android>turn on developer mod>get the Ip address below the developer mode settings or the Ip address in the developer mode turn on off>Turn on Visualization Technology form your BIOS>download SKD platform tools -https://developer.android.com/studio/releases/platform-tools >go to your download folder and extract this developer file and name it as adb and save it>open the adb folder>open platform tools>click the tab at the top bottom where it shows the file location>type cmd>type adb connect and the IP address you got>it will connect but it will show you that it is not connected>keep typing adb connect and your IP address and it will show already to connected to this and this>download a apk file and open the cmd again form the same process of platform tools>go to download folder>cops as path of the apk file>go to cmd>type adb install and paste the path of the apk> it should get installed but the problem showing is adb: error.2.2KViews0likes2Comments[Suggestion 1][Allow Language Selection During .NET Installation]
Hi, 1. Context: Currently, when installing the .NET SDK or runtime, multiple language resource folders are automatically included in the installation directory. 2. Problem: Many developers only require a single language, typically English and the additional localization files take up unnecessary disk space and clutter the installation directory. Currently, the installer does not provide an option to select which languages should be installed. Removing these manually is time-consuming and could potentially break application dependencies if done incorrectly. 3. Proposed Solution: Introduce an option in the .NET installer that allows users to select or deselect language packs during installation. This feature could be similar to the "Individual components" selection available in the Visual Studio Installer, where users can choose exactly what they need, ensuring a more streamlined installation. This would help: Reduce disk space usage. Improve installation customization. Provide a cleaner development environment. 4. What do you think about this suggestion ? Thank you for considering this request and I’m happy to provide additional details or insights if needed.28Views0likes0CommentsConnection between .NET and AUTOCAD ELECTRICAL
I want to connect .NET with Autocad Electrical . i am using , AutoCAD Electrical 2025.0.2 , Product Version : 22.0.81.0 , Built on: V.154.0.0 AutoCAD 2025.1.1 Visual Studio Community 2022 - 17.12.3 my system is x64 bit I am creating a console application in .NET 8.0 Runtime with C# language , Added dll accoremgd , acdbmgd, acmgd, Autodesk.AutoCAD.Interop . Also in .NET in Solution Explorer , in project references , i have made "Copy Local" property as False. using System; using Autodesk.AutoCAD.Interop; using Autodesk.AutoCAD.Runtime; using System.Runtime.InteropServices; using Autodesk.AutoCAD.ApplicationServices; namespace AutoCADElecDemo { class Program { static void Main(string[] args) { AcadApplication acadApp = null; const string progId = "AutoCAD.Application.25"; // Adjust for your AutoCAD version try { // Get a running instance of AutoCAD acadApp = GetActiveAutoCAD(progId); } catch (System.Exception ex) { Console.WriteLine($"Error initializing AutoCAD: {ex.Message}"); return; } try { // Ensure AutoCAD is visible acadApp.Visible = true; Console.WriteLine("AutoCAD is now running."); // Register for the BeginQuit event Application.BeginQuit += OnBeginQuit; // Keep the application running to monitor AutoCAD's state Console.WriteLine("Press Enter to exit..."); Console.ReadLine(); } catch (System.Exception ex) { Console.WriteLine($"An error occurred: {ex.Message}"); } finally { // Unregister the event handler before exiting Application.BeginQuit -= OnBeginQuit; } } static AcadApplication GetActiveAutoCAD(string progId) { try { var comObject = Marshal.GetActiveObject(progId); Console.WriteLine($"Connected to AutoCAD: {progId}"); return (AcadApplication)comObject; } catch (System.Exception ex) { Console.WriteLine($"Error accessing AutoCAD: {ex.Message}"); throw; } } static void OnBeginQuit(object sender, EventArgs e) { Console.WriteLine("AutoCAD is being closed."); } } } For above code, my application comes in break mode "Your app has entered a break state, but no code is currently executing that is supported by the selected debug engine (e.g. only native runtime code is executing)." and i am getting below error : System.IO.FileNotFoundException: 'Could not load file or assembly 'accoremgd, Version=25.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.' dll path is also correct. i also tried same code with .NET Framework 4.7.2 and 4.8 targeting pack , but getting same error. How to load accoremgd.dll properly so that this application can use autocad accoremgd functions properly.43Views0likes0CommentsMysql connection error
Hello, I need help with a connection with C#. I have a database that I just dumped, the connection with the mysql.data tools was working perfectly, but after the dump I get this error: Unable to cast object of type 'System.DBNull' to other types in System.DBNull.System.IConvertible.ToInt32(IFormatProvider provider) in System.Convert.ToInt32(Object value, IFormatProvider provider) in MySql.Data.MySqlClient.Driver.<LoadCharacterSetsAsync>d__81.MoveNext() --- Fine traccia dello stack da posizione precedente dove è stata generata l'eccezione --- in System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in MySql.Data.MySqlClient.Driver.<ConfigureAsync>d__78.MoveNext() --- Fine traccia dello stack da posizione precedente dove è stata generata l'eccezione --- in System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) in MySql.Data.MySqlClient.MySqlConnection.<OpenAsync>d__94.MoveNext() --- Fine traccia dello stack da posizione precedente dove è stata generata l'eccezione --- in System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in MySql.Data.MySqlClient.MySqlConnection.Open() in DBTester.FormMain.btnTest_Click(Object sender, EventArgs e) in C:\Users\... The absurd thing is that if I try several times, on the fourth or fifth attempt it succeeds, has anyone ever encountered this problem, or can they help me figure out what may have gone wrong? Now DB works on MariaDB 11, the old db was on MariaDB 8 What can I verify?52Views0likes1CommentExcelDataReader and Date Field
I am looping through the Excel document saved withing my project (wwwroot) and I cannot get the date to work. I have searched and found a reference to call GetDateTime as opposed to GetValue and also attempted to use ToString() and ToShortDateString(); Cannot implicitly convert type 'string' to 'System.DateOnly' What am I missing? using (var stream = System.IO.File.Open(filePath, FileMode.Open, FileAccess.Read)) { // Auto-detect format, supports: // - Binary Excel files (2.0-2003 format; *.xls) // - OpenXml Excel files (2007 format; *.xlsx, *.xlsb) using (var reader = ExcelReaderFactory.CreateReader(stream)) { do { while (reader.Read()) { BirthModel birth = new BirthModel(); birth.LastName = reader.GetValue(1).ToString(); birth.FirstName = reader.GetValue(2).ToString(); birth.MiddleName = reader.GetValue(3).ToString(); birth.BirthDate = reader.GetDateTime(4).ToShortDateString(); birth.County = reader.GetValue(5).ToString(); birth.Maiden_FirstName = reader.GetValue(6).ToString(); birth.Maiden_MiddleName = reader.GetValue(7).ToString(); birth.Maiden_LastName = reader.GetValue(8).ToString(); } } while (reader.NextResult());49Views0likes1Comment