Tag | .NET Posts

Part of the fun of being a consultant is that the technology you use changes from day to day. Recently it is WCF which, while knowing the concepts of since it came out I haven’t used up until now. The nice thing is that it really isn’t any harder to develop for than a normal ASP.NET web service. A couple of the attributes change and which project type you start with is different, but it is still message based services. Just like the method of a web service needs a Webmethod attribute a method in ...
I originally started looking for how to make a TextBox have autocomplete capability. Strangely all the articles said that it couldn’t be done. The last thing you want is for your applications to make your users struggle entering information when every other application gives them a quicker entry method. So what is the solution? The TextBox tag has an InputScope property which if you set it to Text it builds a dictionary list as the user types. For the other InputScope types it mainly changes the ...

At http://weblogs.asp.net/kencox/archive/2010/08/24/fed-up-with-system-data-metadata-edm-objectitemassemblyloader.aspx there is an interestign article about problems encountered with  Entity Framework.

I recently discovered this post which shows how you can programmatically update queries in TFS, which is great for…

Read more at http://blog.danskingdom.com/using-tfs-programmatically/

I'm not a desktop application developer. I wrote only one app using the WinForms, but I must tell, it was interesting experience. Now I'm writting second WinForms app and second time, I needed the possibility to updating the progress bar in an app. So I think this is a good opportunity to put on the blog the code snippet for that to have a place where I can have some useful code for future references. Ok, so let's go to the solution details. As every desktop application developer know (or should ...
So I've read "Singleton I love you, but you're bringing me down" at http://www.codingwithoutcom... and the articles it refers to. And it makes sense, basically. In my latest code, I created one Singleton (see http://geekswithblogs.net/A... ) and had it hold the reference to my global factory, which, I guess, makes it a service locator. The factory itself uses (and hides from the rest of the code) Ninject 2.0. ...
Check out the Top Five most popular news at SilverlightShow for SilverlightShow Top 5 News for August 8 - 14, 2011. Here are the top 5 news on SilverlightShow for last week: Understanding the Microsoft Shift on Silverlight and HTML5 Building a CRM Demo using RadControls for Silverlight and OpenAccess ORM Create PDF in Silverlight New book coming soon: Real World .NET 4 and C# Mango RTMs! Now what? Visit and bookmark SilverlightShow. Stay in the 'Light ...
In my previous posts I have shown how to get xml data from database and deserialize it. But sometimes we want to work with the xml and do some operations on it. To working with xml, in the .net framework there are two tools for it. One is to use the XmlDocument class and second is the linq to xml with the XDocument class. I personally prefer to work with linq to xml, so I must convert the XmlDocument object to XDocument which I have after I took the xml from database. To convert the XmlDocument to ...
I’ve just published three webcasts looking at AppFabric Messaging, Introduction to Azure AppFabric Queues, AppFabric Duplicate Message Detection and AppFabric Messaging Message Expiration. There are more webcasts on the AppFabric June CTP here. This article will take a look at the code used in the duplicate detection webcast and explain the concepts involved. Bear in mind that this code is based on the AppFabric June CTP, things may change when the production version is released. AppFabric Duplicate ...
The Microsoft SQL Server team has been interacting on a regular basis with developers and users in the form of surveys. If you have 15mins spare and would like to do your bit to help shape the roadmap for SQL Server then please pop over to http://www.zoomerang.com/Su... And… My own simple one question version if you only have one minute to spare. Apologies in advance for stuff I left out! Related Links: More details of the survey are posted on the ADO.NET team blog ...
I often get asked about how we are using Windows Azure internally and under NDA I can share some of the details – but its great to be able to point publicly at some of the excellent work that has been going on. And they are genuine technical case studies … hurrah! :-) How Microsoft IT Deployed a Customer Facing Application to Windows Azure in Six Weeks Learn how the Microsoft IT Volume Licensing team gained experience with Windows Azure by focusing on a straightforward, isolated customer-facing application ...
Several Outlook 2010 users with Exchange 2010 mailboxes reported the following issues. When creating a new message and adding a Universal distribution list to the To: field, they attempt to expand the membership of the DL and they get an “Cannot perform the requested operation. The command selected is not valid for the recipient. The connection to Microsoft Exchange is unavailable. Outlook must be online or connected to complete this action.” error message. In addition, if they tried to look at the ...
Windows Communication Foundation is a powerful tool for building contract based messaging. As with most powerful technologies with flexibility comes a fair amount of complexity. I ran into one of these situation while trying to send files as part of message in the form of a byte array. In itself this is a simple concept. The problem is that the default configuration of WCF is setup to protect us from denial of service attacks to the best of its ability. In order to achieve this it is setup for relatively ...
I have a client that desired to have the MOSS 2007 capability of My Links but in no way wanted My Sites in SharePoint 2010. I took some steps that gave them the capability of My Links by creating a personalized web part that could be linked to in a modal. It worked, However, in addition, they didn’t want users without web admin rights to see the SharePoint ribbon. The result was that admins could use the web part and the personalization data would be kept by SQL in the personalization database. Members ...
In this Issue: Michael Washington, Andrej Tozon, András Velvárt, Michael Crump, Nigel Sampson, Ben Gracewood, Jeremy Likness, Den Delimarsky, Austin Andrews, Morten Nielsen(-2-), and Alex Sorokoletov. Above the Fold: Silverlight: "Using Attribute Validation in Silverlight with WCF RIA Services Example" Jeremy Likness WP7: "SurfCube on Mango Part 3–Share on Facebook, Twitter, LinkedIn" András Velvárt LightSwitch: "How To Create a Simple Control Extension (Or How To Make LightSwitch Controls You Can ...
At http://john-sheehan.com/blo... is an excellant compendium of cheat sheets. Proud user ofInstant C# and VB.NET code generation in Microsoft Visual Studio ...
There is a misunderstanding about SQL Injection attack in that some people think that that is is restricted to Microsoft. Here is a case where it happened on a PHP system. see http://www.securityfocus.co... Proud fan ofThe best C# & VB.NET refactoring plugin for Visual Studio ...
The origin of the following is now lost in the mists of time but it bears repeating. A big party is being held to honor relational database systems & their impact on the modern society. Outside the venue, the host awaits the guests. The first limousine arrives and out steps Oracle followed by 4 people Host: Who have you brought along? Oracle: I have 4 DBA’s in tow. One to install me, one to design the databases, one to administer me and the other to justify the cost. A second limo arrives and ...
If you've found this blog posting, you've probably been banging your head against a wall trying to get those errors generated from your web service to appear in your MVC web site. You may have already discovered that while you can see the messages display in Fiddler, getting them to appear in your project takes a little bit of work. First, l strongly recommend you check out the work already done on this subject by more dedicated bloggers than l: http://kenneththorman.blogs... ...
So, you grabbed the latest Mango Build and installed it on your phone. Now your probably thinking, Why should I update to the latest Mango Beta 2 Refresh? Well, I will give you two good reasons. New Screen Shot Tool built into the Emulator Marketplace Test Kit Screen Shot Tool You may be thinking, there are a hundred ways to take a screen shot. I personally used SnagIt, but this involved a lot of steps. Load up SnagIt. Make sure my Emulator was visible. Click the “Capture Button” in SnagIt. Resize ...
Yesterday I presented at SPSTC, had an absolute blast, and I truly hope the attendees to my session did as well! That was my requirement! We discussed the reasons for failed requirements management, scope creep and other pitfalls. But the main goal behind this is how to enable an effective Requirements Management Engine by using SharePoint Technologies and Team Foundation Server. Keep posted as there is much more to come in this space about that thought process. In the meantime, here is the deck ...
If you want to write scalable applications with a high throughput you need to take care of good data structure design to make your application scale. If you want to read for example 200 MB data from a file and process it you can finish it in 5 or 30s. To be on the 5s side it is educational to see how fast you actually can get. To measure the raw disc performance I do read the file into a pre allocated byte array. [Test] public void ReadFile_Store_In_ByteArray() { var sw = Stopwatch.StartNew(); int ...
Everyone has a journey. You start off young & stupid, and 2 decades later, you're closer to understanding the nature of reality. That’s one of the main goals in life, to seek knowledge (justified, true beliefs – pick any 2 J ). I must have read 5000 books in my life. From some of my readings it could be construed that reality computes itself, It from Bit. From others, it can be concluded that Entropy is decreased by increased rates of computation, and in the short span of human civilization, ...
Microsoft isn’t the only one who seems to be pushing native computing once again. We’re now seeing Google at the same table with the current beta release of Chrome. Yes, Chrome now supports native applications to be embedded in a web site and it’s just like embedding JavaScript. More information can be found in here: http://chrome.blogspot.com/... The native client SDK runs a sandbox environment which means Chrome handles security of the module just like ...
Here's a little used gem in .Net. In the Path class there is a Combine method. What this method does is to properly combine two parts of a file path. For example, you may have a path that you want to write a file to and a name of the file to write. I've seen a lot of code where in this case most programmers just string concat the path and file name. This doesn't always work right if you don't think about it. That's where Path.Combine comes in. You don't have to think about the details of combining ...
In this Issue: Mike Taulty, Derik Whittaker, Den Delimarsky, Oscar Agreda, and Morten Nielsen(-2-). Above the Fold: Silverlight: "FlickR Searching with Silverlight & Rx" Mike Taulty WP7: "New Video – Windows Phone 7 Guide – Part 7 – Unlock apps in a locked emulator" Den Delimarsky Shoutouts: Michael Palermo has the latest up: Desert Mountain Developers for August 11 From SilverlightCream.com: FlickR Searching with Silverlight & Rx Mike Taulty posted a live demo and write-up on a FlickR search ...
Further to comments on this post, I realised my HttpModule which gives a user a friendly error message if they upload a file which is too big only dealt with half of the problem. The maximum size a request can be is specified in the machine.config and web.config in the maximumRequestLength attribute on the httpRuntime element; if a user uploads a file which is larger than that, the part of the HttpModule which checks the request size is by-passed, and the user gets a not-very-friendly 'Maximum Request ...
DevProConnections and WindowsITPro are now accepting nominations for the 2011 Community Choice Awards. These awards allow you to nominate developer products and services for special recognition. We’d like you to consider nominating Visual WebGui and as a thank you, will be giving away a few licenses. All you have to is click the links below and in the “Add-In” category on the DevProConnections survey (category # 1) and “Best Cloud Computing Product or Service” category on the WindowsITPro survey ...
In this Issue: Morten Nielsen(-2-), Mike Gold, Jesse Liberty, Derik Whittaker, Den Delimarsky, Austin Andrews, and Oscar Agreda. Above the Fold: Silverlight: "Silverlight MVVM Code Smith Templates" Oscar Agreda WP7: "Working with a simple ViewModelLocator from MVVM-Light" Mike Gold From SilverlightCream.com: WPF vs. Silverlight - Part 4 - Animations Part 4 of Morten Nielsen's WPF and Silverlight comparison yeields this post on Animations... the launching thereof to be exact WPF vs. Silverlight - ...
In this Issue: Kunal Chowdhury, Beth Massi(-2-), Gill Cleeren, Rajat Jaiswal, Mike Taulty, Jesse Liberty, Derik Whittaker, Den Delimarsky, Austin Andrews, and Oscar Agreda. Above the Fold: Silverlight: "How to Close Browser Window from Silverlight Application?" Kunal Chowdhury WP7: "How to access blacklisted apps in the Windows Phone emulator ROM (with the locked BIN image)" Den Delimarsky LightSwitch: "Getting Started with the LightSwitch Starter Kits" Beth Massi Shoutouts: Michael Palermo's Desert ...
I’m going to start with a simple code snippet which sorts an array of strings using LINQ. 1 IEnumerable<string> line = new[] {"Z","A","Ä"}; 2 var result = line.OrderBy(letter => letter); 3 Console.WriteLine("{0}", string.Join(" ", result)); The result might look like this: A Ä Z … or not. It depends on the thread culture the sorting is running in. The string order is culture aware (unlike char order which is culture invariant), so if we switch for instance on one of the Norwegian cultures ...
Recently, several enabled Remote call control (RCC) users reported that they were having issues making phone calls from Communicator. When they attempted to call a number, they got a “Cannot locate <user>” error message and when they clicked on Retry, they got another error message, “There may be an error in the address. Check the address and then try again.” After some troubleshooting, we found out our CSTA Gateway server was using an expired certificate. For communication to take place, the ...
The new version of Windows Azure Tools for Visual Studio 2010 i.e. the August 2011 release just got out. You can read and download it from http://blogs.msdn.com/b/win... My favorite pick is the ability to add MVC3 Web Roles. In the past we had to do certain work-around for running MVC3 Applications. Now, there is an ability to add MVC 3 Web Role There is now support for Universal ...
In this Issue: Colin Eberhardt, Ollie Riches, Morten Nielsen(-2-), Mike Taulty, Den Delimarsky, Derik Whittaker, Oscar Agreda, Austin Andrews, Manas Patnaik, and Jesse Liberty(-2-). Above the Fold: Silverlight: "Conditional CellTemplete controls at Runtime in Silverlight DataGrid" Manas Patnaik WP7: "Implementing a Windows Phone 7 Conversation View Part Two" Colin Eberhardt Expression Design: "Tutorial: Creating an Icon" Austin Andrews Shoutouts: SilverlightShow has their top 5 from last week listed: ...
Check out the Top Five most popular news at SilverlightShow for SilverlightShow Top 5 News for August 1 - 7, 2011. Here are the top 5 news on SilverlightShow for last week: Free Silverlight Show Webinar: Deep-DIVE in Silverlight FIVE Silverlight Menu4U 7 reasons to be a Windows Phone 7 Developer WCF RIA Services Toolkit (August 2011) - And Updated NuGet Packages KinectSDK + Windows Phone 7 Mango Visit and bookmark SilverlightShow. Stay in the 'Light ...
This is my first post here, and I’m really happy to be a part of this thriving community! I would like to use this post as an introduction to myself. I’m Ahmed Mohamed an Egyptian Mechanical Power Engineering student, and I’m really interested in programming, especially 2D games with Microsoft XNA. I’ve started programming 6 years ago using Visual Basic 6 as a hobby, then learned HTML, .NET, C# and C++. Slowly after getting a good grip of C#, I was very interested in XNA, and soon after it’s launch, ...
The TFS 2010 Power Tools, August 11 release shortly on its way, read more about the teaser here at Brian Harrys blog http://blogs.msdn.com/b/bha... What feature would you have liked to be included? Share this post : ...
When working on Web Forms and Windows forms, it is useful to be able to measure height and width on the screen. I have used Iconico ruler before and it is a very useful gadget. Download it from http://www.arulerforwindows... Can't code withoutThe best C# & VB.NET refactoring plugin for Visual Studio ...
Had a great time again this year at St. Louis Day of .NET. Thanks to everyone who attended my sessions. Based on feedback it seems like I'll need to do a presentation on SQL Server Compact next year. Doesn't seem to be a lot of awareness on this great product. But a lot can change in one year. As promised, the PowerPoint slides and code samples can be found on my SkyDrive here. Here is what you get. Customizing BlogEngine 2 PowerPoint (Slides and notes) How to configure BlogEngine to use ASP.NET ...
Its been a while since I played with Web forms, AJAX stuff. I was curious in checking out, particularly how the AJAX Control Toolkit which used to be my favorite in the past is evolving. There is a new release of AJAX Control Toolkit, just hot off the oven. You can download the binaries from http://ajaxcontroltoolkit.c... Now, while the regular way we have downloaded and used AJAX Control Toolkit is by visiting the above codeplex page and download the latest version, there is also a newer ...
I'm an Asp.Net web developer, but the truth is, I always preferred the MVC than WebForms. Especially what I hate in WebForms is the update panel control. I have always problems with it when I want to use it in my current scenario, so easier to me is to write some jQuery code and do the controls refresh manually. I know that, there are situatios when I can't skip the update panels, so this post is a reference for my future battles. A simple example of one update panel with button and some labels. ...
In this Issue: Michael Washington, Pontus Wittenmark(-2-), Derik Whittaker, Peter Kuhn, Michael James, XamlNinja, Adam Kinney, Morten Nielsen(-2-), Alex Sorokoletov(-2-), and Den Delimarsky. Above the Fold: Silverlight: "WPF vs. Silverlight - Part 1 - Custom Controls Theme" Morten Nielsen WP7: "New Windows Phone “How Do I” Video Series" Adam Kinney LightSwitch: "The LightSwitch Control Extension Makers Dilemma" Michael Washington Shoutouts: Michael Palermo has his latest Desert Mountain Developers ...
Next Tuesday Microsoft will release patches to fix 22 vulnerabilities in Internet Explorer, Windows, Visio and Visual Studio. Be prepared to patch your PCs. Details are at: http://www.microsoft.com/te... http://www.computerworld.co... Passionate aboutInstant C# and VB.NET code generation in Microsoft Visual Studio ...
The IE6 Countdown continues - two more Countries (Sweden and Denmark) are now below 1%! I congratulate the users in these countries for upgrading their browsers. I note that the Czech Republic and Poland are now at the 1% level. Soon they too will have consigned IE6 the the Museum! So what are you doing to encourage your clients and your friends to upgrade to a more up to date browser? Can't code withoutInstant C# and VB.NET code generation in Microsoft Visual Studio ...
In this Issue: Kunal Chowdhury(-2-), Mike Talbot, Michael Washington, Davide Zordan, Pontus Wittenmark(-2-), WindowsPhoneGeek, Pete Brown, Dhananjay Kumar, Erno de Weerd, Jesse Liberty(-2-), Peter Torr, Derik Whittaker, and MIchael Crump. Above the Fold: Silverlight: "Creating a Silverlight 5 Helper for ASP.NET MVC3 Razor" Pete Brown WP7: "Page State–Step by Step" Jesse Liberty LightSwitch: "Using the Telerik Rich Text Editor In Visual Studio LightSwitch" Michael Washington Shoutouts: Laurent Bugnion ...
For a very (too) long time, the installation procedure for MVVM Light sucked. It involved downloading and unzipping files in various locations. Unfortunately, creating an automated installer is not completely trivial because of the variety of files that are getting installed: Binaries, Code Snippets, Project and Item Templates, all require different locations, and all that for VS2008, VS2010, Blend 4 and Silverlight 3, Silverlight 4, WPF3.5 SP1, WPF4, WP7.0 and now WP7.1 “Mango”. Read the rest of ...
I had some really great responses to my last post regarding some bad code I've shown to interviewees - pretty much everything I intended to be bad was spotted, as well as some interesting points I hadn't considered. Here's the code again along with the bad bits as I saw them, and then I'll go over the extra points raised in the comments. The bad code: namespace MyNamespace { using System; public class Customer { public void PlaceOrder(string orderReference, OrderedProductData[] orderedProductData) ...
I am a firm believer that, regardless of the framework you use, if the framework is good it provides you all of the things you need. I believe ASP.Net MVC 2 is good and therefore provides me everything I need. This means I don't need to write a significant amount of custom UI code (jQuery, MVC Ajax, etc.) to do things that should be considered "standard". One of these pretty standard things submitting a form via Ajax. MVC provides for this very well with Ajax.BeginForm. The contents of the form are ...

The biztalk videos for BDD and acceptance testing are now on cloudcast

http://www.cloudcasts.net/Default.aspx?category=BizTalk

If you plan to use Silverlight for Windows Embedded on an i.MX53 from Freescale, give a look at: http://www.adeneo-embedded.... Adeneo Embedded developed an OpenGL rendering plugin that will offload most of the rendering to the dedicate hardware and will provide a more responsive UI leaving plenty of CPU cycles for your own code. This will lead to a better user experience for the end-users of your devices ...