.net

Ping always succeeds, cant easily check uptime using ping on a url

Im getting frustrated because of OpenDNS and other services (ie: roadrunner) that now always returns a ping even if you type any invalid url ie: lkjsdaflkjdsjf.com --- I had created software for my own use that would ping a url to verify if the site was up or not. This no longer works. Does anyone have any ideas about this? Requiremen...

Advanced Console IO in .NET

What is the best way to write data to the text console at arbitrary locations on the screen and with custom fore/background colors? ...

What's the best way to embed IronPython inside my C# App?

I have an application used by pretty tech-savey people and they want small island of programmability so I've used embedded Iron Python. However, since IronPython 2.0 Eval() doesn't work any more. Specifically I can't both load modules and inject local variables. There is a work around where I can still call Execute(), print out my answ...

Silverlight 2.0 ready for line of business apps

Now that Silverlight 2.0 has been officially released I was wondering if anyone was using it for any line of business apps, for example POS, Vertical Market apps etc. If so how were your experiences compared to an old WinForms app or Web app? ...

How to show compulsory fields on a windows form

How should I show users which fields are compulsory in a windows forms application. I have considered changing the label color or maybe the background color of the text box. I use an error provider to show a red exclamation mark next to the field, however this is only visible after they have clicked the save button. ...

Is there a Ruby .NET Compiler?

Is there a .NET Framework compiler for the Ruby language? I've heard of the DLR (Dynamic Language Runtime), is this going to enable Ruby to be used with .NET development? ...

Microsoft Unit Testing failure, unable to load DLL to test

I've got a .NET 3.5 class lib that I am trying to write some automated tests for but I'm getting the following error when running any tests in the solution: Test method Common.Tests.CommonTests.TestMethod1 threw exception: System.IO.FileNotFoundException: Could not load file or assembly 'Library.Common, Version=0.0.1.22004, Culture=...

.NET's equivalent of Java's MemoryImageSource

I found a wonderful open source Java program that I'm translating into C#. The built-in translator in Visual Studio got me started and I've now spent about a month translating the rest manually line by line. I've completed over 15,000 lines of translation and the only thing that remains is trying to figure out how to convert their Memory...

Best practices for assembly naming and versioning?

I am looking out for some good practices on naming assemblies and versioning them. How often do you increment the major or minor versions? In some cases, I have seen releases going straight from version 1.0 to 3.0. In other cases, it seems to be stuck at version 1.0.2.xxxx. This will be for a shared assembly used in multiple projects a...

JavaScript library to create div-style window within page

Im trying to find out a good JavaScript library that can create a nice "inner-window" popup within a page on my site. I would like to not have to worry about screen positioning (i.e. dont have to calcuate if the size of the window will be off screen, etc...), but just make a new pop-up that has content in it. I'll be using .NET 3.5 ASP...

Turn on Description panel in the standard CollectionEditor

I have a component which has a List<T> property. The class in the list has each of its properties decorated with a description attribute but the descriptions do not show up in the Collection Editor In the IDE designer is there a way to turn on the Description panel in the standard Collection Editor? Will I need to inherit my own type e...

What are the better ways to protect commercial .NET software from being casually copied?

The main focus of the package is developer tools but there is also one component (a DLL) that some small number of developers would like to redistribute with their own application. This is managed code running under .NET 3.5. ...

How to determine whether SqlConnection is enlisted into a System.Transactions' tx or not?

Hello. When we using a transation from System.Transactions (creating TransationScope for an instance) by default all Sql-connections (System.Data.SqlClient.SqlConnection) (but is't also the true for Oracle.DataAccess.OracleConnection) are enlisted on opening. That's called auto-enlistment. Nice feature. But it can be turned off throught ...

Getting full path for Windows Service

How can I find out the folder where the windows service .exe file is installed dynamically? Path.GetFullPath(relativePath); returns a path based on C:\WINDOWS\system32 directory. However, the XmlDocument.Load(string filename) method appears to be working against relative path inside the directory where the service .exe file is instal...

F# - Domain Specific Language

Is the F# is the future of programming languages? Is it right time to learn F# ? Any other languages in the market which is equivalent to F#? ...

Removing entry of an application from add/remove programs in c#

Hi, I have developed an installer class which removes certain folders from the base dir.However,I also want to remove the entry of another application from add/remove programs through the inst class.Could anyone suggest the solution. Regards, Harsh Suman ...

How to get the name of the drive that the OS is installed on?

In C#, how do I get the name of the drive that the Operating System is installed on? ...

How to load back a dynamically created settingsproperty next time

I created a way to dynamically add settingsproperty to a .net app.config file. It all works nic, but when I am launching my app the next time I can only see the properties that are created in the designer. How can I load back the properties runtime. My code for creating the settingsproperty looks the following: internal void CreatePro...

Am I Running as a Service

Hey Everyone, I am currently writing a little bootstrap code for a service that can be run in the console. It essentially boils down to calling the OnStart() method instead of using the ServiceBase to start and stop the service (because it doesn't run the application if it isn't installed as a service and makes debugging a nightmare). ...

Best Data Access Layer for .NET

Which is the best data access layer for .net projects. I am using SQL Server 2005 with C#. ...