.net

Recursively calling the same method twice

In the fibonacci sequence, I have seem conventional implementations which recursively call the same method twice: public void fibonacci(int i) { fibonacci(1) + fibonacci(2); } Now this method is not the exact copy of what I have seen or the right way of solving the problem, but I've seen the two methods added together like above. So th...

Caching Frameworks for .NET other than Velocity

What other caching frameworks are available for .NET besides the project codenamed Velocity. What are the ALT.NET options? ...

Retrieve Contacts from Microsoft Exchange Server 2003

How to retrieve contacts from Microsoft Exchange Server 2003 using .net? ...

How to remove (?) while we convert our byte content from unicode to ansi character

I need to convert the unicode characters to ansi characters byte[] encode = Encoding.Convert(Encoding.Unicode, Encoding.Default, report); I use this piece of code. While I am viewing this I found that extra ? character is added in the first part ?FF EE 20 12 ...

Would you recommend Java/Glassfish/Metro for brand-new project?

I developed in ASP.NET 2.0 for some time, and for slightly less time in Java/Spring/Hibernate. Right now I start developing new web-service and am confused with the choice of: .NET WCF 3.5 versus Java/Metro. From one side, WCF seems like a brilliantly developed solution, a masterpiece of software frameworks, with all the support for fu...

Unable to add a Service Reference to any WCF Service

I'm using Visual Studio 2008 SP1 on .NET 3.5 SP1 on Vista Any time I try to add a Service Reference to any WCF service I get an error that says "Could not load type 'System.ServiceModel.FaultImportOptions' from assembly 'System.ServiceModel,Version=3.0.0.0, Culture=neutral, PublicKeyToken=..." This happens when I try to connect to eith...

AddExtensionObject - Performance

.NET XSLT engine allows passing objects to the XSLT processing engine through the AddExtensionObject method. Can someone comment on the performance of using this to retrieve localized strings to be used in the XSLT? ...

How to add CMS to an existing website

I have an existing ASP.NET website which I would like to painlessly add CMS functionality to. The site is a estate agent's property website and is backed by a database etc. however some pages like 'About Us' etc. I would like the user to be able to edit using a simple CMS. I would also like the user to be be able to create new pages an...

Generic conversion function doesn't seem to work with Guids

I have the following code: public static T ParameterFetchValue<T>(string parameterKey) { Parameter result = null; result = ParameterRepository.FetchParameter(parameterKey); return (T)Convert.ChangeType(result.CurrentValue, typeof(T), CultureInfo.InvariantCulture); } The type of result.CurrentVal...

P/Invoking CreateToolhelp32Snapshot failing in Compact Framework

Hey, im doing a little app for my smart phone, using Windows Mobile 6. I'm trying to get all currently running processec, but method CreateToolhelp32Snapshot always returns -1. So now im stuck. I tried to get error with invoking GetLastError() method, but that method returns 0 value. Here is a snippet of my code. private const int TH32C...

Does DDE still matter? Which are the alternatives?

I'm working on a stock exchange information platform and we are thinking in provide a link between our platform and home-made Excel files. The financial market is still bound to the old DDE server approach, now does it still matter today? Which are the alternatives to make automatic online data updates on Excel files, OLE DB queries? I ...

Problem with print out to text file

Hello, I am completely stumped. I have a program that pulls information stored in a database, assigns the database values to a corresponding class. The class has a print method that prints the values of it's fields. The users type in either an order id or order date range and then it finds those orders and prints them out to a text file...

C# Home Automation Library

I'm a C# developer looking to get into home automation as a hobby. I have done a little research, but was wondering if anyone knows of a good .NET library that supports Insteon hardware. I'd rather use Insteon than X10 due to reliability issues. My ultimate objective at this point is to have a simple home automation server (maybe ligh...

In .NET, is there a need to register the DLL?

Is it necessary to register a compiled DLL (written in C# .NET) on a target machine. The target machine will have .NET installed, is it enough to simply drop the DLL onto the target machine? ...

Strange nullreference exception

So I have this code that takes care of command acknowledgment from remote computers, sometimes (like once in 14 days or something) the following line throws a null reference exception: computer.ProcessCommandAcknowledgment( commandType ); What really bugs me is that I check for a null reference before it, so I have no idea whats going...

Adding related data with multiple LINQ to SQL DataContexts

Hi: I'm developing a desktop application using Linq to SQL. From what I've gathered, it's better to keep DataContext objects short-lived, but I'm running into the following puzzle: My application has lots of lookup-type data that I'd like to cache on the client. The reason I want to cache it is because I don't want to have to look up...

can an x64 computer have both the x86 and x64 .net runtime installed?

can an x64 computer have both the x86 and x64 .net runtime installed? If so, how can I ensure that a program runs on the x64 runtime and not the x86 runtime? ...

Multiple Connections With Same Connection String Under A Single Transaction, Elevated Transaction?

When using ado.net, and creating multiple connections to a MS SQL Server database within a single transaction (using System.Transactions.TransactionScope), does System.Transactions elevate the transaction from the lightweight transaction manager to the distributed transaction coordinator (kernel transaction coordinator on Vista), even if...

What's the best way to do javascript validation on ASP.Net page with Masterpage?

I am implementing Javascript Validation on an ASP.Net page that is inside a Master Page. The control IDs are changing, so I can't use the original control IDs for validation. I looked on the Net and got the suggestion to build the script dynamically, and add it to the page using RegisterStartupScript. I don't like that solution because i...

C#: DataGridView ComboBox Event Handling with a Dynamically Populated DataGridView

My Application creates a DataGrid based on XML. The XML is not optimized, but I have no control over that, so I have to "convert" it, and then add it, row by row, to the DataGrid. I have an event handler that must be fired when any of the DataGrid's ComboBoxes (all in one column) are changed. Problems: The event handling I have (in ...