.net

Code coverage in production

Any good tool/experience/story about using some code-coverage tool at early beta to early gold deployed applications? Platform is .net 2.0 ...

i am getting this error failed to execute request because the app-domain could not be created on IIS 5.1 win XP

i am getting this error "failed to execute request because the app-domain could not be created" on IIS 5.1 win XP any ideas? i tried looking online....i put my .net application in the INETPUB folder ...

Does anyone have a WORKING example that displays a directory tree structure in a TreeView for VB .NET??

I have looked everywhere and cannot find a version that works. The ones I found are all either outdated or have errors. I have something that is working for the most part, but I'm having some trouble with restricted-access folders. The code I'm using is as follows: Imports System.IO Public Class frmMain Private Sub frmMain_Load(B...

.NET: How do I determine if an object is a COM object?

How do I determine if an object is a COM object? I need to call Marshal.FinalReleaseComObject on all COM objects in an array of type Object. ...

automatically expanding array in .NET ?

Does .NET have anything similar to Perl arrays, which are indexed numerically but automatically expand as needed? It would work like this: var x = new DreamArray<string>(); x[6] = "foo"; // x automatically has 7 elements x[10] = "bar"; // now it has 11 ...

Where I should declare a session variable in asp.net

I am building a Asp.net Application. I need to save a HashTable in a session. At page load i am writing protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Session["AttemptCount"]=new Hashtable(); //Because of this line. } } Here problem is, when a user refresh the page, session["Atte...

IDisposable and COM

Since COM objects hold non-memory resources but don't support IDisposable, I'm trying out some ideas to fake it. What do you think of my first attempt? Public Function ComBlock(ByVal ParamArray comObjects As Object()) As IDisposable For i As Integer = 0 To comObjects.Length - 1 If comObjects(i) Is Nothing Then Throw New Argu...

Nesting Configuration Elements in web.config

I'm learning how to use System.Configuration in .NET and would like to know if there is a way to infinitely nest configuration settings in my web.config file. Let's say I have two types of objects - a Page, and a PageGroup. A Page represents a real page on my site, and a PageGroup represents a collection of Pages and (possibly) other P...

XSD regular expression pattern in .Net causes application to hang

Processing time doubles as "Y" goes to the right. Can anybody tell me why? How to solve this problem? I have many big ID's stored in a database those can't be changed so I can't limit the size too much. using System; using System.IO; using System.Text; using System.Xml; using System.Xml.Schema; namespace TestRegex { class Program { ...

Is there any way to automatically generate corresponding resx files for string localization in .NET?

Using this answer, I created a sample localized app. My question is, is there some way to have Visual Studio automatically generated the strings.fr.resx file with the same strings (same names that is, with blank values), so someone who knows French can just fill them in, or do I actually have to manually create the resource for each lang...

Windows Service is started but does not do anything - .NET

I have a .NET Windows Service (.NET 3.5) with a timer (System.Timers.Timer). The OnElapsed method looks like this: private void OnTimerElapsed(object source, ElapsedEventArgs e) { lock (this) { timer.Stop(); //process some stuff here.. ProcessStuff(); timer.Interval...

Is there a standard date/time format that can be passed on a URL?

Looking at the DateTimeFormatInfo documentation, it appears that all the standard formats have colons in them, which makes passing them on a url unpleasant/impossible. Is there a standardized format for passing a datetime on a url, preferably one that can be automatically parsed by .NET? Update: A little clarification The consumer o...

What technology was .NET implemented with?

Possible Duplicate: Is .NET all COM underneath? I heard a DotNetRocks interview where the guest made the statement that .NET was written in COM(It's all COM...). I'm curious if this is or is not true? ...

Text mining, fact extraction, semantic analysis using .Net

I'm looking for any free tools/components/libraries that allow me to take anvantage of text mining, fact extraction and semantic analysis in my .NET application. The GATE project is what I need but it is written in Java. Is there something like GATE in the .NET world? My challange is to extract certain facts out of website text conten...

Looking for a library to synthesize sounds from soundfonts

Im looking for a library that can synthesize sounds from soundfonts / sound banks Preferably in C#, but other programming languages are fine too Maybe a video game library can do this? Need suggestions ...

Programmatically downloading a file from Sharepoint without using Web Services?

I'd like to fetch some files from a SharePoint site, however I do not want to use the web services as a) I want to be compatible with both 2007 and 2010 and b) I'm not sure if Web Services can give me all files on a site. SharePoint Designer can do that, and it seems to use FrontPage Server Extensions using _vti_bin/Author.dll. Also, I ...

How to locate a sequence of values (specifically, bytes) within a larger collection in .NET.

I need to parse the bytes from a file so that I only take the data after a certain sequence of bytes has been identified. For example, if the sequence is simply 0xFF (one byte), then I can use LINQ on the collection: byte[] allBytes = new byte[] {0x00, 0xFF, 0x01}; var importantBytes = allBytes.SkipWhile(byte b => b != 0xFF); // importa...

Reading EML files from Windows SMTP service. Any reason not to use StreamReader?

I'm going to be reading and parsing the EML files dropped by the Microsoft SMTP service. I am a newbie to using the various stream classes. The implementation I have seen that parses these files uses a variation on System.IO.Stream to read byte by byte. However, it seems like these files should never be anything but text. Wouldn't it...

Who's the Raymond Chen of .NET?

Possible Duplicate: Which C#/.NET blogs do you read? I've found reading The Old New Thing to be an incredible learning experience (multithreading, COM, asking myself "What would Raymond do?", don't use the desktop window for anything modal, this behavior in Windows seems stupid, but here's why). I've just discovered Larry Oste...

What could explain over 5,000,000 System.WeakReference instances on the managed heap?

I have been running load tests against a production ASP.NET web application and am seeing a huge number of System.WeakReferences created on the heap. Within about 15 minutes under load managed heap memory has shot up to about 3GB and I have approximately 5,000,000 references to System.WeakReference. Performing a forced garbage collection...