.net

Id vs ClassNameId for a class identifier's name

I'm in the middle of a debate here at work. Say you have a POCO named Person. Person has an identifier. I'm in the camp that says the identifier should be named Id. class Person { public int Id { get; set; } } The other camp says it should be named PersonId. class Person { public int PersonId { get; set; } } Is one more ...

Azure differences between local fabric and cloud handling of datatypes

We recently spent the afternoon debugging our Azure application after trying to move the storage from the local store to the cloud storage -- the first step in moving the entire thing to the cloud. We came across a problem in where the local fabric storage was letting us store improperly initialized DateTime objects (initialized to Date...

Add an attachment via the SDK to a work item without using a physical file

I'm looking at creating new work items for TFS 2010 via the client SDK. In the SDK you can do something like this: WorkItem item = ...; item.Attachments.Add(new Attachment("c:\\path\\on\\tfs\\server\\shot.png", "Screen shot")); item.Save(); But this requires the file being attached to be placed on either a network accessible path, or...

Adding items to a global list in TFS via the SDK

I wish to add or list items from a global list in TFS 2010 via the TFS SDK. I have discovered the following methods: XmlDocument WorkItemStore.ExportGlobalLists() void WorkItemStore.ImportGlobalLists(XmlElement listsElement); void WorkItemStore.ImportGlobalLists(string lists); Which appear to export/import all the global lists as a ...

Getting around the WPF rendering bottleneck

I love to make efficient apps and often look to concurrency and multithreading to improve application responsiveness and such, but lately my attempts always seem to be blocked by WPF's single-threadedness. No matter how efficient and parallel my code is, WPF seems to continually stall my UI and make my app look incredibly unresponsive--s...

Fetching the comment history for a work item in TFS

In most defect trackers there is a comment history associated with a ticket/incident/issue/work item. I wish to get this same information from TFS via the SDK for a work item - ideally: Who created the comment. The text of the comment. Who last updated/edited the comment (if that's event possible in TFS?) I have determined that a Wo...

Using storyboard animations for mouseover and selection in WPF ListBoxItems

I've got a WPF app that has a listbox which I'm trying to apply some mouseover effects to. It all works fine when I use simple Setters to change the background color on mouseover/selection, but I figured it would look nicer if it animated between states, so I switched the Setters for enter/exit Storyboards. It all works nicely initially ...

What do you use to document the detailed plan for your classes?

I'm wondering what work-flow and or tools people use to document the details of classes they plan to create. Specifically, where and how do you manage the nitty gritty details. For big picture stuff I make use of class diagrams. Specifically I use the class diagram tool built into Visual Studio. I also end up creating a lot of Visio diag...

What are the most popular .Net based CMS?

I am looking for a flexible .Net based CMS that gives me most of the common CMS features as well as flexibility to build custom pages. In CMS I am looking for following features. Support various content types Social network integration (Share on Twitter, Facebook, etc., Display Tweets from account ) Ability promote content, feature co...

self-extractor that will extract and run a file

i have two files, an EXE an DLL the exe is a build of a vb.net application and i need the DLL in there too what i want is a self extractor that will put these files together, then when run it will extract them and immeidately run the EXE is there a VERY SIMPLE and EASY TO USE OUT OF THE BOX software that will do this? commercial or no...

Process-wide "AssemblyLoad" Event

I can receive events, using the AppDomain.AssemblyLoad event, but only for a particular app domain. If I have appdomains that recursively create more appdomains, I believe my AssemblyLoad event will not work for those "grand-child" appdomains. How can I be sure to get an AssemblyLoad event triggered, regardless of what appdomain loaded...

Disable scripts in WebBrowser Control

I have a HTML page that I want to display in a WebBrowser control, I only want to preserve its layout. It can be any page downloaded, I want it to be static (non-interactive), meaning no javascript or Flash, but the user can still use scrollbars to move around the page. I am thinking of stripping out all tags except for basic tags (img...

ASP.net compiled dlls

Where are they stored? And is there a way to determine when they get deleted? Is there a way to make it so that they are never deleted, so as to improve performance for example? Another issue - in a busy hosting environment how big could all the dll's get? Let's say if you have 1000 medium websites? ...

Data Access Layer as a web service -- Is this a good idea?

I have been researching for a while and have actually created a prototype ASP.NET web service as a DAL for a few ASP.NET 2.0 web sites. Just would like to ask for some insight/advice from more experienced developers out there who had successfully rolled out DAL as a web service. What are the drawbacks/risks to deploying DAL as a web serv...

How to find which route in RouteTable.Routes matches a url?

Hi, I have a string contains a URL. How do I check which route in RouteTable.Routes matches my url? I used reflector to investigate how it is done in Phil Haack’s RouteDebugger. I found it internally works based on HttpContext. I don’t have the HttpContext as url is not requested yet. Thank you, Max ...

VB.NET writing a telnet client using system.net.tcpclient

This isn't working for me when I connect to my solaris box The server is sending back ??% does anyone know what i'm doing wrong Imports System.Net Imports System.Net.Sockets Imports System.Text Public Class TelnetClient Private _hostname As String = "myserver" Private _username As String = "user" ...

Creating of Menus in WPF Silverlight Application with Visual Studio 2010

Dear All, I want to make a Student Management Software using WCF (Visual Studio 2010). I have not made any projects in .NET. I need a lot of Master Screens, Transaction Screens, Reports and so on. How do i go on with this. Is it possible to create menus in WPF and i can create all my options [Student Master, Course Master etc.] in Menus...

MissingMethodException thrown by GetExportedTypes

I'm getting a MissingMethodException thrown when I call GetExportedTypes, the code: Assembly.LoadFrom(assemblyPath).GetExportedTypes(); The exception (names obfuscated): System.MissingMethodException was unhandled Message="Method not found: 'Void Namespace.IMyMethod.MyMethod(UInt32, Namespace.IMyOtherMethod ByRef, UInt32 ByRef)'." ...

implementing licensing in .net winform app.

How can i implement licensing application like 30 day trial free ...

Play .WMV with C#.Net

Hi I want to play a WMV (Or Video File ) in C# Application.. I Have made software in which when i click file then File menu opens then i select the media file but then when i click on play then file should be played.. so please guide me... and if any dll is required then please tell me ... thanks in advance ...