.net

Best practice for WCF service with large amounts of data?

We have a WCF service that is used for querying an underlying data store (SQL Server 2005 right now). This service may return rather large amounts of data; 60000+ instances of our entity class that contains ~20 properties. The properties are mostly primitives such as string, int, DateTime with a couple pointing at other entities that may...

Trying to assign return type as void

Func<int, void> or Func<int, typeof(void)> seems to be not working. Is it any way to solve this problem without delcaring custom delegates? ...

queuing solution to process a record through multiple processes

The application is on .Net 3.5 and Oracle Standard Edition 11G database where a table have over 2 million records. The record size is not huge. The records have a Status column of type Char(1). Depending upon the status a process picks records to process and updates the status after completion. A record goes via multiple processes in ser...

Problem in Quitting the app

Hi,, i have an app runnig in my win-mobile.. it has assosiated with many DLL's. if i install app in storage card, all DLL and .exe comes to storage card only.. my requirement is if i take out storage card app should quit.. i am using c# .net 3.5 CF for development. i will get notification tat storage card removed..but if i do KILL ...

How to restrict the entity set for a navigation property.

I have just merged several identical legacy tables, DeptL1, deptL2, ..., deptL*n*, where L is a reporting roll-up level, into one table, Dept, with a new ReportingLevel field. In my previous model, several entities, e.g. Employee, had an 'FK' relationship only with DeptL1, where they now have an 'FK' relationship with the whole Dept tab...

How to set default PropertyDescriptor to a property?

Are there an attribute for setting default PropertyDescriptor for a property? I just want to add a attribute to a property and specify PropertyDescriptor. And then the instance of the PropertyDescriptor would have been created. I haven't found the attribute in .net framework. ...

Programmatically installing certificate revocation list C#

I am using C#/WCF. I have a web service which shall be invoked by the client. This is the service definition: And this is the binding If I understand this correctly, the messages sent from server to client are encrypted with a certificate. Currently I ...

How do I remove color (colour) profile information from images using .NET?

Hi, I have a tool which manipulates images at runtime as part of my web app. This generally works fine, but with the release of Firefox 3.5 we're seeing some colour problems. I believe this is because Firefox 3.5 now supports embedded ICC colour profiles where no other browsers do. In order to achieve consistency of display, I'd like...

WPF DataGrid Virtualization with Grouping

I'm using the WPF DataGrid from CodePlex and I need to get Virtualization to work with grouping. This question is on topic and points to an MSDN Example but it only covers ListControls with with simple (i.e. single 'column') DataTemplates. Grouping and Virtualization seems like a pretty common use case for a Grid. Is there a standard...

schtasks.exe vs ITaskScheduler

Hi guys, I'm trying to write some code to automatically "configure" a bunch of scheduled tasks on a machine. The program will read an XML file then "configure" the run times etc. of the task based on the information in the XML file. The idea should be that the program can be "run" multiple times on the machine and automatically "add/rem...

Making and receiving payments?

I am looking at building a Website that needs to receive payments from clients and make payments to service providers. Payments will most likely come in as Credit Card purchases and then monthly I will most likely have to pay the service providers after taking a fee. I know there are a lot of options for accepting money via a payment ...

Enhance performance of large slow dataloading query

I'm trying to load data from oracle to sql server (Sorry for not writing this before) I have a table(actually a view which has data from different tables) with 1 million records atleast. I designed my package in such a way that i have functions for business logics and call them in select query directly. Ex: X1(id varchar2) x2(id varch...

Undocking a ToolStrip from a ToolStripPanel

Out of the box, there doesn't appear to be any built-in support for allowing your end-users to undock the ToolStrips in your applications from their parent ToolStripPanels. Clearly it's possible because even your Visual Studio IDE allows you to undock/tear-off/float your tool strips, it's just isn't possible with the default behavior of...

WCF callback interface passing to another WCF service method on different machine

Hi, I received callback interface from machine A and stored it on machine B. I'd like to pass this callback interface (that is a proxy on machine B) to machine C. Machines A, B and C uses WCF so proper interfaces are available. The issue is when I run PassCallbackToDedicatedMachine(someCallback) method I receive exception like below...

Is mutex correctly implemented and how do I dispose it?

I am reviewing some code and one of the code analysis (fxCop) warnings has gotten me very confused. The code implements a few mutex's by creating variables at the start of the class, similar to this: private Mutex myMutex = new Mutex(); fxCop is popping up with a message saying that I must implement IDisposable for the class as the Mu...

How do I change a Windows Service's startup type in .NET (post-install)?

I have a program that installs a service, and I'd like to be able to give the user the option later on to change the startup type to "Automatic". The OS is XP - if it makes any difference (Windows APIs?). How can I do this in .NET? C# if possible! :) ...

Any IoC container that can build types based on interfaces?

If I register a bunch of data structures with an IoC container, I'd like to say (C# syntax): var lookup = container.Create<IDictionary<Name,ISequence<EMail>>>() ; The container should magically find the registered types that implement IDictionary and ISequence, and construct the type I need. Basically, I want to create types based on ...

.NET File.Create , can't delete file afterwards...

Using method: System.IO.File.Create() After the file gets created, it still remains used by a process, and I can't delete it. Any idea how I can better create the file, should be a 0byte file, and then somehow close and dispose? ...

Difference between LoadFile and LoadFrom with .NET Assemblies?

I was looking at the msdn documentation and I am still a little confused on what exactly is the difference between using LoadFile and LoadFrom when loading an assembly. Can someone provide an example or an analogy to better describe it. The MSDN documentation confused me more. Also, Is ReflectionOnlyLoadFrom the same as LoadFrom except t...

.NET 4.0 and earlier versions

.NET 3.5 was different and co-existed along with .NET 2.0. Is that still the same approach with .NET 4.0 or does it include functionality of previous versions of the framework rolled into it? In other words, if I have an app that uses .NET 2.0 functionality can I deploy .NET 4.0 and things will work or do I have to deploy both .NET 2.0...