.net

C#/ASP.NET: Create Database Report?

How would I go about creating a report that retrieves data from a database? ...

what is the best code generator for NHibernate?

what is the best code generator for NHibernate? ...

Custom error handling ASP.NET

I want to use custom exception handling, for example instead of using (Exception ex) i want to use (LoginException ex) or (RegistrationException ex) or (SomeNameException ex) is it possible to design such custom exception handling in ASP.NET webforms? ...

ADO vs DataSet and DataTables

So I didn't see the answer to my question: Is there a difference (performance or otherwise) between ADO vs. DataSet? If so, which is more common? ...

.NET graph library around?

I am looking for Graph libraries for .net. Are there any out? ps: I mean GRAPH libraries, not graphics nor charting libraries! edit: What I mean is graphs, from graph theory: I also need it to have drawing capabilities. ...

.Net - Argument Exception When Trying to Convert Bitmap to JPEG

So I was trying to convert a Bitmap image to JPEG in code and I keep getting this error: An unhandled exception of type 'System.ArgumentException' occurred in System.Drawing.dll Additional information: Parameter is not valid. Here is the related code. All the paths are correct and the EncoderParameter is not null, what ...

Grid with an image, textblock, and rectangle, inside a listbox not showing up exactly right

So I have this Xaml inside a ListBox Item Template: <ListBox.ItemTemplate> <DataTemplate> <Grid Height="22" Width="Auto"> <Image Margin="-2,0,0,0" Source="{Binding Path=ADsPath, Converter={StaticResource ImxConverter}}" HorizontalAlignment="Left" Width="22" /> <TextBlock Margin="20,3,0,0" Text="{Bind...

Fluent Nhibernate - How to specify table name

Hello, I just started learning Nhibernate and Fluent Nhibernate. I want to specify table name when I create my mapping class. Entity name in application is "CustomerOrders" but in the oracle database, table name is "CUSTOMER_ORDERS". I learnt from googling that I can use "WithTable" to specify database table name. I am not sure ho...

Optimized ReaderWriterLock Read Access (C#)

So it's my understanding that on a ReaderWriterLock (or ReaderWriterLockSlim more specifically), both the read and write need acquire a mutex to take the lock. I'd like to optimize the read access of the lock, such that if there are no writes pending, no lock need be acquired. (And I'm willing to sacrifice the performance of writes, add ...

Linq to SQL Cache Dependency

Hi, I'd love to hear people's views on the pros and cons of mixing SQL Cache Dependency with Linq to SQL, as described in this article: http://code.msdn.microsoft.com/linqtosqlcache This works for me, but I'm interested to know if anyone has any alternatives? Cheers, Tim ...

Creating a zip extractor

Hello, I want to create a zip extractor for plugins that I create for asp.net sites. I want the client to be able to run the extractor and the files are placed into the correct folders that I specify. Are there any tools for this? I'm not sure how to do this, thanks ...

Is there a Faceted Search framework for SQL Server & .NET?

I currently use SQL Server to store products in a large catalog web site. I'd like to rebuild the simple categorization we have to something with tags & facets so that users can filter down to relevant subsets as quickly as possible. I should NOT do this myself. Without going too far afield (VM to host level 3 aeai) does anyone know of a...

How to use entity framework inheritance?

First off I'm a noob so please be gentle :-) I have a base object Company. I want to inherit this into a Customer object and a Vendor object. My problem starts with the fact that a given company can be a customer and a vendor at the same time. All the examples I have seen a use a property of the company and set it to either customer or v...

Looking for combinations of server and embedded database engines

I'm redesigning an application that will be run as both a single user and multiuser application. It is a .NET 2.0 application. I'm looking for server and embedded databases that work well together. I want to deploy the embedded database in the single user setup and of course, the server in the multiuser setup. Past releases have been ba...

.NET movement of threads between cores

Follow up question from Multi-core usage, threads, thread-pools. Are threads moved from one core to another during their lifetime? Of course. Imagine you have three threads running on a dualcore system. Show me a fair schedule that doesn't involve regularly moving threads between cores. This is my first time on...

Redirect stdout+stderr on c# windows service

I've wrote a windows service in C# using ServiceBase helper. During its execution some procedures on an external native DLL are called. Annoyingly, those procedures write to stdout and/or stderr in a uncontrolled manner as no sources are given for this DLL. Is it possible to redirect those outputs from the C# service to a log file? Reg...

Transform Java-project to .NET-project

I have a project in Java. I want transform it to .NET-project. How to do it the easiest? ...

Purpose of Dispose calling Dispose(IsDisposing) pattern in C#?

Here is code from MSDN. I don't understand why the work isn't just done in the regular Dispose() method here. What is the purpose of having the Dispose(bool) method? Who would ever call Dispose(false) here? public void Dispose() { Dispose(true); // Use SupressFinalize in case a subclass // of this type implements a fina...

WPF SystemColors.HighlightTextBrushKey IsFrozen=True; How to change Foreground of Selected Item on ListBox Control

I have this Xaml <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Value="#123456"/> <SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Value="White"/> THe first one works, the second one does not. On MSDN, SystemColors.HighlightTextBrushKey says that it "IsFrozen" and cannot be ch...

SQL Server LDAP authentication

Using SQL Server 2005, how can I authenticate a username/password pair against a non-AD LDAP server using NET ? ...