.net

WPF TreeView Binding

I've got a class with Parent and Children properties. I want to display this hierarchy in a WPF treeview. Here's my XAML... <TreeView Margin="12" Name="TreeViewPages" ItemsSource="{Binding}"> <TreeView.Resources> <HierarchicalDataTemplate DataType="{x:Type Page}" ItemsSource="{Binding Children}"> <TextBlock T...

Light weight HTTP Server library in .NET

I'm looking for a small and fast library implementing an HTTP server in .NET My general requirements are: Supports multiple simultaneous connections Only needs to support static content (no server side processing) HTTP only, HTTPS not needed Preferably be able to serve a page from an in memory source. I want to integrate it into anoth...

Programmically pull data types for MS SQL table columns for later insertion

Rails has an awesome way of looking up column names and expected datatypes from the DB, alleviating a lot of programming. I'm trying to build something like this in C#.NET, because we have large tables that are ever changing. I'll be adding parameters like so: SqlParameter param = new SqlParameter("parametername", *SqlDbType.Int*); par...

CallContext vs ThreadStatic

What are differences between CallContext and ThreadStatic? I've understood that in an ASP.NET environment data stored in CallContext could be persisted throughout the request until it ends while ThreadStatic may or may not work since the request may switch threads. I've also learned that the HttpContext is internally stored using the Ca...

I need a quick and dirty way to append to a text file in vb.net

I've got a very small standalone vb.net app that gets run automatically. Every now and then it hits an error condition that I want to log and then keep processing. But, this is far too minor a thing to store in the system's main log - I really just want to append a line to a text file. What's the least stress way to append a line of t...

Configuration Management Application Block

Anyone have any experience using the Microsoft Configuration Management Application Block? This is an older piece of code off of their website, but seems like it might be useful as a standard way of storing/reading configuration values for .Net applications. Is it a good/bad tool, overkill, what better options might be available in more ...

.NET COM DLL Deployment

What is the best way to do a .NET COM DLL Deployment, I'm having problems using it in the client machine. The COM is being used in a VB6 app.I can add a reference, but when I try to use create objects it gives me an Automation Error. Thanks in advance. ...

When and why should I implement IComponent, IContainer, and ISite?

I've wondered for a long time what IComponent, IContainer, and ISite are for. I've read the documentation, but it is extremely vague (or I'm thinking about it too hard). I know that if I create a class as a component, it can be used in the Visual Studio designer. But I'd really like to know more generally: what does the Component/Contain...

Execute a SSIS package FROM VB.NET or C#

I have a SSIS package that eventually I would like to pass parameters too, these parameters will come from a .NET application (VB or C#) so I was curious if anyone knows of how to do this, or better yet a website with helpful hints on how to do it. So basically I want to execute a SSIS package from .NET passing the SSIS package parameter...

.NET component that implements sliding dialogs (drawers) ala WinAmp

Has anyone seen or used a third party .NET GUI component for implementing the sliding window/dialog effect seen in Winamp when using the Modern Skin and clicking on the Config button that opens the Configuration Drawer? ...

How do I pronounce "=>" as used in lambda expressions in .Net

I very rarely meet any other programmers! My thought when I first saw the token was "implies that" since that's what it would read it as in a mathematical proof but that clearly isn't its sense. So how do I say or read "=>" as in:- IEnumerable<Person> Adults = people.Where(p => p.Age > 16) Or is there even an agreed way of saying it...

Name Generator for .NET

Has anyone written, or know of a library, that generates fairly accurate looking Western European style names? i.e. John, Susan, Smith, Julien, April, etc., etc... ...

How do you handle developer access to windows servers?

When it comes to code launches how do you handle developer access to the server? Do they have RDP access to the machines to deploy code and make changes? Are they only given ftps access to the servers docroots and any .NET configuration changes are handled by the sysadmins? Do the developers even have access to the production docrooot...

WIA Twain support C#

How can I use WIA and Twain in C#? The TWIAIN/C# example found at http://www.codeproject.com/KB/dotnet/twaindotnet.aspx Throws an exception at line 59 on TwainLib.cs "an attempt was made to load a program with an incorrect format." on Vista 64. I would use WIA but it does not have support for all of the devices I want to use. Is there ...

Money Type

Does anyone know of an already implemented money type in the .net framework that supports i18n (currencies, formatting, etc)? I have been looking for a well implemented type and can't seem to find one. ...

C# WebBrowser HTML with references to scripts and images

Hello, I'm writing a C# app using the WebBrowser control, and I want all content I display to come from embedded resources - not static local files, and not remote files. Setting the initial text of the control to an embedded HTML file works great with this code inspired by this post: browser.DocumentText=loadResourceText("myapp.index...

Best way to make fancy UIs in .NET

How would one create fancy UIs in .NET, with glossy buttons and smooth animations? You can point me to 3rd party frameworks, but I would like to understand the technical details also. ...

Do Stored Procedures really boost performance in MS SQL / .NET?

Jeff Atwood wrote about this here, and while I understand the theoretical performance boost a stored procedure could offer, it does seem like a tremendous pain. What types of queries would you see the most performance increase using stored procedures, and what types of queries would you rather just build on the fly? Edit: Any documenta...

How to keep your Stored Procedures DRY in C#.NET?

We're using Stored Procedures for every query to the DB. This seems incredibly un-DRY: Design the table Design CRUD operation SPs for that table Design code (preferably a class) to fill parameters and execute CRUD SPs If we add a single column, or change a datatype, we have to edit the table, a handful of SPs, and a handful of funct...

Problem using Mex

My application uses both NetTcpBinding and BasicHttpBinding but each of them will expose a subset of my service class. I have created the service as below. The problem is that even though I just added 3 of my contracts to the Mex binding, all of the contracts are shown when I want to add the service to my project. m_ServiceHost = new ...