.net

Managing third party components in .net project.

How do you manage the third party components that is used in a .net project. I currently add a folder called references that contains all the dlls used and all the projects refer those from there. This folder in checked in along with the source code to source control. I wanted to know if there was a better approach that others were follo...

Resources for getting started with MCML?

Can anyone suggest some references or other resources that are useful in learning MCML? I have a small pet project I have been working on for a while using C# and .Net 3.5. I have reached a point where I want to be able to send output from it to Windows Media Center, but I have been having a hard time finding coherent explanations of ho...

Is it possible to throw a MessageQueueException?

I am using a mock object in RhinoMocks to represent a class that makes calls to MessageQueue.GetPublicQueues. I want to simulate the exception thrown when message queueing is operating in workgroup mode, which is a MessageQueueException, to ensure that I am catching the exception correctly The MessageQueueException has no public constru...

WCF and System.Configuration namespace

I received an error when an referenced .NET Framework 2.0 assembly tried to execute the following line of code in an IIS hosted WCF service: Error Message: exePath must be specified when not running inside a stand alone exe. Source Code: ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); Has anyone experi...

System.Windows.Forms.WebBrowser.Refresh showing previous page

My WinForms application has a tab with a System.Windows.Forms.WebBrowser control. There are several controls that set the WebBrowser's .Url property, and when the form repaints it calls the WebBrowser's .Refresh(WebBrowserRefreshOption.Completely) method. Occasionally, however, the form gets repainted and the WebBrowser content doesn't ...

Advanced .Net Programming Course

Hi all! I'm looking for an advanced programming course, preferably in c#. Ideally, I'd like it to be boot-camp style where you focus intensely for a week. I've looked at some college courses and they seem too drawn out and I haven't found one with the content that I've liked. I am not looking for a conference such as PDC or TechEd or any...

Why is AllowPartiallyTrustedCallers not the default?

For a .NET assembly to allow anything other than fully trusted callers the assembly must be signed and attributed with AllowPartiallyTrustedCallers. But even with this in place the CLR still (fortunately) checks code rights to ensure that the partially trusted caller can execute the desired code. So my question is, why is the AllowPar...

Interpreting Visual Studio 2005 Threads Window

I created a simple .NET windows application in Visual Studio 2005 and on just entering the main form load event my threads window is as in the following image: http://img519.imageshack.us/my.php?image=threadshh4.jpg My questions are 1)Why are there so many threads in the first place when I haven't started any(apart from my application...

Copy and Modify selected text in different application.

I have a windows application running at the backend. I have functions in this applications mapped to hot keys. Like if i put a message box into this function and give hot key as Alt+Ctl+D. then on pressing Alt, Ctrl and D together the message box comes up. My application is working fine till this point. Now i want to write a code insid...

.NET Does NOT Have Reliable Asynchronouos Socket Communication?

I once wrote a Crawler in .NET. In order to improve its scalability, I tried to take advantage of asynchronous API of .NET. The System.Net.HttpWebRequest has asynchronous API BeginGetResponse/EndGetResponse. However, this pair of API is just to get a HTTP response headers and a Stream instance from which we can extract HTTP response co...

Is there a Windows Forms native way to flash a form's title bar?

Is there a correct way in Windows Forms to flash a titlebar without having to drop to P/Invoking FlashWindow? I'm using .NET 2.0 for compatibility and size reasons, so maybe I just missed the method because it's in newer versions of the .NET framework. ...

.NET: Select concrete classes using config file

(This question specifically in C#, but applies generally to .NET) I have a largish application that has a fairly good design, and is broken into major sections over interfaces (this was done to assist parallel development). We now have a primary set of concrete classes that implement the required interfaces, but we also have additiona...

Simple .NET webcam library

Is there a simple library for .NET that has a simply API that let's you do something like; // pseudo-code List<Webcam> cams = Webcam.GetAll(); Image i = cams[0].GrabImage(); I've looked at DirectShow and WIA, both seem to be much more complicated than this. I've also looked at this CodeProject project, but it really is much more compl...

Which is the best way to compare the integer part of two non-integer numbers?

I need to compare the integer part of two doubles for inequality and I'm currently doing this: int iA = (int)dA; int iB = (int)dB; if( iA != iB ) { ... } but I wonder if there's a better approach than this. Thanks. If I used Math.Truncate() instead of a cast to int, would it still be accurate to compare the two resulting double...

Integrating POP3 client functionality into a C# application?

I have a web application that requires a server based component to periodically access POP3 email boxes and retrieve emails. The service then needs to process the emails which will involve: Validating the email against some business rules (does it contain a valid reference in the subject line, which user sent the mail, etc.) Analysing ...

Any Smalltalk on .NET?

Are there any usable implementations of Smalltalk for the .NET runtime? ...

Connection string hell in .NET / LINQ-SQL / ASP.NET

I have a web application that comprises the following: A web project (with a web.config file containing a connection string - but no data access code in the web project) A data access project that uses LINQ-SQL classes to provide entities to the web project UI (this project has a settings file and an app.config - both of which have con...

Is it correct to compare two rounded floating point numbers using the == operator?

Or is there a chance that the operation will fail? Thanks. I chose the wrong term and what I really meant was rounding to 0, not truncation. The point is, I need to compare the integer part of two doubles and I'm just casting them to int and then using ==, but, as someone pointed out in one of my earlier questions, this could throw an...

rhino-mocks - good sample apps

Hi guys I know that there has been a couple questions about tutorials on rhino-mocks. But I am wondering if there are any sample apps out there that use rhino-mocks in the context of an n-tier business application using ado.net. I find the tutes good, but they don't seem to bring everything all together into the big picture. Thus, I ...

How to handle a reentrant validation event when showing dialog

I'm wondering how people handle a situation like this, when you have a validation event, and you need to show the user a dialog box asking him whether to continue or cancel. The problem is that when showing that dialog box, it causes another validation event because it's considered losing focus on the control again, and you end up with ...