.net-3.5

Free POP3 mail component

Right now I'm working on a project, which will read mails from pop3 inbox and save its attachments to specified folder. I'm looking for a free POP3 mail component, which can be used with .NET 3.5; Please recommend easy to use POP3 component, it will be great if it is open source. ...

CalendarExtender in Ajax Control Toolkit - basic code

I want to use CalendarExtender from Ajax Control Toolkit. I want to assign the Calendar to textbox, and want the calendar to be triggered by the clickl on the textbox as in the first example on the toolkit website My code is as follows: <asp:TextBox ID="txt1" runat="server" AutoPostBack="True"></asp:TextBox> <ajaxToolkit:Calen...

excel processing in c#

Hi, I am developing a job application. Each job generates an excel file. I will have 50 parallel job. So 50 excel files will be generated parallelly. I am using C#3.5 and Excel 2003. The problem is I am unable to instantiate more Excel objects. I am getting COMException. So do I need to create excel processing only one at a time? Do y...

Creating a thread pooling in c#

Hi, I have 300 threads which is executing one by one. I use join, so its one-by-one. I want to execute N threads at a time. Can anyone direct me to a link on creating a thread pool in c# (with N threads). My situation is at a time N threads will execute, the rest of the threads will wait. When one thread finishes execution, one waiting...

Can Linq-to-SQL Do an Insert or update as needed?

I have a distributed app that sends data via WCF to a server to be stored in the database (SQL Server 2008). Usually this data is new. So I just do InsertAllOnSubmit(). But occasionally, due to communication oddities with the handheld devices that run the client side I get an object that is already in the server. Is there a way to sa...

Emulating variance in .NET 3.5 delegates

I have a method that given a delegate Type argument (not a generic), it returns a Delegate that it created that implements the signature. It internally creates a dynamic method using Expression trees. The delegate type must be of this form Func<SomeParam,IamDerivedObject>,a func where IamDerivedObject is an inheritor of IamDerivedObject....

.net3.5 applications with .net framework 4

Hi, Can I run applications compiled with .net framework 3.5 on a computer with .net framework 4 installed (.net framework 3.5 is not installed)? Thanks ...

WPF Custom Window: cannot "unsnap" maximized window with Win7 Aero Snap

I have a WPF application that uses a custom window frame. My problem is that I cannot "unsnap" my maximized window with Aero Snap in Windows 7. Properties of my window: AllowsTransparency is set to true WindowStyle is set to None ResizeMode is set to CanResizeWithGrip. I handle window drag movement like so: private void TitleBarGri...

Firing only the first of multiple HandleExternalEvent in ParallelActivity

I have a workflow that at some point contains a parallel activity with two external event handler activities in each parallel branch. Both HandleExternalEvent activities wait for the same event on the local service. I would like to execute only one of them based on parameter that comes from the local service. So far only the first branch...

Application.LoadComponent makes application freeze on shutdown

If I use Application.LoadComponent() to load a UserControl, Page or Window, my application freezes when I try to close it. The app apparently closes, but the process keeps running. Easy to notice when debugging. I've tested it under Windows 7 64bit and Vista 32bit. In both cases I have used VS2008 and .NET 3.5. A repro can be built by...

How should I create an object graph from this kind of XML?

OK, a challenge to the deep thinkers out there: My soap server sends me XML that looks sort of like this: <?xml version='1.0' encoding='utf-8'?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"&gt; <SOAP-ENV:Header xmlns:xxxxxx="..."> <...bunch of soap header stuff.../> </SOAP-ENV:Header> <SOAP-EN...

Running application compiled with visual studio 2008 on .net 4 computer

Hi, I've compiled an application with vs 2008 and .net framework 3.5. I tried to run this application on computer with only .net framework 4 (.net framework 3.5 is not installed) and I've got an error (says that it can't load the assembly ....ServiceModel.... version 3.0). After installing .net framework 3.5 SP 1 it works. I have foun...

Net framework 3.5. Takes too long to run application

Hello. I am developing an application in NET 3.5 C# and WPF and from the beginning it took AGES to run at most machines.. Only on my core i7 machine runs within 2-3 seconds... At most pcs tested it takes about 30 seconds to load!!! even from the start when it contained only a button and no code just to load the application... Can i do so...

Getting strange System.Drawing.Bitmap cannot be located error

I have both VS 2008 and VS 2010 installed on my Win7 box. But for sometime I'm getting this strange error: Type System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a cannot be located. I'm not able to put any buttons on toolstrips or modify many other properties of normal controls (lik...

Is Activator.CreateInstance available in DotNet 3.5 ?

Do we have Activator.CreateInstance available in DotNet 3.5 ? ...

Problem with downloading many files from WCF

I have problem with WCF service. When I am downloading 2 files everything works fine ( less than 1 minute), but when I'm trying downloading more than 3 files there is going something bad . I'm waiting and waiting and nothing :/ Every file has about 1 MB. Dictionary<FileIdentifier, Stream> data = new Dictionary<FileIdentifier, Stream>();...

Extension methods

How the c# compiler implements the "extension methods"? ...

Linq To SQL migration to Entity framework 4

We are planning to migrate to .net 3.5 and evaluating Linq To SQL and Entity framework. Considering what people are saying every where on internet that EF 1.0 is buggy, complex, has suboptimal designer support etc, if we pick Linq to SQL - do you think we will be able to migrate it to EF 4 when the time comes? The question arises becaus...

Can an XMLDocument object be use with an XPathDocument object?

I have a static method that converts a html file and returns an XMLDocument object. After doing extensive research, the following question has arised: Can pass an XMLDocument object to a XPathDocument object, to make it easy when simply reading data from the document and not editing it. Research01 MSDN Please reply and let me know i...

Use LINQ to get items in one List<>, that are not in another List<>

I would assume there's a simple LINQ query to do this, I'm just not exactly sure how. Please see code snippet below, the comment explains what I'd like to do: class Program { static void Main(string[] args) { List<Person> peopleList1 = new List<Person>(); peopleList1.Add(new Person() { ID = 1 }); peopleL...