.net

OpenSSO or ESOE for .NET?

Does something like OpenSSO (https://opensso.dev.java.net/) or ESOE (http://esoeproject.org/) exist for the .NET platform? ...

What are 'closures' in .NET?

What is a 'closure'? Do we have them in .NET? If they do exist in .NET, could you please provide a code snippet (preferably in C#) explaining it? EDIT: I went through Jon Skeet's article to understand what closures are and how to use them in .NET. EDIT: I found another interesting article here ...

Windows .Net controls - Creating property templates

Assume that all text box controls in my .Net Windows application created by dragging a TextBox control onto the Form editor should have the following default properties (some text box instances can override these properties) : Text Align: Centre Resize : As per content Dock: Left, Top and Right Now, it becomes cumbersome and manual...

cf.net queuing for webservice

This question is related to this other question I recently asked... http://stackoverflow.com/questions/417789/cf-net-exception-and-other-logging I am generating log messages to be sent to a server using a webservice over a GPRS connection and I want to simply queue these messages in the case the connection to the server is not availabl...

System.IO.Directory.GetFiles returns different result than Windows XP Search Companion

Hi, I am using this statement to find all files recursively: fileNames = System.IO.Directory.GetFiles(path, "*.*", System.IO.SearchOption.AllDirectories); The total number of files that are found is sgnificantly lower than wehen using Windows XP Search Companion. This is not caused by hidden files, I checked that. It looks like s...

Quickest way to implement a new interface member in many classes?

Do you know a quick way to implement method(s) from an Interface to a Class. If yes, how can you do it? Situation : I have an Interface used by over 15 concrete classes. I added a new method and I need to implement this new method in all concrete class. Update All my concrete class implement the interface and all the method fine. Late...

File Watcher - get the process name that created a file in Windows?

Is there a good way to get the process name that created a file in Windows? I have a directory on a Windows 2000 Server C:\WINNT\Temp that is filling up with files named like: 70618199 21834082 They are always 121,201 KB in size. Programatically can I "capture" the program name or service name that is dropping files in this locati...

Fibonacci, Binary, or Binomial heap in c#?

Are there any heap data structure implementations out there, fibonacci, binary, or binomial? Reference: These are data structures used to implement priority queues, not the ones used to allocate dynamic memory. See http://en.wikipedia.org/wiki/Heap_(data_structure) Thanks, Dave ...

Why doesn't the Random.Next method in .NET support floats/double?

So maybe I want to have values between -1.0 and 1.0 as floats. It's clumsy having to write this and bolt it on top using extension methods IMO. ...

Winforms unceremoniously quits with "unhandled exception"

The program spits up one of those boxes saying an unhandled exception has occurred and the application must quit. The only clue I get to solve the problem is this in the event log: Event Type: Error Event Source: .NET Runtime 2.0 Error Reporting Event Category: None Event ID: 5000 Date: 1/9/2009 Time: 8:47:44 AM User: N/...

Is .NET giving me the wrong week number for Dec. 29th 2008?

Hi there According to the official (gregorian) calendar, the week number for 29/12/2008 is 1, because after the last day of week 52 (i.e. 28/12) there are three or less days left in the year. Kinda weird, but OK, rules are rules. So according to this calendar, we have these boundary values for 2008/2009 28/12 is week 52 29/12 is week...

Using VB.NET IIF I get NullReferenceException

I am doing a little debugging, and so I want to log the eventArgs value I have a simple line that basically does: logLine = "e.Value: " + IIf(e.Value Is Nothing, "", e.Value.ToString()) The way I understand the IIF function, if the e.Value is Nothing (null) then it should return the empty string, if not it should return the .ToString...

How can I manage the onslaught of null checks?

Quite often, in programming we get situations where null checks show up in particularly large numbers. I'm talking about things like: if (doc != null) { if (doc.Element != null) { ... and so on } else throw new Exception("Element cannot be null"); } else { throw new Exception("document cannot be null"); } Basically, ...

The N-Layer POCO/ DTO quandary

When there were only evil datasets and the microsoft application blocks your transfer objects between layers would be either datasets/datatables or DTO/POCO. I belong to the gang that likes using DTO/POCO. Now with this sudden wave of mapping layers like SubSonic, Entity Framework, NHibernate etc, should I still be using my favourite P...

Why are children of my custom user-control not being initialized?

UPDATE: I've been experimenting with my controls some more and I think I've gotten closer. Please read on for updated info. I have 2 ASP.NET 2.0 user controls, one of which is placed inside of the other one. Inside of the inner control I have an HtmlAnchor tag control which I'm trying to set a URL for from the outer control. When I atte...

How to manage FxCop overwhelming reports

I've recently started using it. However, after running it against one of my company's largest project. It turns up mountains of problems. The list of problems was so overwhelming it would take days to find and fix some, if not all of the stuff. Now, I know that it's not very practical to fix everything FxCop tells you to fix. But as I ...

Disconnected Architecture With .NET

Hi, I'm working with an n-Tier application using WinForm and WCF Engine Service (Windows Service) => WCF Service => Windows Form Client Application The problem is that the WinForm Client Application need to be 100% available for work even if Engine Service is down. So how can I make a disconnected architecture in order to make my win...

How does one pass command line argument to a ClickOnce application?

I have a Clickonce application that is launched from the start menu (local). I would like to be able to specify a parameter so that the application can load certain data. The application lives on a fileshare and will be launched using the URL only once (like described here on MSDN). This implies that the method describe in this link will...

How to find out whether my .Net application was launched using a shortcut?

Is it possible to find out whether your current .Net app has been launched using a shortcut or a Clickonce application reference (*.appref-ms) file? If so, how? Some background: I am running into an issue using Microsoft Clickonce in which I cannot pass command line arguments to the application. It seems that this is the way the technol...

Update Windows Service Assembly Without Restart It ?

How can I update some Windows Service Seperated Assemblies without restarting the service? Note: This Windows Service hosted WCF Services, so in addition without restarting the service and so don't shutdown down WCF Clients .. ...