.net

windows automatic software updates

What are some good solutions for handling automatic web based software updates for windows forms projects? I am aware of microsoft one-click, but am not interested in it at this time. ...

How do I move files from one machine to another using ASP.NET?

Let's say that I have a site where once the user selects a few options, the following (should) happen: Grabs files (in a directory) off of the local machine - works fine so far Moves them to a remote server - this is where I need help Details: The remote server will be found via UNC path (\servername\xyz) I have access to the usern...

How do I allow multi-select in a .NET TreeView?

I'm stuck in .NET 2.0 Windows Forms. It doesn't look like the ability to select multiple nodes doesn't exist in the standard TreeView control. I'm trying to do this for context menu selection. So check boxes aren't an acceptable UI paradigm here. What's the best way to provide that very necessary functionality? ...

Are Microsoft's Own Implementations of Their OpenSource Counterparts Better, and Why?

Microsoft like implementing their own versions of popular open-source frameworks and assemblies, for example: Microsoft's MVC Framework vs MonoRail Microsoft's Unity IoC container vs Castle Windsor / Spring.net / Ninject etc Microsoft's VS Unit Test framework vs nUnit (and various others) Questions: What else has Microsoft 'borrowed...

Converting double array to IComparable array.

I'm trying to create a Quicksort base class using VB.NET, taking it an array of IComparable elements. The signature looks like this: public shared sub Sort(ByVal values() as IComparable) However, when I pass in an array of doubles, the compiler is giving me errors. Dim numbers(100) as double Dim random as new Random(0) for i as in...

Best free ORM tools to use with .NET 2.0/3.5

I'm interested in using an Object-Relational Mapping package for an upcoming project. This project will begin as an ASP.NET application but will have lots of functionality that will eventually be shared with WinForms applications. Can anyone suggest some good, free ORM packages that work well in both ASP.NET and WinForms situations? ...

Storing credit card details

I have a business requirement that forces me to store a customer's full credit card details (number, name, expiry date, CVV2) for a short period of time. Rationale: If a customer calls to order a product and their credit card is declined on the spot you are likely to lose the sale. If you take their details, thank them for the transacti...

Best way to check when a specified date occurs

Are there any classes in the .NET framework I can use to throw an event if time has caught up with a specified DateTime object? If there isn't, what are the best practices when checking this? Create a new thread constantly checking? A timer (heaven forbid ;) )? ...

TCP connection quality in .NET

I have a mission-critical real-time data application that uses a TCP connection between the client and server. In some cases, the connection periodically dies (SocketException). No problem - just reconnect and move on. However, the customers aren't thrilled with these intermittent drops in connectivity. I'd like to know where to point t...

How to set a default value using "short style" properties in VS2008 (Automatic Properties)?

Hi, How can I setup a default value to a property defined as follow: public int MyProperty { get; set; } That is using "prop" [tab][tab] in VS2008 (code snippet). Is it possible without falling back in the "old way"?: private int myProperty = 0; // default value public int MyProperty { get { return myProperty; } set { myPro...

Is there any way I can get .net stack traces in Sql Profiler, or a similar tool?

In my previous job I designed and helped build a run-time(production) Profiler tool that among other cool features was able to give me .Net stack traces for every SQL statement that executed. Think of it as SQL-Server Profiler on steroids. So instead of just seeing SQL statements and duration, you also got the context in which the SQL ex...

Is FxCop's CollectionPropertiesShouldBeReadOnly rule incompatible with the spring framework?

FxCop has the CollectionPropertiesShouldBeReadOnly rule that complains if your class has some kind of collection property that clients can set. Instead, it suggests making the property read-only and supplying a Clear() method and Add() or AddRange() methods for changing the contents of the collection. I agree that makes for a cleaner an...

Is there an equivalent to Java's "kill -3" for a .NET CLR thread dump?

Hi, Java has the thread dump which is triggered by a signal 3 sent to the process (e.g. "kill -3 PID"). The equivalent I've found for .NET is to use ADPlus (http://support.microsoft.com/kb/286350). This basically attaches a debugger, takes a mini dump, and executes a few commands. I find .NET's approach to be a very brute force, cludgy a...

Printing to a specific printer from a web app

If I have a printer hooked directly to a pc (a kiosk with a printer), how would I go about creating the ability for a web page (.net web app) to print a jpg to the kiosks printer with no user intervention other than clicking a button on the page? ...

Change to 64 bits not allowed when trying to edit in debug, why?

I receive this message (see image below) when I try to edit in debugging. This occur only in my Vista64bits OS, not in my XP computer. Why and what should I do? Update I found that I need to compile in x86 to be able to change value when debugging. So my question is WHY that I can't do it in x64? ...

How to serialize nullable DateTime in a .net web service?

I am trying to pass some Subsonic collections to a client via a web service. When I reference the web service the IDE complains with: Cannot serialize member 'EndDate' of type System.Nullable`1[System.DateTime]. XmlAttribute/XmlText cannot be used to encode complex types. Is there any way of serializing nullable complex types in a .ne...

Media support in WPF without Windows Media Player 10+ ?

I'm wondering if it is possible to deploy Windows Media Foundation without Windows media player 10 or 11? Here's the context. I have a WPF application running in a corporate enterprise setting. WPF requires Windows Media Foundation for rich media support. Windows Media Foundation is distributed via Windows media player 10 and 11. The co...

What's the best way to learn .NET?

I've been developing Java EE for quite a while now. I've used WebLogic, Tomcat, Spring, and Hibernate extensively, so I have a mental model of what features are available and how things are developed and deployed. The problem that I have with .NET is that I don't have a clear mapping of its features onto Java EE. Here's what I know so...

Migrating a Delphi 7 application to .NET

Any advice on how to migrate an existing Delphi 7 business application to .NET 2.0 in Visual Studio 2005? Visual Studio 2005 has already been purchased, the company want to move away from the Borland/Codegear tools. The application is a single client server executable, utilitising a number of 3rd party UI controls and Crystal reports...

Microsoft alternative to Jabber?

My organization is considering using Jabber as an agnostic device to device to application messaging protocol. Does anyone know of the best practice existing Microsoft competitor to Jabber? Or, an emerging competitor? And, if so, a good URL reference to get a jump start? Website for Jabber: http://www.jabber.org/web/Main_Page ...