.net

CruiseControl.NET build project with VSS

I am trying to get a build going for a client that pulls from VSS 2005 (yes, I have no choice). I am pretty sure I have all my configuration correct, but I keep getting this error: Source control operation failed: $/Utilities/Orbital Gateway/Solution Architecture/Release Construction/Payment Subsystem/Services/PaymentService is not an ex...

Why is a font in .NET of size 8 displayed as 8.25?

When you select, for example, a Size of 8 in a Font Dialog for Microsoft Sans Serif, it returns a font that .NET displays as having a size 8.25? Why is this exactly? ...

Which windows message triggers a form's load event?

I posted this answer (more of an idea really) but haven't been able to find out for sure which message triggers a WinForms Form.Load event. From Spy++ and some reading I suggested it might be WM_SHOWWINDOW, but I'd like to be sure. Also, other than Spy++ is there a better way to see exactly which windows message triggered a .Net event?...

How can I set leading zeros in AssemblyVersion like "2.03.406.2" in .net

just adding a zero like below [assembly: AssemblyVersion("2.03.406.2")] results in 2.3.406.2 which is not what I want. So this may not be possible? ...

avoiding man-in-the-middle attacks when using proxies.

I have a web application which passes an authentication key to web services for security. to avoid Man In The Middle attacks, the IP address of every request is checked against the IP address from the initial authentication request. However, when accessed from a machine that uses a proxy server, the IP address is not necessarily the sa...

Stored procedures with ADO.NET Entity Framework

I'm trying to use a stored procedure in the entity framework. I had the model created initially without the stored proc. I then went into Update Model from Database and selected the stored procedure I wanted and then added it through the function import. Now I can see the function in the model browser under Function Imports but when I t...

Why is my Linq to Entities code duplicating rows?

I'm using the ADO.NET Entity Framework to manage a hierarchy of objects. Each has a single parent and zero or more children. I present these in my WPF application with a TreeView control. New Things may be added as children to the selected Things with the click of a button... Visual Basic... Private Sub ButtonAddThing_Click(...) ...

No connection could be made because the target machine actively refuses it.

Hello, I'm working on a simple hello world TCP/IP client server app in C# and am unable to get my client to connect. Can anyone offer any additional troubleshooting steps? I'm starting to run out of ideas... Here are the relevant sections of code: server: Console.Out.WriteLine("About to bind address"); IPAddress ipAd = IPAddress.Pa...

System.Collections - why so many options?!

Most of my programming experience is in a language where there is one collection data structure -- an array. Now that I'm working primarily in .NET, I've come to appreciate the vast number of tools available to me, but I also find it difficult to determine which tools is best suited for each problem. I find this to be the case often wi...

Best infrastructure for a situation

Hi, I have the following situation, and I'd like to know what approach would you take to solve this problem. Here's the client needs. He needs a WebSite / E-Commerce and what to be able to customize the look of the e-commerce. He also wants to be able to extend some functionality like product configuration. He have an office in one co...

?: Operator Vs. If Statement Performance

I've been trying to optimize my code to make it a little more concise and readable and was hoping I wasn't causing poorer performance from doing it. I think my changes might have slowed down my application, but it might just be in my head. Is there any performance difference between: Command.Parameters["@EMAIL"].Value = email ?? Strin...

Useful mini patterns (not design patterns)

My most used mini pattern is: VideoLookup = new ArrayList { new ArrayList { buttonVideo1, "Video01.flv" }, new ArrayList { buttonVideo2, "Video02.flv" }, new ArrayList { buttonVideo3, "Video03.flv" }, new ArrayList { buttonVideo4, "Video04.flv...

What's the essential difference between the two HandleException() methods of Exception Handling Application Block (Ent Lib 4.1)

In the most recent version (4.1, released October 2008) of The Microsoft Enterprise Library's Exception Handling Application Block, there are two HandleException() method signatures, and I am a bit lost on the intent for these, especially since neither the documentation, intellisense, nor the QuickStart apps intimate any meaningful diffe...

Integration with 3rd party website is causing Forms Authentication problem

Here's the issue. I'm using ASP.NET Forms Authentication for an account balance type website. Once a user logs in, they are able to make a payment against their account by going to a 3rd party website (3pw). When the user clicks to make a payment, this is what happens: My website makes a request to the 3pw passing an id. The 3pw does a...

How to check if a web service is available using .NET

If a .NET application needs to call a web service is there a good solution for checking if the web service is currently up and available, outside of calling a specific web method? On my web services I usually include some sort of status method for testing, but this becomes an issue when using a third party web service. ...

How do I write (test) code that will not be optimized by the compiler/JIT?

I don't really know much about the internals of compiler and JIT optimizations, but I usually try to use "common sense" to guess what could be optimized and what couldn't. So there I was writing a simple unit test method today: @Test // [Test] in C# public void testDefaultConstructor() { new MyObject(); } This method is actually ...

Check For File Lock Without A Try Catch

Is there a better way to check if a file is not locked then to open the file to catch an exception. I have a filewatcher running on a directory and I need to do something to the file after the file has completely moved/created in the location. Aren't throwing an exception a performance hit? Is there a better way? Private Function FileAv...

Which Instant Messenger services can some server side code, consume?

Hi folks, I've got an application which i want to send some alerts information. Currently, it's firing off emails -> works perfectly fine. I was hoping to intergrate this server application with one/many Instant messenger services, such as MSN Messenger or Google Chat. I'm not sure what my options are, though. Has anyone any informat...

What are the advantages of c# over, say, delphi/realbasic for windows applications

has anyone ever written an application bigger than its .net luggage? People used to criticize vb6 for its 2 MB runtime but it rarely dwarfed the app it accompanied. Today despite having vista on my machine I had to download 35 MB of the 3.5 framework and reboot to then try out an app half that size. When you factor in the decreased sou...

Is there a quality, scalable, .net ecommerce software package - open source or for purchase?

It would be awesome to say we'd use the same software as amazon, barnesandnoble, buy.com, etc, but they are all built custom (as far as I know). I'm looking for a software package with the following primary attributes: Scalable to the tune of millions of unique visitors per month Localizable including double-byte languages Accepts mul...