Metalkon
Metalkon
CC#
Created by Metalkon on 3/8/2024 in #help
Storing Item Information?
Question: I'm making a crafting game with blazor and asp.net as a portfolio project and i'm struggling with deciding how to do something. If I want to save item quantities and such in the users inventory on the database, but general item information (name/description/price/etc) elsewhere for easy changes down the road, what would be the best way to go about this? The saved item information elsewhere would mostly be for display purposes when inspecting an item but also used for a shop for them to buy new materials (price and such). I assume saving to a json/xml may be the way to go, but how to effectively access that information both client and server side is making me wonder without being super inefficient. --- Would this be the way to go here? In a shop controller where a user wishes to buy an iron ingot for 6 gold or something... Create a user object (with the gamedata object which holds inventory/gold/lv/exp/etc), create a iteminfo object from a json, check if user has enough gold for the item id given to the controller, make changes for purchase, save info, update things on client side. On client generate the iteminfo object (json also saved on client) on a page along with an inventory object from the server, page lists the quantities that the user has, and attaches iteminfo information on the items. (And what about dependency injection for iteminfo?)
8 replies
CC#
Created by Metalkon on 2/23/2024 in #help
Blazor WebAsm AuthStateProvider
Question: I am working on new project that will use a custom auth setup based on an old unfinished project. In my old project I used a custom authstateprovider (got it from a .net6 tutorial a year ago, barely know how it works) and i'm wondering if anyone could point me in the right direction? Here's the customauthstateprovider used in my old project https://github.com/Metalkon/Fantasy-Web-App/blob/master/Fantasy%20Blazor/Services/CustomAuthStateProvider.cs I'm trying to figure out how to avoid using this and maybe use something a bit more official, standard, or built-in without changing my backend (it returns a jwt and refresh token atm) but i'm struggling to find useful information currently.
1 replies
CC#
Created by Metalkon on 1/22/2024 in #help
Am I doing this correctly? (Foreign Keys & Such, Entity Framework & SQL Server)
No description
37 replies
CC#
Created by Metalkon on 1/12/2024 in #help
How Do I Add Multithreading In Blazor WebAssembly .NET8?
No description
9 replies
CC#
Created by Metalkon on 11/21/2023 in #help
✅ Fresh Install of Windows, I'm Getting Weird Errors (NETSDK1/NU1012, and DEP0700)
No description
4 replies
CC#
Created by Metalkon on 9/10/2023 in #help
❔ Blazor WebAsm (.NET6) Breakpoints No Longer Working
19 replies
CC#
Created by Metalkon on 9/1/2023 in #help
❔ Entity Framework Migration Issues
3 replies
CC#
Created by Metalkon on 6/1/2023 in #help
❔ Cannot Run A New Project (Angular + ASP.NET Web API)
11 replies
CC#
Created by Metalkon on 3/18/2023 in #help
❔ Passwordless Authentication? (ASP.NET)
What's the simplest way to implement passwordless authentication to an mvc app? I wish to have a simple authentication setup for my app and one that simply sends an email (with url/code) to login with seems to be the easiest of the options that don't hold passwords in my db. (i'm still learning asp.net and don't wanna scaffold the default identity package into my project as it's too much and comes with project creation anyways, struggling to find good tutorials, libraries, frameworks, ect to do this)
14 replies
CC#
Created by Metalkon on 2/20/2023 in #help
❔ Having MSSQL Cert Issues In a ASP.NET Project
Anyone have any idea on how I can solve this issue? It's only a problem with my new .net 6 project even though i'm not having this issue on my .net 5 project which is almost identical. I'm trying to migrate (update-database command) my mssql database with entity framework on a new asp.net core 6 mvc project on visual studio but i've been stumped on this error all day without finding a solution.
Error Number:-2146893019,State:0,Class:20
A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)
Error Number:-2146893019,State:0,Class:20
A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)
I tried doing the instructions on this troubleshooting page but nothing happened, chatgpt isn't saying anything useful, and the google search results i've checked haven't helped much either. https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/connect/error-message-when-you-connect
4 replies
CC#
Created by Metalkon on 2/17/2023 in #help
❔ Becoming An ASP.NET Developer
I spent a good amount of time learning programming and C# last year and I'm currently at the early stages of learning ASP.NET where I can only make very simple mvc projects (ex: crud projects) and have a shallow understanding of how it all works (http requests, pipeline, webdev basic concepts, ef, ect). My goal is to become ready to start sending out resume's as a .NET or ASP.NET developer by this summer. With that in mind what are your thoughts on me just focusing mostly on learning about building API's to link with other project types (like winforms/wpf/maui/unity) and not worry much about mvc or websites?
10 replies
CC#
Created by Metalkon on 9/19/2022 in #help
What am I doing wrong with this deserialized data?
6 replies
CC#
Created by Metalkon on 9/17/2022 in #help
HttpClient only working in Main but not in another Class? [Answered]
27 replies
CC#
Created by Metalkon on 9/10/2022 in #help
ASP.NET Video Recommendations?
I'm trying to find some video's that go over how/why/where all of the code itself in ASP.NET gets passed around that goes over how it all works step by step to enhance my understanding of it so I won't be lost in what i'm doing. Does anyone have any recommendations for such videos? So far the best video I have is this one but i'm trying to even learn more. (he goes over how some of the mvc code interacts with each other in this vid though not much else) https://youtu.be/Ea-Ms6znJpE
5 replies
CC#
Created by Metalkon on 9/5/2022 in #help
XAML Objects?
4 replies
CC#
Created by Metalkon on 9/4/2022 in #help
Is this how all API's work?
https://youtu.be/ZveW4_ZJtVY?t=475 I've always struggled with the concept of what an API actually is in the program since every example has been way too abstract (like restaurant waiters and such) or never showed what it was actually working with. But after watching this video I think i'm finally getting it (url request with information, receive json, etc) but the example is if you're using another's service for your own app/website. Question: Is this how all API's work? Even on ones own website and app speaking between frontend and backend?
5 replies
CC#
Created by Metalkon on 9/2/2022 in #help
XAML Tutorials For MAUI?
Does anyone know if there are any good tutorials/courses out there that teach XAML for beginners who have never touched a markup langauge (not even html) before with the focus on MAUI? I've been checking a few MAUI tutorials and none of them did much to teach XAML itself (it's written structure, both why and how, and other stuff) and I was told somewhere that anything XAML related learned for xamarin/wpf wouldn't even be compatible with MAUI.
2 replies
CC#
Created by Metalkon on 8/29/2022 in #help
Variable Validation
4 replies
CC#
Created by Metalkon on 8/24/2022 in #help
❔ Should a beginner at webdev learn React or Angular for the frontend to go with ASP.NET?
I know that React is a little more popular than Angular overall, but i'm not sure what it's like for asp.net and .net developers.
8 replies
CC#
Created by Metalkon on 8/17/2022 in #help
Would only learning blazor (for the frontend) be enough for a beginner backend developer?
I don't fully understand blazor yet but from what i've gathered it's basically using C# instead of javascript(react/angular/etc) on the frontend. My goal for employment is to become a remote backend web developer and i'd rather avoid having to mess with javascript if possible until a later date while I just focus on learning asp.net/sql/etc.
27 replies