.net-3.5

C# WinForms application: stop / interrupting a Windows Forms application

Environment: .net 3.5 WinForms application I am looking for some ideas how to stop / interrupting a Windows Form application, e.g. when “something” takes too long. A typical scenario is reading large amount of data from a backend system and the user shall be able to press some key immediately stopping the loading. Normal events are no...

How do you manually refresh a window in WPF?

I'm using the ICommand interface to perform binding on a couple of buttons in my application, the Run and Close button. I'm using a helper method that was mentioned in this question to hook up the ICommand to a delegate as follows: _someCommand = new DelegateCommand(this.DoSomething, this.CanDoSomething); private ICommand _someCommand;...

Multi-Threaded applicaiton has poor performace on a machine?

I have created a multi-threaded application that runs fine on every system except for one. The system is a windows 7 home edition setup. The 2 systems is running fine on are windows 7 Ultimate. Instead of each thread running independently, they seem to run in tandem. Also it runs really slow. It is really strange. I think the system is ...

.NET Multithreading help...

I have an application I have already started working with and it seems I need to rethink things a bit. The application is a winform application at the moment. Anyway, I allow the user to input the number of threads they would like to have running. I also allow the user to allocate the number of records to process per thread. What I have ...

Which collection type to use?

I have a scenario where I have a list of classes, and I want to mix up the order. For example: private List<Question> myQuestions = new List<Question>(); So, given that this is now populated with a set of data, I want to mix up the order. My first thought was to create a collection of integers numbered from 1 to myQuestions.Count, a...

HtmlGenericControl and id

Hello, It's there a way i can control the ID of my HtmlGenericControl. I try to create my own HtmlGenericControl and override UniqueID, ClientID, onPreRender etc ... but nothing work ...

Benefits of .Net's AppSettingsReader vs ConfigurationManager for reading application configuration settings

Is there a substantial difference between the AppSettingsReader class and the AppSettings member of the ConfigurationManager class in .Net 3.5? I'm building out some legacy code and a previous developer used AppSettingsReader.GetValue(), whereas I am more prone to use ConfigurationManage.AppSettings.Get(). Looking at the internals, App...

Trouble getting a list of a custom class to serialize for user.config

I have the following classes [Serializable()] public class ColumnList { public ColumnList() { ListOfColumns = new List<Column>(); } public ColumnList(string name) : this() { Name = name; } List<Column> ListOfColumns { get; set;} public string Name { get; set; } //Extra method...

How to check if process is not responding?

Is there any possibility to check from code if another process is not responding? The problem is even if the app is crashed and on the Manager's list is marked as 'Not Responding', the Process.Responding property is still returning 'true'. The 'Exited' event and function 'WaitForExit' are do any action if the process is- what is clear-...

Error when executing a stored proc in asp.net

I am attempting to execute a stored proc in asp.net in the code behind. The parameter I am trying to pass is strErrorMessage that contains a value of "The transport failed to connect to the server.; ". The error message when the query gets executed is: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is...

LINQ statement no longer works after being wrapped into an extension method

I had a need for a method that could take a collection of strings, and replace all occurrences of a specific string with another. For example, if I have a List<string> that looks like this: List<string> strings = new List<string> { "a", "b", "delete", "c", "d", "delete" }; and I want to replace "delete" with "", I would use this LINQ...

Need to know if my threading lock does what it is supposed to in .Net?

I have an application that, before is creates a thread it calls the database to pull X amount of records. When the records are retrieved from the database a locked flag is set so those records are not pulled again. Once a thread has completed it will pull some more records form that database. When I call the database from a thread shou...

Nant refusing to use .Net 3.5

I am trying to use nant 0.90 with a visual studio 2008, .net 3.5 project. The nant script is being called by team city. Nothing too complex here. <?xml version="1.0"?> <project name="IPSA System" default="build" basedir="."> <property name="nant.settings.currentframework" value="net-3.5"/> <msbuild project="FS.IPSA.WebAdmin\FS.IPSA....

how to revolve this warning in ASP.Net application?

I get the following as a warning during build of my asp.net application: The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias; using definition from 'c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll' How do i resolve ...

Creating a basic class in asp.net

I am new to the .Net world, and was wanting to create a class so I can learn OOP. I have a .sln file, with multiple projects in that file. I want to create a class that will accept 3 parameters, a "stored proc name", "UserID" and "PageName". The stored proc will log the id of the person who launches a particular page, the page name an...

How can I execute .NET code from a SQL TRIGGER?

We have a website under development that maintains a database. This website is replacing classic ASP pages and FoxPro applications along with new development written in ASP.NET 3.5 (mostly VB, a little C# and some AJAX). However, there are other systems that update our database. Because of those systems that do things like updating st...

prerequisite for "windows communication foundation http activation" on Windows 7

How to I detect if a Windows 7 computer has .NET Framework 3.5.1 feature checked, and in particularly, the "windows communication foundation http activation" feature turn-on? ...

errors when i try to add db from another server to my solution

I have a classic ASP website I am working to try and convert to .NET- one page at a time. I am using VS2010 for this. The development db is on a network share drive, and when I try to debug my application I recieve an error because the BIOS command limit has been reached, as a result of the db being located on a network share drive. Is t...

Does .NET 3.5 allows to use the new features of Windows 7?

Some of the applications running on Windows 7 (Internet Explorer, Google Chrome, in example) use the icon they present in the task bar to show a little progress bar. Is it possible to use that feature using the .NET Framework 3.5? ...

Why does C# compiler kick in the second time?

I have a WinForm app. I compile it, double-click on it. Predictably, csc.exe kicks in, then goes away, and the application comes up. I am assuming that at this point the application has been jitted, so no reason for csc.exe to kick in ever again. I then quit the app and start it again. I see csc.exe kick in again. What's going on...