.net

CouchDB - .NET or Mono Equivalent Technology

Is there any active "document-based" database projects using .NET or Mono? Something similar to CouchDB, SimpleDB, LotusNotes, etc... Prefer open source. I figure the JScript.NET technology could be used for the Map and Reduce functions over stored JSON documents. ...

COM object in C# VS2008: Error loading type library/DLL

I am trying to reference a third party COM DLL from a Visual Studio 2008 project (.NET 3.5 SP1) on Vista Ultimate. I ran the setup for the COM component, and then discovered that it was not the right setup. So I uninstalled and ran the correct install. After adding the reference to a new C# project, not all the object methods are availa...

Windows Shell Integration using .NET

What's the easiest/best way to register your program in explorers right-click menu using .NET and C#? i.e. I would like to be able to right-click on an item in windows explorer and get a "Edit with MyProgram" This is the closest thing to a tutorial I could find but it mostly just dips into Win32 from .NET and is also outdated. How shou...

How Do I get the "friendly" name of serial port in Mono and keep it cross platform

I asked this question: http://stackoverflow.com/questions/434494/serial-port-rs232-in-mono-for-multiple-platforms and this one is related: http://stackoverflow.com/questions/304986/how-do-i-get-the-friendly-name-of-a-com-port-in-windows But I want to be able to get the "friendly" name on Windows- and possibly also on linux /mac if ther...

Excel, OleDb, and Leading zeros

I have a process that using OleDb reads data from an excel file into a DataSet. Everything was working well until I started to see data with leading 0's in it. The text is formatted as General or Text. I have set IMEX=1 in the OleDb connection, yet I still get a null value in the dataset for each entry with a leading 0. Does anyone k...

Split a collection into n parts with LINQ?

Is there a nice way to split a collection into 'n' parts with LINQ ? Not necessarily even of course ...

What happens to sockets when I unplug a network cable?

I have three applications that talk to each other using sockets. They can all live on their own machines but they can also share a machine. Right now I'm having two of them on the same and the third on its own machine. I'm trying to make my communication bullet proof so I unplug cables and kill the applications to make sure everything wo...

WPF Aero Glass DPI Setting Mismatch

I have a WPF application using Aero Glass. When using the application under a 120dpi setting the margins within my UI are not matching up to the margins I pass over to the DwmExtendFrameIntoClientArea API call. How would I get the systems DPI setting within .NET 3.0 so that I can correct the margin that I am passing to the DwmExtendFra...

Clear the HttpWebRequest UnsafeAuthenticatedConnectionSharing Pool

Hi, is it possible to clear the pool of the current processes' UnsafeAuthenticatedConnectionSharing pool, i.e. close all authenticated pooled connections? ...

Mainframe to .NET migration

Hi, What are the various tools available for migrating a Mainframe application (front end, DB, Business Logic) into .NET (C#.NET or VB.NET) and SQL Server 2005. The current Mainframe system has: CICS - front end, COBOL - language IDEAL and DATAComDB - database. Thanks in advance. Ajish ...

c# - Function to replicate the folder structure in the file path.

I need a simple function which will take a FileInfo and a destination_directory_name as input, get the file path from the fileinfo and replicate it in the destination_directory_name passed as the second parameter. for ex. filepath is "d:\recordings\location1\client1\job1\file1.ext the function should create the directories in the destin...

Can object constructor return a null?

We have taken over some .NET 1.1 Windows Service code that spawns threads to read messages off a queue (SeeBeyond eGate JMS queue, but that is not important) and in turn spawns threads to process the message in the target application service. We are continually encountering logic and design decisions that is puzzling us to no end. Here i...

2nd call to Device.Reset in DirectX throws an InvalidCallException

I've been working on a DirectX application in C#, and I noticed that when I lock the workstation, the DirectX "Device" becomes lost. After looking up the information about what to do upon when a device is lost (and when a DeviceLostException is thrown by Device.Present), I re-wrote the code to reset the Device. This simply meant that I m...

What can cause a .NET process/thread to terminate unexpectedly?

I'm trying to gather a complete listing of the reasons a .NET process or thread to terminate, even though the main() method is guarded by a try...catch clause. One such reason is Thread.Abort() (unless you call Thread.ResetAbort). Do you know of more reasons? ...

NHibernate bidirectional collection / key synchronization

I've set up a one-to-many association in NHibernate: Parent (1 -> ∞) Child The problem I now face is that when I set Child.Parent, the Parent.Children collection doesn't automatically contain the new Child. Similarly, when I add a Child to the Parent.Children collection, the Child.Parent property is still null. I could write some co...

Visual Studio: Find the assembly of a class

Me stupid. How can I know which assembly to reference if I just know the name of the class, for example System.Collections.Specialized.StringCollection. (Yes, I know that more often than not I can make an educated guess by looking at the namespace.) Thanks Alex ...

How do you return a user defined type from a WCF service?

I have a WCF service hosted in IIS. The intention is for clients to make a call and receive a custom class that is defined in another project/dll. I have generated a service client using the svcutil.exe. The problem is this autogenerated client contains a new partial / proxy definition for the class I am trying to return from the service...

How sort a System.Collections.Generic.List in VB.Net ?

I using a genric list(m_equipmentList ) which is collection of objects (Schedule_Payitem). How can sort list according to a proerty of child object ? Dim m_equipmentList As New List(Of Schedule_Payitem) Need to sort m_equipmentList on basis of resourceid property of Schedule_Payitem. ...

Image manipulating with WPF

I want to have in my GUI capability for scale, rotate and crop images permanently (saving into the file the changes). WPF is natively capable of it? If it isn't, is there any component that can work more integrated with WPF? I also need to adjust image brightness and contrast, remove borders, for JPEG and TIFF formats. ...

Controlling a UserControl's Storyboard from the parent Window in WPF using only XAML

I have created a very simple test app to try and solve this problem described to me by a co-worker. He was able to trigger it in C#, but I believe he needed the solution to be more generic and wanted it to be done strictly in the XAML. The problem was: How do you trigger the Storyboard inside of a UserControl to begin in response to an...