.net

Looking for WCF docs on creating custom Transport Channels

Well, it appears that now that WCF has been out for a while, the WCF Channels Mini Book that is referenced in this great article (http://winterdom.com/weblog/2007/02/14/WritingAWCFTransportChannelPart1.aspx) provided by SO user tomasr (http://stackoverflow.com/users/10292/tomasr) is no longer available since Microsoft retired the netfx3....

Does anyone know of a good C# API for Subversion?

I'm looking to make calls out to a subversion repository, but I would like to write it in C#. Does anyone know of any good libraries? ...

The designer must create an instance of...cannot because the type is declared abstract

Visual Studio complains: Warning 1 The designer must create an instance of type 'RentalEase.CustomBindingNavForm' but it cannot because the type is declared as abstract. Visual Studio won't let me access the Designer for the form. The class already implements all abstract methods from the CustomBindingNavForm. CustomBindingNavForm pro...

In .Net, when if ever should I pass structs by reference for performance reasons?

In my C# application, I have a large struct (176 bytes) that is passed potentially a hundred thousand times per second to a function. This function then simply takes a pointer to the struct and passes the pointer to unmanaged code. Neither the function nor the unmanaged code will make any modifications to the struct. My question is, sho...

NHibernate on legacy DB.

I'm ashamed to say it, but I have to. I have not worked with ORM's. I'm really considering NHibernate as it seems to be the most mature product for .Net out there (please correct me if I'm wrong). Now, the thing is that we have a big e-commerce/booking system with an SqlServer as the main integration point, containing quite a lot of busi...

Why won't an item in a genereic list be removed using the Removed method?

I have this class. public class Foo { public Guid Id { get; set; } public override bool Equals(object obj) { Foo otherObj = obj as Foo; return otherObj == null && otherObj.Id == this.Id; } public override int GetHashCode() { return this.Id.GetHashCode(); } } You can see I overro...

How to get a hold of the real object in ServicedComponent code

I have a ServicedComponent COM+ class running in a server application. It uses JIT and pooling. I want to keep track of all of the existing instances in a singleton list and call a method UpdateDisplay on them every once in a while. I have each ServicedComponent-derived object register itself by inserting a reference to itself into a si...

Best Practices: 3-Tier Architecture in LINQ

I'm working on a personal project (C# / ASP.NET) that will use LINQ to SQL. The Solution will have (so far) a Webform project, a Namespace project (business logic), and a Tests project. I'm in the very early stages so far (clearly in Design phase). Is there a paradigm for 3-Tier Architecture here? It seems like the DAL is entirely usele...

Does System.Web.Caching.Cache make sense in an ASP.Net MVC app?

Since there is no concept of sessions in ASP.Net MVC and each request is independent of each other would I ever make use of the Cache object to internally cache data in order to minimize db access? The output caching functionality is great for caching view data but if I wanted to cache something like a user profile which should be shared...

SetClientCredential visible in vs.net 2005 but not 2008

I add a web reference to my wse 3.0 service in Visual Studio 2005 and my intellisense shows the name of my service like MyServiceWse (it adds the WSE extension to the name). I also have access to SetClientCredentials() where I pass in my UsernameToken, everything works fine. In Visual Studio 2008 I don't have the proxy class with MySer...

LINQ + lightweight database: which db should I choose?

I'm starting up a new web application. It's going to be hosted on a service that charges extra for SQL Server and frankly I don't think the site needs that much of a database. Right now the data model is 5 tables. And I'll be amazed if the largest table ever goes of 10k records. So I'd like to keep the db lightweight. SQLite piqued my ...

NET: Best Practices/guidelines for dividing namespaces between files?

What should be the general guidelines/gotchas for dividing application code (App_Code) into separate files? I've found that over time, the original files do not match up well with how the namespace hierarchy evolves. How do I keep application code containers organized intuitively over time? What PURPOSE should the file divisions aim t...

Import Access data into SQL Server CE (.mdb to .sdf)

I've found a few articles & discussions on how to import data from Access to SQL Server or SQL Server Express, but not to SQL Server CE. I can access both the the Access data and CE data in the VS database explorer with seperate connections, but don't know how to move the data from one to the other. (I'm using c#.) Any suggestions? T...

With block equivalent in C#?

I know VB.Net and am trying to brush up on my C#. Is there a With block equivalent in C#? Thanks ...

Linq to SQl, select same column from multiple tables

I've been trying to develop a linq query that returns the ItemNumber column of all my tables in the database, but so far I haven't been able to do it successfully. Basically I have a table for each kind of hardware component in a computer, and each table has a ItemNumber column. I need to query all of the tables in one bang, and return ...

WCF Authentication

Is there some sort of "built-in" authentication in WCF? I need to expose a web service to our clients so they can check status of their transactions. My initial thought was they would just use their normal Username and Password passed in as method properties. It would be over SSL, of course, but is this method of authentication not ...

How do I check if a class is readonly in c#??

Can I write a unit test that make sure that a readonly class I write (a class which has no setters) remains readonly in the future? I do not want that anyone to add a setter property in my classes. Basically, how do I check if a class is has no setters in C#? ...

Setting TabIndex in CF .net framework

I have a form with 3 panels, the panels are created because at certain times I need certain groups of controls hidden/shown. Until now, it worked fine - that is until I was asked to have a specific way to navigate the form with TAB key. First of all, I noticed that there is no TabIndex property in the Panel object and second of all (mos...

Castle ActiveRecord, Web Project, and the Bin folder

Which assemblies are necessary to add to the Bin folder for ASP.NET 3.5 project that is going to use Castle ActiveRecord? Is it: Castle.ActiveRecord.dll Castle.Core.dll Iesi.Collections.dll NHibernate.dll log4net.dll What else is needed? ...

Returning typed objects from .Net - Flex - FlourineFX

Has anyone had experience with flourineFX? I have to fix something that uses fluorineFX on the backend to provide typed objects to the a flex presentation layer. I was under the impression that if I register the objects in Flex like so registerClassAlias("Kanpeki.Domain.Staff", Staff); [Bindable] public class Staff implements IListabl...