.net-3.5

Error reading IPTC fields from JPEGs in .NET

I get the following exception when calling BitmapMetadata.GetQuery("/app13/irb/8bimiptc/iptc") on about 1% of JPEGs I have tried this on. What could be causing this and what can I do to fix it? (I have tried Googling but I can only find one relevant result asking the same question but with no answer.) System.OverflowException: The image...

Making Linq To SQL DRY.

We decided to use Linq To SQL for our Data Layer on our most recent project. We have a functional solution, that so far has handled everything we have thrown at it, with one major problem. We have to code the same method over and over again to retrieve just slightly different result sets from our database. As an example: pu...

Unit testing float operations in Visual Studio 2008 Pro

I have some C# unit tests that perform some float/double operations and I would like to unit test them. Assert.AreEqual is insufficient because of rounding errors. Take unit conversion as an example. 10.5 meters to feet has a conversion factor of 3.281 so I get 34.4505. Using a more accurate conversion factor gives me 34.4488189. I ...

join query with linq

I am trying here to make a few left joins into a linq query but I'd say I rather have no idea how to materialize this idea. Basically here is the 3 database structures I want to play with. <tags> id | name <events_tags> tag_id | event_id <events> id | name | some-other-fields so for each events there is a one-to-many relation with ...

How is dependency property implemented?

Hi, Can anyone explain how is dependency property implemented? Is it just a static dictionary that is declared in base class with a reference of given instance as a key?I can't find any resources about this in internet...Thanks a lot ...

Memory consumption of EF

Good morning! Actually I'm playing around with EF atm a little bit and I need your guys help: Following scenario: I have a table with a lot of data in it. If I'm querying this table through EF, all the records get load into memory. eg. var counter = default(int); using (var myEntities = new MyEntities()) { foreach (var record in m...

My simple namedpipe sample works fine on my vista/win2k8 server box but fails on win2k3

Hi i am using the new named pipes feature of .net35 it is very easy to use on same machine (win2k8) but with the exact same code, i get the following error immediately i call EndRead on the pipestream in the async callback handler on the client under win2k3 server: "The operation was canceled." any help will be appreciated. thanks. ...

WCF - How to Increase Message Size Quota

I have a WCF Service which returns 1000 records from database to the client. I have a ASP.NET WCF client - ( i have added service reference in asp.net web application project to consume WCF). I get the following message when i run the client application - The maximum message size quota for incoming messages (65536) has been exceede...

Differences between .NET 3.0 & 3.5?

What are the major differences between the .NET 3.0 & 3.5 frameworks? ...

WCF with Multiple Endpoints accessing WSDL?

Should the WSDl only be accessible via the ".svc?wsdl" ? I have a service that has multiple endpoints. For example (in the web.config): <services> <service behaviorConfiguration="MyServiceTypeBehavior" name="WcfService1.Service"> <endpoint binding="wsHttpBinding" bindingConfiguration="ws1" name="ws1" contract="WcfService1.IMy...

Need a .NET WinForms IP Address Control

I need a robust, user-friendly, professional-looking .NET WinForms IP address control for use in a project I'm working on. This control, at a minimum, should support IPv4 addressing and ideally would support IPv6 addressing as well. I would prefer a free control with C# source code, but don't mind paying for one. I am using .NET 3.5 S...

Design Firewall Software

How can I design a Firewall software? The design should have a layered approach. ...

Converted project .net 2.0 to 3.5, where are the extension methods?

Hi, I've recently converted an app from .net 2.0 to 3.5 but I don't see any extension methods... what am I doing wrong? Or what else should I do besides changing the target framework from 2.0 to 3.5 in project settings? ...

ASP.3.5 Error while using Enterprise Library

I have a VisualStudio solution created in Vs2005 which is making use of Microsoft Enterprise Data Library.Now I converted this to Visual studio 2008 .Now when i buid the project ,i am getting an error like the below An error occurred creating the configuration section handler for dataConfiguration: Could not load file or assembly 'Mi...

How can I convince my admins to upgrade from ASP.NET 2.0 to 3.5?

I am trying to convince my web server admins to upgrade our version of the .NET framework from 2.0 to 3.5. I was wondering what are the best reasons to upgrade, from a server admin prospective. Obviously, there are the over arching ideas of keeping up to date, security, and so forth. I am looking for some hard and fast reasons that will...

Dataset.Copy() not copying value of new record.

I have a dataset with multiple tables. One table in particular has one record in it. I am adding another record to this datatable and am using the Dataset.Copy() method to copy the entire dataset object to another instance. Dataset2 = DirectCast(Dataset1.Copy(), dsApplication) However, the new copy of the dataset returned from th...

WPF: Is it possible to bind a Canvas's Children property in XAML?

I'm a little surprised that it is not possible to set up a binding for Canvas.Children through XAML. I've had to resort to a code-behind approach that looks something like this: private void UserControl_Loaded(object sender, RoutedEventArgs e) { DesignerViewModel dvm = this.DataContext as DesignerViewModel; dvm.D...

Datalist not retaining values on postback

I have a datalist control that is not retaining it values during postback when the control causing the postback is outside of the update panel that the Datalist resides in. I have verified that viewstate is on for that usercontrol as well as all its parent controls. My basic situation is that I have a Datalist that contains a user co...

Generic ComboBox with automatically named properties

I'm writing a wrapper for the WinForms ComboBox control that will let me populate the dropdown with a List<T>, and has a Selected property that returns an item of type T (or null if nothing selected). Rather than having a Selected property, I'd like it to be named based on the generic type automatically. For example: MyDropDownList<Us...

Thread-safe async byte queue

I've got a callback method that is called whenever new data is available: public delegate void DataCallback( byte[] buffer, int offset, int count); I want to wrap this in a class that implements an interface similar to this: public interface IDataSource { IAsyncResult BeginRead( byte[] buffer, int offs...