Questions tagged [.net-2.0]
The 2.0 version of the .NET Framework. For questions on .NET Framework generally, use the .net tag.
2,577
questions
1
vote
1
answer
85
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 ...
0
votes
0
answers
26
views
How do I check user account has log on as service permission or not using c# in .Netframework 2.0
How do I check whether user account has log on as service permission or not using .Netframework 2.0 in C#
Path: Local Security Policy -> User Rights Assignments-> Log on as a service
0
votes
3
answers
162
views
TimeSpan.Parse of string including days dd-hh:mm:ss
The time span I want to parse is of the format dd-hh:mm:ss
It is the output by the Linux command that returns how long a process has been running.
Example:
string s = "5-15:10:20"; // 5 ...
0
votes
1
answer
51
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 ...
1
vote
2
answers
1k
views
unity c#, unable to acces a variable form another script
I would like to acces a variable called cooldown from another script called BulletScript and i cant figure out what's wrong with my codes.
Here are my codes:
1st:
using UnityEngine;
public class ...
0
votes
1
answer
118
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
41
views
Why can't I update my dates in database from 01/01/1753?
when I update and insert dates into my database they always come out as 01/01/1753
code for updating
cmd.Parameters.Add("@regdate", MySqlDbType.Date).Value = datereg.MinDate;
cmd.Parameters....
0
votes
0
answers
116
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
vote
1
answer
303
views
How do I compile a simple WinForms C# application for .NET Framework 2.0 in Visual Studio 2005 or 2019?
I need to create a very simple WinForms C# application that only requires .NET Framework 2.0 to execute properly (due to the fact that the customer isn't allowed to upgrade or connect his computer to ...
-1
votes
2
answers
50
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
1
answer
128
views
Is it possible to change the function of a button when I click on another button?
Let's say I have an add and edit button. both of these buttons bring up the same form and have the same save button inside the form. when I click on save after clicking the add button it inserts into ...
0
votes
0
answers
53
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
32
views
How do I display my datagrid view items to textboxes in a another form?
I am trying to display items from my data grid view but when I click the button to get an error saying that the index cannot be negative, must be less than the size of the collection and it is out of ...
0
votes
1
answer
294
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 ...
1
vote
1
answer
349
views
Get screen height and width in cosmos C#
How would I get the screen height and width in C# Cosmos?
I'm making a OS and I'm doing GUI and I need the center point for a welcome text.
Like:
int centerX = SCREENWIDTH / 2;
// and
int centerY = ...
0
votes
1
answer
28
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. ...
0
votes
0
answers
1k
views
Keyword not supported :Column Encryption Setting=enabled
I am having an issue with missing column encryption in ASP.NET web.config file.
I add: Column Encryption Setting=enabled but I get an error:
Keyword not supported
My Code:
string connectionString = &...
1
vote
1
answer
239
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
614
views
How to find Npgsql dll for .net 2.0
I have Solution in vs 2010 with many projects that are build in .net 2.0, but now I want to add a project that will make Npgsqlconnection, the issue is that I don't know how to find Npgsql.dll for ....
1
vote
1
answer
105
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
1
answer
287
views
Task failed because "LC.exe" was not found, or the .NET Framework SDK v2.0 is not installed
Anyone have the same problem with me? With visual studio 2005.
Task failed because "LC.exe" was not found, or the .NET Framework SDK v2.0 is not installed. The task is looking for "LC.exe" in the "...
0
votes
0
answers
12
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 ...
0
votes
1
answer
575
views
Run .NET 2.0 targeted DLL in a .NET 4.5 Executable
I have very simple C# library (we'll call it myApi.dll) targeted for .NET 2.0 that executes a simple database insertion. I underlying requirements must keep it at .NET 2.0. When I reference myApi.dll ...
8
votes
3
answers
163
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
vote
1
answer
191
views
.NET "Appcmd migrate config" fails with "user name or password incorrect"
I tried to run this from the command prompt (run as administrator):
appcmd migrate config "Default Web Site/"
I get this error:
ERROR ( hresult:8007052e, message:Command execution failed.
The user ...
-1
votes
1
answer
147
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
0
answers
161
views
What is the latest Serilog version compatible w/ vb.Net 2.0 (yeah, I know...) if any?
Our outfit has been standardizing on Serilog logging, and I would like to utilize it, if practical, with a new app I'm building on the vb.Net 2.0 target framework (long story...).
I'll go with .TXT ...
0
votes
2
answers
171
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 ...
0
votes
0
answers
141
views
UDP listener only receives first incoming message - how to keep receiving additional messages?
I'm trying to build a simple Windows Forms app in VB.net (.net Framework 2.0 in order to support Windows XP) which allows multiple client PCs to send short text strings as UDP messages to a listening "...
1
vote
1
answer
485
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 ...
3
votes
0
answers
71
views
What is the equivalent task in .NET 2.0?
I know .NET 2.0 is really old now, but I have code that I want to compile under .NET 2.0. Unfortunately, the source uses .NET 4.0 System.Threading.Tasks
Here is the code:
public override string ...
0
votes
1
answer
33
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
3
answers
2k
views
How to fix Visual Studio 2019 "The C# Project is targeting ".NETFramework,Version=v2.0", which is not installed on this machine
I have installed VS2019 on the E: drive of my machine rather than the smaller c: boot drive. I had it installed before I Wiped the machine on the c: drive and it took up WAY to much space. Now It ...
0
votes
1
answer
84
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
1
answer
105
views
Error installing Saxon 9.5 on .NET 2.0 project with package manager
I'm trying to install Saxon 9.5 HE (which is the last version being supported on .NET 2.0 as you can see on their official documentation) on Visual Studio 2012 Professional. This is what I get.
PM>...
0
votes
0
answers
33
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....
1
vote
1
answer
70
views
C# multithreading on net 2, firebird database cancel and restart, how?
In winform app, I have DataGridView and thread which is loading data from database when user press button.
This loading is done on another thread, I don't know how to make the following scenario:
...
0
votes
1
answer
53
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
0
answers
121
views
Multipart/form-data requests in .NET 2.0
I am trying to create a Multipart/form-data POST request in a .NET 2.0-project for a work assignment. However, from what I understand the MultipartFormDataContent Class wasn't introduced until .NET 4....
0
votes
2
answers
58
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:
...
-2
votes
2
answers
1k
views
C# Sort a Dictionary<string,float> in descending order by value - without Linq in .net 2.0
How do you sort a generic dictionary(string,float) in descending order by value without using Linq, using only features available in .net 2.0.
Just a note that I am not looking to sort the values by ...
0
votes
3
answers
255
views
How to copy data to another list without linq and without altering the original list
In GetMaxPrice() method, changes made to the copy list in the foreach loop is reflected on the originalList! I am using .Net 2.0 (ToList() and Linq are not available)
public class DataPair : ...
1
vote
1
answer
262
views
XML Serialization over TCP Issues
Just testing a simple example program, for sending an XML Serialized object over TCP. I'm finding that unless I close the stream or TcpClient on the side that sends a serialized object, the receiver ...
1
vote
0
answers
631
views
C# - System.Net Socket.Listen Backlog only one connection issue
I've a problem with the backlog parameter from socket.listen.
System.Net.IPEndPoint ep = new System.Net.IPEndPoint(System.Net.IPAddress.Any, 556);
Socket server = new Socket(ep.AddressFamily, ...
0
votes
2
answers
50
views
Sort a list based on an item inside the list that is another list
As the titel says, but it gets even more complicated. this is some example code
class person
prop name as string
prop age as int
prop properties as List(of ExtraProps)
class ExtraProps
prop key as ...
0
votes
1
answer
35
views
ASP.NET 2.0 VB Client passing dateime as 01/01/0001 00:00:00 to WCF Service
I have a wcf web service written in .NET 4.5 and it works ok with a website created using 4.5 and our unit tests.
We have connected it to an older .net 2.0 web project and are passing the date ...
1
vote
1
answer
92
views
trimming/splitting a string to get a street and number
I'm trying to figure out how i do this in the best way. i'm working in .NET 2.0 in VB.NET(this is not optional). here is my problem.
I got a string that contains a street and a number. lets say "...
1
vote
1
answer
1k
views
DataTable Column CaseSensitive in Turkey
I have a customer in Turkey who had a problem recently that he couldn't use one of our components. The component is written in C# .Net 2.0 and uses a DataTable which has several columns. If I access a ...
0
votes
1
answer
155
views
Code injection does not work with MSCorLib in .Net 2.x
In our .Net application, we want to keep track of a file that is getting opened through .Net Code. Any file that is getting opened, execution call always pass through an internal instance method ...
1
vote
3
answers
3k
views
C# programmatically edit my .NET assembly at runtime
I have a .NET assembly that is built by me but would like to be able rewrite the .DLL with some minor but arbitrary attribute change file at runtime. Specifically I would like to be able to change a ...