.net

Best way to track down a memory leak (C#) only visible on one customer's box

What is the best way to track down a memory leak that is only found on one customer's test/release box, and no where else? ...

Socket programming: Do some ISP's impose rate-limiting on FTP uploads?

I'm currently trying to debug a customer's issue with an FTP upload feature in one of our products. The feature allows customers to upload files (< 1MB) to a central FTP server for further processing. The FTP client code was written in-house in VB.NET. The customer reports that they receive "Connection forcibly closed by remote host" er...

.Net Regex ValidationExpression ASCII

Anyone know a good Regex expression to drop in the ValidationExpression to be sure that my users are only entering ASCII characters? <asp:RegularExpressionValidator id="myRegex" runat="server" ControlToValidate="txtName" ValidationExpression="???" ErrorMessage="Non-ASCII Characters" Display="Dynamic" /> ...

What's the best way for a .NET windows forms application to update itself?

I use a home-grown system where the application updates itself from a web service. However, I seem to remember something in the original .NET sales pitch about auto-updating of components being a built-in feature of .NET. What are the best practices for having an application update itself and/or the assemblies it uses? ...

What's the best way for a .NET winforms application to update itself without using ClickOnce?

For technical reasons, I can't use ClickOnce to auto-update my .NET application and its assemblies. What is the best way to handle auto-updating in .NET? ...

Create Excel (.XLS and .XLSX) file from C#

What is the best tool for creating an Excel Spreadsheet with C#. Ideally, I would like open source so I don't have to add any third party dependencies to my code, and I would like to avoid using Excel directly to create the file (using OLE Automation.) The .CSV file solution is easy, and is the current way I am handling this, but I...

When should I use GC.SuppressFinalize()?

In .NET, under which circumstances should I use GC.SuppressFinalize()? What advantage(s) does using this method give me? ...

How do I get the Local Network IP address of a computer programmatically? (C#)

I need to get the actual local network IP address of the computer (e.g. 192.168.0.220) from my program using C# and .NET 3.5. I can't just use 127.0.0.1 in this case. What's the best way to do this? ...

Can I use "System.Currency" in .NET?

Is it possible to use system.currency. It says system.currency is inaccessible due to its protection level. what is the alternative of currency. ...

Is there a CLR that runs on the CLR ?

I was wondering if there was a .NET-compatible CLR that was implemented using the CLI (common language infrastructure), e.g., using .NET itself, or at least if there were any resources that would help with building one. Basically, something like a .NET program that loads assemblies as MemoryStreams, parses the bytecode, constructs the t...

.NET Winforms Deployment

Is there anyway to combine all resources into a single exe file such as app.config and associated DLL's? Some applications seem to do this such as eMule. I don't want my app.config sitting there waiting to be edited. Thanks ...

How to solve HTTP status 405 "Method Not Allowed" when calling Web Services

I've got a siluation where i need to access a SOAP web service with WSE 2.0 security. I've got all the generated c# proxies (which are derived from Microsoft.Web.Services2.WebServicesClientProtocol), i'm applying the certificate but when i call a method i get an error: System.Net.WebException : The request failed with HTTP status 405: M...

What is the difference between String.Empty and ""

In .NET, what is the difference between String.Empty and "", and are they interchangable, or is there some underlying reference or Localization issues around equality that String.Empty will ensure are not a problem? ...

Should I provide a deep clone when implementing ICloneable?

It is unclear to me from the MSDN documentation if I should provide a deep or a shallow clone when implementing ICloneable. What is the preferred option? ...

Asynchronous WPF Commands

Note: The code in this question is part of deSleeper if you want the full source. One of the things I wanted out of commands was a baked design for asynchronous operations. I wanted the button pressed to disable while the command was executing, and come back when complete. I wanted the actual work to be performed in a ThreadPool work ...

Infragistics V7.3 vs. V8.1

We are using the Infragistics controls for .net (both ASP.Net and WinForms) for a few years. We want to upgrade our current version (v6.3) and are in a pickle. We can upgrade to v7.3 or v8.1 but not to a later one due to licensing limitations, and we don't want to spend more money on licenses unless it is really necessary. Rumor has it t...

WPF Commands and Parameters

I'm finding the WPF command parameters to be a limitation. Perhaps that's a sign that I'm using them for the wrong purpose, but I'm still giving it a try before I scrap and take a different tack. I put together a system for executing commands asynchronously, but it's hard to use anything that requires data input. I know one common pat...

Custom Sorting of a DataSet Column

I have a DataSet that contains a few columns. One of these columns is a number - most of the time. Because it's occasionally a string, in the database it's a varchar(10) column. However, when you sort a varchar column, it sorts it like a string. What I want to do instead is to try and override this somehow so that it sorts the integers ...

Storyboards cant find ControlTemplate elments.

I've created some fairly simple XAML, and it works perfectly (at least in KAXML). The storyboards run perfectly when called from within the XAML, but when I try to access them from outside I get the error: 'buttonGlow' name cannot be found in the name scope of 'System.Windows.Controls.Button'. I am loading the XAML with a stream read...

Are .NET framework updates pushed to every user of windows-updates?

Does Microsoft force an update down to all of its users of windows-update? Is it for legal reasons? EDIT(aku): Question was reformulated. if you want to know which version of Windows comes with .NET see this topic: http://stackoverflow.com/questions/71390/which-operating-systems-come-with-net ...