KKSK@🌸🎵🌸🎵🌸
KKSK@🌸🎵🌸🎵🌸
CC#
Created by KKSK@🌸🎵🌸🎵🌸 on 2/5/2023 in #help
❔ cast parent to child
Have a problem about inheritance. I have an interface that are shared between a net framework project and net 6 project. Some of methods are called by passing classA object. My idea was to have classB inherits classA so that in the net framework project I can call the method by passing classA. And in the Net 6 project I can cast classA to classB (parent to child). classA is a class with only some enum and properties. classB have some methods that uses libraries which might not be compatible in net framework. However, I learnt from some places that parent to child is not allow Where some places says it is possible by using as and is keyword.
27 replies
CC#
Created by KKSK@🌸🎵🌸🎵🌸 on 12/20/2022 in #help
❔ EntityFrameworkCore
The libraries I am using are Quartz.NET and Discord.NET. I am adding the discord bot with AddHostedService. The job I am scheduling with Quartz.Net basically updates my database every 30 minutes. I would like to enable the discord bot to interact return a query from the database updated by the scheduled job. I was told to add the db with AddDbContext. My worry is that how do I handle concurrency? If both the job is updating it and the bot is reading it.
2 replies
CC#
Created by KKSK@🌸🎵🌸🎵🌸 on 12/10/2022 in #help
❔ Convert unicode characters in json value to Japanese or Chinese or Korean characters.
24 replies
CC#
Created by KKSK@🌸🎵🌸🎵🌸 on 10/29/2022 in #help
[git] Push a directory as a new commit
I am thinking of is it possible to create a new directory and push it as a commit to an existing repo? So this directory originally does not have any .git folder. Instead of cloning the entire repo and delete the directory in the first place. Are there any commands that support this
107 replies
CC#
Created by KKSK@🌸🎵🌸🎵🌸 on 9/15/2022 in #help
HTTPS Local Network No Content Case
I have an AspNetCore HttpGet Api that returns NoContent; is a simple Api for registering an number to the server. I also have other HttpGet Api that returns contents.
1) When the `NoContent` Api is accessed with domain name and https under the same machine where the AspNetCore Web Api is running, I get an error on the browser indicating `ERR_HTTP2_PROTOCOL_ERROR`. And the number is not registered.
This is by accessing the Api on the same machine through chrome with the URL of https://example.com
No option of `Proceed to localhost (unsafe)` is available.
1) When the `NoContent` Api is accessed with domain name and https under the same machine where the AspNetCore Web Api is running, I get an error on the browser indicating `ERR_HTTP2_PROTOCOL_ERROR`. And the number is not registered.
This is by accessing the Api on the same machine through chrome with the URL of https://example.com
No option of `Proceed to localhost (unsafe)` is available.
2) When the `NoContent` Api is accessed with `localhost` and either http or https under the same machine where the AspNetCore Web Api is running, I do not get an error. And the number is registered.
This is by accessing the Api on the same machine through chrome with the URL of http://localhost
With Https, I first get an `NET::ERR_CERT_COMMON_NAME_INVALID`, but after I clicked `Proceed to localhost (unsafe)`, the number is registered.
This is by accessing the Api on the same machine through chrome with the URL of https://localhost
2) When the `NoContent` Api is accessed with `localhost` and either http or https under the same machine where the AspNetCore Web Api is running, I do not get an error. And the number is registered.
This is by accessing the Api on the same machine through chrome with the URL of http://localhost
With Https, I first get an `NET::ERR_CERT_COMMON_NAME_INVALID`, but after I clicked `Proceed to localhost (unsafe)`, the number is registered.
This is by accessing the Api on the same machine through chrome with the URL of https://localhost
3) When the Api with content is accessed with domain name and https under the same machine where the AspNetCore Web Api is running, I am able to load the content successfully.
This is by accessing the Api on the same machine through chrome with the URL of https://example.com
3) When the Api with content is accessed with domain name and https under the same machine where the AspNetCore Web Api is running, I am able to load the content successfully.
This is by accessing the Api on the same machine through chrome with the URL of https://example.com
4) When the `NoContent` Api is accessed with domain name and https under different machine, I do not get an error. And the number is registered.
This is by accessing the Api on a different machine through chrome with the URL of https://example.com
This works either through internet, or on a different machine that connects with the server through PPTP VPN.
4) When the `NoContent` Api is accessed with domain name and https under different machine, I do not get an error. And the number is registered.
This is by accessing the Api on a different machine through chrome with the URL of https://example.com
This works either through internet, or on a different machine that connects with the server through PPTP VPN.
58 replies
CC#
Created by KKSK@🌸🎵🌸🎵🌸 on 9/13/2022 in #help
Use X509Certificate2
1 replies
CC#
Created by KKSK@🌸🎵🌸🎵🌸 on 9/6/2022 in #help
Periodic task
How do you schedule a task if the clock hits XX:50? Without doing subtraction and waiting it. what are the key word to search for?
7 replies
CC#
Created by KKSK@🌸🎵🌸🎵🌸 on 8/21/2022 in #help
RichTextBox not painting
1 replies
CC#
Created by KKSK@🌸🎵🌸🎵🌸 on 8/20/2022 in #help
How do you check if the port is open publicly for AspNetCore?
I kept getting actively refused
4 replies
CC#
Created by KKSK@🌸🎵🌸🎵🌸 on 8/14/2022 in #help
Load local db file to memory
132 replies