.net

Biztalk Splitting a file and the use of

Hi! In Biztalk 2006 I have a custom pipeline that split a file into many files, before each file get mapped. In the send pipeline I use "Use Temporary file for writing". My question is: When splitting messages and use "Use Temporary file for writing", will every one of the splitted files be moved to the out folder from the temp folder a...

Search ASP.Net Profiles

I am looking for a way to search through every users profile using the standard ASP.Net Profile Provider. Is this possible, or should I create a new Profile Provider? Here is the scenario: User registers User sets up their profile (favorite color, favorite book, country, etc) User is then able to browse other users who, for instance,...

Does redirecting assembly binding work for unit testing with a test runner?

Ok, so here's the full description of the problem I'm having: I am trying to use NUnit ExtensionMethods but whenever I run a test containing one of the extension methods using TestDriven.Net or if I just flat out try to load the assembly using a test-runner GUI (Icarus or NUnit) I get a FileNotFoundException. Pounding head against a wa...

How to deserialize an XML doc with a prefixed namespace but no ns-prefixed elements?

I have an XML document from an external source. <?xml version="1.0" encoding="utf-8"?> <ns0:Info xmlns:ns0="http://www.ZomboCorp.com/"&gt; <Name>Anthony</Name> <Job>Developer</Job> </ns0:Info> I need to deserialize it into an object like this. public class Info { public String Name { get; set; } public String Job { get; ...

Drag n' Drop Controls - Evil?

I can't stand drag n' drop controls for things like threads and timers. These controls just feel too far removed from the actual essence of their being. Drag n' drop a thread? I hope the drag n' dropper understands what's going on under the covers before they do so. Are these abstractions too far removed from the metal? Are they hel...

Convert an Integer to a string of words

Possible Duplicate: C# Convert Integers into Written Numbers I need to take an integer value and convert it to its english word equivalent (i.e. 4 => "four", 1879 => "one thousand, eight hundred seventy-nine") in .NET (3.5 to be specific). I'm wondering if there is anything built into the .NET framework for making such a conver...

How to detect problem with .net service that goes directly to stop state without error

I have a .Net service that has begun to refuse to start - the system log shows that it "was successfully sent a start control" and then five seconds later the "service entered the stop state". I have the Main() function of my service class wrapped in a try/catch block -- but when this situation occurs, no errors appear in my events log ...

passing a datatable as a field from Oracle to .NET

In a .NET Datatable, the columns are Object types, which can include a datatable as a valid type for a column. So you can create a fairly complex structure: CompanyID (Integer) | CompanyName (String) | OrderRecords (DataTable) --------------------------------------------------------------------------- 1 | Acme Corp. ...

.NET ThreadPool clarification - Available vs idle threads

Hi, I'm a little confused about one aspect of the .NET ThreadPool: namely, how you can tell how many of its 'Available' threads are idle ones waiting to be reused, and how many haven't yet been created. The summary for the GetAvailableThreads() method states that it: Retrieves the difference between the maximum number of thread p...

How to detect if a Window can be Shown?

When an application is running as a Windows Service (written in .NET), what would be the best way to detect whether or not a user is logged on, and when a user logs on, to be able to begin displaying the necessary dialogs, or when that user has logged off, so the display of dialogs can be prevented? I hope I phrased this correctly :) ...

What is the best way to ReadLine by Expression Tree?

If I want to get a user input from Console to my Expression Tree. What is the best way to do it? and how to make variable 'name' duck typing? Here are my code. using System; using System.Reflection; using System.Collections.Generic; using Microsoft.Linq; using Microsoft.Linq.Expressions; namespace ExpressionTree { class Program ...

Is it possible to mix .cs (C#) and .fs (F#) files in a single Visual Studio Windows Console Project? (.NET)

How to do it? Is it possible to call a function from one F# code into C# without using a separated dll file or project? ...

Processing Messages from a Queue on a Delay using C# and VS.NET 2005

This is the setup for the queue: The queue is public and marked as transactional. A web service is responsible for inserting messages into the queue. A Windows service is listening in on the queue Given that, how can I only process messages that are at least 20 minutes old? ...

Setting ASP.Net cache PrivateBytesLimit in C# service

I have a C# service which is not an ASP.NET application, but uses a singleton instance of of class HttpRuntime to cache items in its cache member. The singleton is created like this: static private System.Web.HttpRuntime _httpRuntime = new HttpRuntime(); I want to set its maximum memory usage so I have the following in the app's confi...

What is Your Tool-of-Choice for Creating Stubs?

Following on from my last question "What is a "Stub", I would really like to sit down tonight and play more with creating stub objects. What is your tool of choice for creating Stub objects? And for bonus points :) Can you also link to any good tutorials for getting started with them? Thanks a lot guys and girls, appreciated :) FYI...

Exceptions from SoapHttpClientProtocol.Invoke Method .NET web service

I am calling a web service from a C# forms based app. ServReturnType obj = ServProxyClass(int i, int k); I have the potential to get back an exception. The exception could be that the service didn't connect at all, that there was a failure on the receive, but the original message went, or anything in between. I then need to make a dec...

Is (HttpContext.Current.User != null) enough to assume that FormsAuthentication has authenticated the user

In an ASP.NET (2.0) application I use FormsAuthentication. In the Global.asax / Application_AuthenticateRequest method I check if HttpContext.Current.User is null. Is this enough to know if the forms authentication cookie exists, the ticket is not expired, and overall, that the forms authentication mechanism has done its job to validat...

WPF ListViewItem lost focus event - How to get at the event?

Hello, I have a listview that you select a row/item on. This is linked to a datatrigger that displays an image on the row. The image should only be displayed when the row is selected. This part works fine, however when you move the focus to something else, such as a textbox, or a messagebox is displayed, the listviewitem loses focus ie ...

ASP.NET 2.0 "BC2017: could not find library" - How to force .NET to look for correct version?

A precompiled ASP.NET 2.0 (Visual Studio 2005) application is throwing this error when we try to access it. Compiler Error Message: BC2017: could not find library 'C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll' Two immediate problems spring to mind: We're running .NET version 2.0.5...

How Serialization Works in .Net

I have a feeling this is a repost but I can't seem to find any good information about it. I was just wondering how serialization actually works (well actually deserialization). What I'm wondering is if say I have a property that is not actually backed by a private field; i.e.: public string SomeProp { get { return GetValue("Som...