Questions tagged [.net-2.0]

The 2.0 version of the .NET Framework. For questions on .NET Framework generally, use the .net tag.

Filter by
Sorted by
Tagged with
0 votes
0 answers
61 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 ...
Pratik Wakati's user avatar
0 votes
1 answer
51 views

Why are my input values not binding to my viewmodel?

I am trying to pass input values to an array within my viewmodel. Then loop through the values and save the new changes in each however, every time I submit, the model values come in as null except ...
JavaFox's user avatar
  • 61
0 votes
1 answer
172 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\...
TTR's user avatar
  • 1
0 votes
1 answer
74 views

Legacy .NET CF download - Post-deploy error 0x00000001

Using a Windows CE 6.0 device to deploy a C# application using Visual Studio 2005. The device is specified as Windows CE 5.0 in Visual Studio. VS2005 does not have a smart device option for Windows CE ...
AlainD's user avatar
  • 5,663
1 vote
0 answers
21 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 (...
Patrick's user avatar
  • 677
0 votes
1 answer
37 views

Part of DOM is deleted in ASP.NET 2.0 app on IIS 10

I have an old application built with .NET Framework 2.0 hosted on a server with IIS 10. While using it, some (random) pages are not displayed properly (some scripts aren't executed), and when I check ...
Yasir's user avatar
  • 1
0 votes
1 answer
405 views

What's the Microsoft DI equivalent of Castle.Windsor's DependsOn Dependency.OnValue

I have a .NET Standard 2.0 library which has DI set up in the following way, container.Register(Component.For<IMyFactory>() .ImplementedBy<MyFactory>() .DependsOn(Dependency....
tRuEsAtM's user avatar
  • 3,609
1 vote
1 answer
421 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 ...
user16567291's user avatar
0 votes
3 answers
758 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 ...
Lies's user avatar
  • 516
0 votes
1 answer
310 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 ...
Display name's user avatar
1 vote
2 answers
2k 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 ...
Valentino's user avatar
0 votes
1 answer
250 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 ...
VinceG's user avatar
  • 77
0 votes
0 answers
57 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....
VinceG's user avatar
  • 77
0 votes
0 answers
320 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....
VinceG's user avatar
  • 77
1 vote
1 answer
450 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 ...
arnold_w's user avatar
-1 votes
2 answers
106 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 ...
VinceG's user avatar
  • 77
0 votes
1 answer
438 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 ...
VinceG's user avatar
  • 77
0 votes
0 answers
203 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 ...
VinceG's user avatar
  • 77
0 votes
1 answer
36 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 ...
VinceG's user avatar
  • 77
0 votes
1 answer
746 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 ...
VinceG's user avatar
  • 77
2 votes
1 answer
595 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 = ...
Eli Ozcan's user avatar
  • 432
0 votes
1 answer
38 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. ...
kattouf's user avatar
  • 59
0 votes
0 answers
2k 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 = &...
Noor Alam's user avatar
1 vote
1 answer
316 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 ...
Laporasus's user avatar
1 vote
1 answer
936 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 ....
Beginner's user avatar
1 vote
1 answer
115 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 { ...
ahdung's user avatar
  • 350
0 votes
1 answer
506 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 "...
fsevern's user avatar
0 votes
0 answers
17 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 ...
Bob the Builder's user avatar
1 vote
1 answer
846 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 ...
Jeff Nichols's user avatar
8 votes
3 answers
233 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 ...
user3715648's user avatar
  • 1,518
1 vote
1 answer
278 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 ...
Geosync's user avatar
  • 23
-1 votes
1 answer
275 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,...
mehran esmaily's user avatar
0 votes
0 answers
258 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 ...
T-Bone's user avatar
  • 21
0 votes
2 answers
230 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 ...
Cleber Tavares Jr.'s user avatar
0 votes
0 answers
207 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 "...
Ryan Griggs's user avatar
  • 2,537
1 vote
1 answer
829 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 ...
Guapo's user avatar
  • 3,446
3 votes
0 answers
108 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 ...
김영호's user avatar
0 votes
1 answer
55 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?
jlnc's user avatar
  • 41
0 votes
3 answers
3k 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 ...
binaryCodespace's user avatar
0 votes
1 answer
147 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 ....
Sajith Dushmantha Samarathunga's user avatar
0 votes
1 answer
120 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>...
Andrea de'Rose's user avatar
0 votes
0 answers
41 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....
Sourav Sarkar's user avatar
1 vote
1 answer
104 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: ...
senterd's user avatar
  • 101
0 votes
1 answer
54 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 ...
Alexander's user avatar
  • 1,281
0 votes
0 answers
203 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....
wavejumper's user avatar
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: ...
SAR's user avatar
  • 180
-2 votes
2 answers
2k 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 ...
ina's user avatar
  • 19.2k
0 votes
3 answers
289 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 : ...
Martin's user avatar
  • 3,426
1 vote
1 answer
342 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 ...
Naxin's user avatar
  • 416
1 vote
0 answers
797 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, ...
raiserle's user avatar
  • 677

1
2 3 4 5
52