2,575 questions
0
votes
0
answers
16
views
UnauthorizedAccessException when writing to the registry .Net Framework 2.0
I'm playing with Visual Basic .Net 2005. I wanted to create a program that can write to the registry.
This gives me an UnauthorizedAccessException:
Dim myKey, softwareKey As Microsoft.Win32....
3
votes
1
answer
86
views
FileInfo behaves differently on .NET 2 and .NET 4.8
I have converted a legacy application from .NET 2 to .NET 4.8 and found that the FileInfo API behaves differently on the 2 platforms.
.NET 2:
new FileInfo("C:\a \b").FullName -> "C:\...
0
votes
0
answers
162
views
Existing Encryption and Validation method in Machine Key of IIS suddenly stops working
My application is hosted on IIS and it is previously working on SHA 1 and Auto Encryption and Validation method but suddenly it stops working on one server The same application is synced on other ...
0
votes
1
answer
481
views
Why add-migration command is giving error although build succeeds in Visual Studio using .NET
I'm new to .NET and keep getting the following error when executing add-migration command in Visual Studio 2022.
Error Details
You must install or update .NET to run this application.
App: C:\Users\...
1
vote
0
answers
29
views
XmlSerializer much slower when a different constructor for it is used [duplicate]
In .NET 2 I have the following code, which works okay:
public static T DeserializeStream<T>(this Stream xmlStream)
{
XmlSerializer serializer = new XmlSerializer(typeof(T));
using (...
1
vote
1
answer
800
views
C# NET. Framework 2.0 | Make a delay?
How can I make my program wait 1 Second and then doing something?
Like in NET. Framework 4.8 with Task.Delay() but I'm using NET. Framework 2.0 for a project for my old Windows 2000 Laptop. Is there ...
1
vote
1
answer
493
views
Webclient doesnt like UrlEncoded slash. How to make it work?
I'm trying to pass an URL to an API using a .net 2.0 webclient (unable to upgrade). The webclient call only works if there are no slashes in the encoded value. Any idea why it is failing and how to ...
0
votes
1
answer
345
views
How do I refresh my datagrid view from another form after I insert and update my values inside my database?
I am not sure how to proceed with refreshing the data grid view after I update and insert values into my database. I know that I have to bind the database values to the other form so that they will ...
0
votes
0
answers
352
views
Why is my datagrid not updating after I update my database?
so I have this refresh and populate function here
private void Refresh()
{
MySqlCommand cmd = conn.CreateCommand();
String data, id, platenumber, brand, model, yearmodel, odometer;
cmd....
-1
votes
2
answers
144
views
Updating my database won't work because of incorrect syntax for MySql
I am trying to update my database but then this error about my syntax shows up
MySql.Data.MySqlClient.MySqlException: 'You have an error in your SQL syntax; check the manual that corresponds to your ...
0
votes
0
answers
277
views
Why do I have a missing column in my datagrid view table?
I have a Datagrid view and 1 column is missing even though it is present inside the database
this is my DGV
and this is my table in the database
i am unsure why the model column is missing but I am ...
0
votes
1
answer
941
views
How do I get the id of the selected row from my database in a datagridview control?
this is my data grid view
I want to get the ID when a row is selected but when I select a row and click delete it doesn't seem to get the id of that row and goes for the else statement instead. here ...
0
votes
1
answer
47
views
How to post to an API using aspnet 2.0
A service a subscribed to uses an api and provided this sample php bellow.
I have an old aspnet script which i want to modify to do the same but as i am not a programmer and having hard time with it. ...
1
vote
1
answer
373
views
Visual Studio .net standard library template breaks using directive?
I'm currently trying to learn a bit about .NET and get back into programming with C#. To do both I'm following this official tutorial on how to create a .NET standard class library.
One of the first ...
1
vote
1
answer
128
views
A strange question about Null-conditional?
env: VS2017 v15.9.24, .net framework 2.0 c# console project.
this is a very simple console project, no any reference, all codes are in program.cs:
namespace ConsoleApp1
{
class Program
{
...
0
votes
0
answers
20
views
Deploy Umbraco v4 site on .net3.5 or .net4.7
I have an old Umbraco website (v4.0.1) that works on Windows Server 2012, IIS 8.5, .net2.0 classic. I now want to deploy the site onto a shared windows server running .net4.7 / .net3.5 in classic or ...
8
votes
3
answers
490
views
Possible to run all handlers for a policy in-line instead of with an attribute?
On most of my APIs, I simply do authorization like this:
[Authorize(Policy = "Foo")]
public MyApi()
I get this policy from a NuGet though and can't modify it.
For some of my APIs, I don't always ...
-1
votes
1
answer
360
views
Crystal Report Problem with rtl language and slash contained string
I use Crystal Reports to get different reports.
I am using asp.net 2.0 and crystal Report version 10
The problem is that some of the commodity names in the system are a combination of letters, numbers,...
0
votes
2
answers
273
views
JSON to Dictionary C# .Net 2.0 Standard
I am downloading a JSON in the following format (which I can not change):
[
{"Id":183,"description":"blahblahblah"},
{"Id":184,"description":"blehblehbleh"},
{"Id":1000,"description":"and ...
1
vote
1
answer
1k
views
OAEP with SHA1 and MGF1 with BouncyCastle?
I am trying to do RSA/ECB/OAEPWithSHA1AndMGF1Padding with c# using BouncyCastle on .NET Framework 2.0.
I've came down with this:
IAsymmetricBlockCipher engine = new OaepEncoding(new RsaEngine(), new ...
0
votes
1
answer
92
views
How can i know the permissions that i have in a specific folder with caspol?
I have a WFA, and I need to know the permissions that the active user has in a specific folder.
How can I use caspol to find the permissions?
0
votes
1
answer
197
views
Runtime error while opening a windows form of a .net 4.5 project from .net 2.0 project
I have two .net projects in my solution.First project is .net 2.0 windows forms project and the second project is .net 4.5 windows forms project.I'm opening a windows form of my .net 4.5 project from ....
0
votes
0
answers
56
views
MDi background image make animated sub form appear slow
I have a panel and a timer which is helping me to open a form in an animated way.
The panel contains a form.
code is
private void timer1_Tick(object sender, EventArgs e)
{
if (panel1....
0
votes
1
answer
63
views
Retatrget every SQL statement before its execution
I need some help with my C# application.
Nowadays it works fine but one of the new requirements from customer is to implement underlying Database (MS SQL or Oracle) using any user schema selectable ...
0
votes
2
answers
62
views
How to Add Sub-Totals without LINQ
I work in a place where the in-house clients all have old version of .NET so I need to get by without LINQ. I am trying to achieve something pretty simple. The list of my class looks like this:
...