.net

Odd performance degradation in application...

We have an application that is mixed .NET 2.0 and native C++. In our testing, we have a mode which can automatically loop through a set of projects. A project opens, runs, closes, repeat. Each of these steps requires creation/destruction of windows (winforms to be precise). Recently we've experienced some odd behavior in performance. Aft...

WPF : Assigning to RichTextBox.Document extremely slow (7 minutes!)

I'm constructing a formatted FlowDocument from XML. The XML is well formed and consists mainly of 10,000 nodes each with a single node with a 6 character string value. Parsing the XML to an XElement and constructing the FlowDocument in memory takes about 5 seconds. Assigning the FlowDocument to the Document property of a RichTextBox in ...

MVC Design Patterns: seperating model and datasource

Obviously MVC promotes separation of concerns. One thing we are struggling with is proper separation of Model from the datasource, with IDs being the main sticking point. The interfaces that define our model call for an ID of type X Currently the datasource is SQL server.. but what if it is an xml file for some reason and our ID is of...

Offline Web Application

We have a .NET Sales Web Application for which Offline capability needs to be added. i.e The users can access(read,edit,create) the leads,oppurtunities and prospects even if they are not connected to the network and later when they come online, automatic Syncronization needs to happen with the underlying database(which is Oracle). We k...

a class for a parser.. in the same way that class Regex is for regular expressions

I find the class Regex in .net extremely useful (for both matching and matching/replacing). There are some patterns that cannot be specified in regular expressions, but rather need a little grammar. Is there a library for parsers that DO NOT require code generation (like ANTLR)... but where I can specify the syntax in my code on the fly?...

"Printer..." button in the Windows Page Setup Dialog (Vista)

We're using the Windows Forms "Page Setup" dialog to allow the user to select a page size prior to print preview. On XP, the dialog displays a "Printer..." button which allows the user to select a printer and select from a list of page sizes supported by only that printer. On Vista, the very same code displays the dialog without any butt...

Where can I find a list of COM libraries with no .NET equivalent?

Does a list exist that compares and contrasts Windows' COM components with their .NET equivalents, e.g. ADSI <-> System.Directory WMI <-> System.Management etc.? I am especially interested in a list of COM components that have no .NET equivalent. My Google-Fu failed me badly on this one... Thanks! ...

C# - writing a COM server - events not firing on client

I have implemented a COM server in C#, that has a vb6 client. When going to fire my events, the handlers are always null--it appears that the vb6 app never subscribes to my events. The vb6 application is an existing 3rd party app, and appears to give no error messages. Normal methods work just fine from COM client -> server. Is there...

How to keep track of the SCM revision in the build versions automatically?

I want to look at a production binary and know which revision in the SCM corresponds to that build. How it is possible? Can I accomplish that in Visual Studio using VSS? ...

Problem with databinding manual writevalue in .net winforms

If I turn off automatic updating of a binding data source by setting DataSourceUpdateMode = Never and then use a button to update the whole lot (using binding.WriteValue), a problem occurs - Namely, only the first bound control's data source is updated. All other controls are reset back to the original values. This is because when the c...

How to walk a native object in WinDbg?

I am investigating what is taking up lots of memory in my app. Using the !DumpObj command, I can get around the managed objects. But how do I do the equivalent for native objects? For example, this .NET object has a pointer to native code. I am stuck here... how do I do the equivalent of !DumpObj from here? I have all the source and...

Is there a *very* lightweight IDE for .net?

Does anyone know of a good lightweight IDE for .net? Often times I open VS and create a new project just to see if a line compiles, to test a quick method, or something trivial like that. Essentially what I want is an app similar to notepad I can open, have the basic class structure already defined, and be able to compile/run it. It wo...

Entity Framework 4 vs NHibernate

A lot has been talked about Entity Framework first version on the web (also on stackoverflow) and it is clear that it was not a good choice when we already have better alternative like NHibernate. But I can't find a good comparison of Entity Framework 4 and NHibernate. We can say that today NHibernate is the leader among all .NET ORMs, b...

Extract data webpage

Folks, I'm tryning to extract data from web page using C#.. for the moment I used the Stream from the WebReponse and I parsed it as a big string. It's long and painfull. Someone know better way to extract data from webpage? I say WINHTTP but isn't for c#.. ...

vb.net: can you split a string by a string

for example, can i do this: split = temp_string.Split("<beginning of record>") those of you recommended: split = Regex.Split(temp_string, "< beginning of record >") its not working. its just returning the first char "<" and those of you that recommended: Dim myDelims As String() = New String(){"< beginning of record >"} split = t...

Common uses and best practices for application domains in .NET?

What are some guidelines and best practices for when to create new application domains within an application? Also, what are some common uses and examples of how multiple application domains are used whithin an application? ...

Auto generating DAL in an ASP.NET application

Given a stored procedure, is there a way to auto generate a Data access layer? I understand that this can be done using Codesmith by creating cs templates, but was wondering if there's a free/paid solution out there. The plan is for the architecture to have: ASP.NET code behind -> Business Layer -> Data Access layer -> Stored Procedure...

Open source library or class that punches through NAT/Firewalls for P2P data transfer

I'm looking for some C#/.NET library that I can use to do some NAT-Punching for multi-player game development. Using a central server to establish initial connection is OK, but ideally connections would drop into p2p mode after initial communication with server. ...

How to do a UniData Case Insensitive Search with Uniquery

Unfortunately I have to do some interaction with IBM's UniData database system. I am doing this from c# code with UniObjects for .net. I am building an ASP.NET search page that has a single search box. The problem I am having is that the criteria is case sensitive. How can I do a case insensitive search with UniQuery? I could return ev...

Dynamic filter with dropdown list

Hi, I have a function that I want to call in a classmethod to dynamically add where condition but for some reason getting syntax error. Please help me with the code private DataTable CustomSearch<TKey>(this DataTable dt, Func<Records, bool> selector) { DataTable results = (dt.AsEnumerable().Where(selector).CopyToDataTable(...