Tag | .NET 4.0 Posts

Just a small tidbit that's sprung up today. I had to book-keep and emit diagnostics for the average thread performance in a highly-threaded code over a period of last X number of calls and no more. Need of the day: a thread-safe, self-managing stats container. Since .NET 4.0 introduced new thread-safe 'Collections.Concurrent' objects and I've been using them frequently - the one in particular seemed like a good fit for storing each threads' performance data - ConcurrentQueue. But I wanted to store ...
Hey everyone, I just discovered this great post yesterday that shows how to have msbuild build projects in parallel Basically all you need to do is… Read more at http://blog.danskingdom.com... ...
It is about time to look at the new .NET Framework 4.5 release along with the brand new Visual Studio 11 Beta 1. Besides the new features I wanted to see if the massive performance complaints have been taken and addressed. First the good things. VS11 Beta 1 does start a lot quicker as its predecessors. It is nearly as fast as VS2008 which was from the performance aspect the best release since VS6. This is great news. Below are some numbers I did compile on my Windows 7 x32 PC with a Intel Duo 6600 ...
Translate this pageArabicBulgarianCatalanC... SimplifiedChinese TraditionalCzechDanishDutch... CreoleHebrewHindiHungarianI... TranslatorCheck out this page in {0} translated from {1}translated fromOriginal:Translated:Aut... translation powered by Microsoft® TranslatorStart translatingStop translatingCloseClose ...
While the title of this post suggests focus on LINQ to Twitter, it also indicates that I’ll be discussing how to build a Windows 8 Metro application. The application itself will display a list of tweets from Twitter’s public feed. In the sections that follow, you’ll read background information on pre-requisites to understanding the post, learn how to get LINQ to Twitter working with Visual Studio 11, and then see a step-by-step on how the application is built. Getting Started You can build Metro ...
An important update to the Microsoft Web Protection Library (AntiXSS Library v4.2.1) is available at http://wpl.codeplex.com/rel... reason for the update is as follows:"This release addresses a vulnerability in the HTML Sanitizer, MS12-007 http://technet.microsoft.co... and adds full support for .NET 4.0 as well as restoring support for .NET 2.0. The sanitizer has been changed to remove all CSS it encounters, this new behaviour means that if you were ...
Here’s a site, by Lucian Wischik, that contains 101 Async Samples: http://www.wischik.com/lu/A... There are examples in both C# and VB. Some examples have a selector that lets you toggle between .NET 4.0 and the new Async syntax. Each example has a run button so you can execute and see the return value. Throughout, you’ll see many different ways to use Async. I think it’s a very nice resource. @JoeMayo ...
A little more than three months ago, Microsoft hosted the //build/ conference at which they unveiled the upcoming version of Windows (commonly called Windows 8, though I don’t know if the marketing folks have accepted the fact that that is the name most of us are expecting for it yet). They released to the developer world a build of it called the Windows Developer Preview (and Windows Server Developer Preview) along with various tools for creating the new “Metro style” apps. I wasn’t able to make ...
Today's $10 Deal of the Day from APress at http://www.apress.com/97814... is Beginning WF Windows Workflow in .NET 4.0."Indexed by feature so you can find answers easily and written in an accessible style, Beginning WF shows how Microsoft's Workflow Foundation (WF) technology can be used in a wide variety of applications. " ...
Problem Our global Jenkins continuous integration server throws this error during compile step. My local TeamCity continuous integration server runs fine. What is the difference. Background I integrate some static code analysis steps via MSBuild-targets in the csproj files. To allow a fast developing without a code analysis for ever compiling I bound these targets only to RELEASE-configuration. With the MSBuild element <ImportGroup> only one condition must be specified. So my construct was: ...
Today's $10 Deal of the Day from Apress at http://www.apress.com/97814... is Pro Dynamic .NET 4.0 Applications Data-Driven Programming for the .NET Framework "As a developer, you are likely painfully aware that not all features of an application can be anticipated when the software ships. In order to cope with these eventualities and save yourself time (and perhaps money), it makes sense to write your applications in such a way that end users can be made as independent of the developers as possible. ...
Today's $10 Deal of the Day from APress at http://www.apress.com/97814... is Beginning WF Windows Workflow in .NET 4.0 "Indexed by feature so you can find answers easily and written in an accessible style, Beginning WF shows how Microsoft's Workflow Foundation (WF) technology can be used in a wide variety of applications." ...
Today's $10 Deal of the day book from APress at http://www.apress.com/97814... is Introducing .NET 4.0 With Visual Studio 2010 "You may know what's happening in C#, but what about the Azure cloud? How is that going to affect your work? What are the limitations of the pLINQ syntax? Introducing .NET 4.0: with Visual Studio 2010 guides you through the innovations that matter and helps you to seize new opportunities confidently and quickly. " ...
Unlike the release of VB.NET with .NET 4.0, the next release of VB.NET doesn’t have the anything like as many new features, which is almost certainly because the language is really maturing and a lot more parity has been achieved between C# and VB.NET. Async The big new feature for both languages is the introduction of the await/async keywords. I won’t go into detail here because they are covered in lots of other places (including the VB.NET team blog). Yield One if the freebees we get because of ...
The nice thing about unintended changes is that you never think it could happen until you get bitten by a nasty change. Microsoft did publish a complete list of breaking changes here which is complete to my knowledge. But although the intentional changes are listed there are side effects which can cause you to search for hours your (non) fault. One change was to create a new GAC for .NET 4 assemblies to prevent breaking applications which rely on the structure of the GAC introduced with .NET 2.0. ...
Today, I was testing a Web site for deployment and encountered the problem described in the subject of this post. However, the process leading up to realizing the true problem was far from clear. This post describes my initial experience, steps I took to isolate the true problem, and what I did to fix it. To put this in context, My project is an ASP.NET 4.0 Website. Bump! While testing, I encountered a System.Web.HttpException with the following message: File does not exist. with the following stack ...
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 I recently started working with Visual Studio 2010 and .NET 4.0 and I came across one of the new language features, String.IsNullWithWhiteSpace. Basically, it's an enhanced version of the commonly used String.IsNullOrEmpty. This new enhanced version goes a step forward and checks for whitespaces such as tabs. String myString = “ “; //returns false Bool result = String.IsNullOrEmpty(myStri... //returns true Bool result = String.IsNullOrWhiteSpace(m... ...
Issue: Due to an upgrade from .Net 2, 3.0 or 3.5 to .Net 4.0 or you are starting a new .Net 4.0 project, you may run into this message: A potentially dangerous Request.Path value was detected from the client Or A potentially dangerous Request.Form value was detected from the client Environment: .Net 4.0 MVC 3 (could be MVC 2 also because of the controller/action action filters that are available) Fix: Lets tackle the first issue: A potentially dangerous Request.Path value was detected from the client ...
We had an issue once we deployed our .Net 4.0 C# ZeroMQ solution to a Windows Server 2008 instance where the application would freeze up or block, seemingly on the initialization of our ZeroMQ library. Upon furthter investigation it was discovered that the application was blocking on the construction of each new zmq Context object. Having exhausted all other alternatives, an internet search revealed a stack overflow post : http://stackoverflow.com/qu... ...
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 ...
This morning I got the information that the Windows Azure Tools for Visual Studio 2010 - August 2011 Upgrade had been released. The version of this new upgrade is 1.4.40727.1601 with the Windows Azure SDK v1.4.20407.2049. This upgrade includes some awesome features that I was looking forward for a long time, which are: Profiling the application running in Windows Azure. New ASP.NET MVC 3 web role template. Multi-configuration files in one cloud project. More validation in the service package and ...
So, I wanted to build a simple display for the foyer of our building that would display in real-time the zeitgeist of the nation. What better way of testing the pulse of the UK, than pulling down the latest list of Twitter Trends. Twitter exposes this as a nice bit of JSON XML If you call - http://api.twitter.com/1/tr... You get a nice JSON response explained fully here https://dev.twitter.com/doc... .Net 4.0 has a great JSON deseriliser that can quickly read inbound ...
Yesterday I started a discussion about adding a new command to nuget.exe. It ended in creating an extension to the command line that behaves in the same way without having to dive into the nuget code base or add more complexity to it. I haven’t seen any blog posts or documentation surrounding this new concept (new in nuget 1.4) of extending the command line except for Matt Hamilton’s posts on using NuGet for plug-ins and NuGet with MEF (which are not quite this concept). Here is my experience. I ...
The Membership API came in .NET 2.0 and was a huge enhancement in building web applications with users, managing roles, permissions etc., The Membership API by default uses SQL Express and until Visual Studio 2008, it was available only through the ASP.NET Configuration manager screen (Website – ASP.NET Configuration) or (Project – ASP.NET Configuration) and for every application, one has to manually visit this place to start using the Security and other settings. Upon doing that the default SQL ...
When we build an application that will be deployed on Windows Azure, one thing we should keep in mind is that the assemblies installed on the virtual machines on Windows Azure are very limited. It only contains the default assemblies in .NET 3.5 SP1 and .NET 4.0. For those references not included on Windows Azure, we should set their Copy Local = True. As the image shown above I set the unity reference as Copy Local = True as I pretty know that in Windows Azure the assemblies of Enterprise Library ...
Save 30% at LearnVisualStudio.NET http://www.learnvisualstudi... Learn Visual Studio have just added dozens of new Silverlight 4.0 videos to their collection and will continue adding new Silverlight videos as well as new ASP.NET 4.0 videos throughout June and July! Get immediate access to all of these videos and over 1,000 video tutorials in our collection on ASP.NET, C#, VB.NET and more! Get started for as little as $48.97 for a 1 Year Subscription! You can ...
Today's $10 Deal of the day from Apress at http://www.apress.com/ is Beginning WF Windows Workflow in .NET 4.0 Indexed by feature so you can find answers easily and written in an accessible style, Beginning WF shows how Microsoft's Workflow Foundation (WF) technology can be used in a wide variety of applications. More http://www.apress.com/97814... ...
VSCommands2010 adds multiple convenient features to Visual Studio 2010. For instance, one feature of VSCommands2010 I use frequently is the ability to visually "Group" partial classes in Solution Explorer. This comes in handy especially with the relatively large number of files in our .Net 4.0 solutions. I did however run into an interesting problem as I attempted to upgrade VSCommands to the latest version. Updates to the tool were successfully downloaded to disk as evidenced by the progress bar, ...
Its been a while since I blogged. Its been hard balancing blogging time, work and many other activities. Most my days and even evenings have been cluttered with a number of tasks ranging from mundial to critical. There is some which have been most interesting include very nice lessons I took from from some of the people I respect in the industry. I will try and highlight some of the things I did in below. 1) The DataObjects.NET contribution programme. From February this year I quickly responded to ...
URL Routing is a very nice new feature in ASP.NET 4.0. And in Visual Studio everything works just great. But as soon as you start testing on IIS you get a "Error 404.0 - Not Found". To solve this you need to make sure that: you have set the Application Pool to "asp.net 4.0 application pool". Routing will not work with "asp.net 4.0 classic application pool". you add the following code to your web.config: <system.webServer> <modules runAllManagedModulesForAllR... <remove ...
I have stepped it up a notch and am speaking at numerous user groups and technical conferences in the South East in the coming months. These include .NET & SharePoint user groups as well as SQL Saturday and SharePoint Saturday all day conferences. I will also be submitting to a couple of more regional events that I’m considering including Houston TechFest. If you are in the area, I’d love to have you come by to check out these events. Also, if you are interested in having me present at your event, ...
I have a .Net 4.0 site that uses Entity Framework and Linq to SQL. After reworking a few tables and a few page operations, a new error appeared: "Row not found or changed". Every time I commit changes to a particular table, this error would be raised. From a quick review of msdn and the internet, the primary reason for this exception appears to be data concurrency issues - (The source data in the database is out of sync with the data you are attempting to update.) That did not apply to my development ...
Employee Info Starter Kit is an open source ASP.NET project template that is intended to address different types of real world challenges faced by web application developers when performing common CRUD operations. Using a single database table ‘Employee’, it illustrates how to utilize Microsoft ASP.NET 4.0, Entity Framework 4.0 and Visual Studio 2010 effectively in that context. Employee Info Starter Kit is highly influenced by the concept ‘Pareto Principle’ or 80-20 rule. where it is targeted to ...
Employee Info Starter Kit is an open source project that is highly influenced by the concept ‘Pareto Principle’ or 80-20 rule, where it is targeted to enable a web developer to gain 80% productivity with 20% of effort with respect to learning curve and production. It is intended to address different types of real world challenges faced by web application developers when performing common CRUD operations. Using a single database table ‘Employee’, the current release illustrates how to utilize Microsoft ...
Ever wanted to have a simple jQuery menu bound with ASP.NET web site map file? Ever wanted to have cool css design stuffs implemented on your ASP.NET data bound controls? Ever wanted to let Visual Studio generate logical layers for you, which can be easily tested, customized and bound with ASP.NET data controls? If your answers with respect to above questions are ‘yes’, then you will probably happy to try out latest release (v5.0) of Employee Starter Kit, which is intended to address different types ...
As a post VS2010 SP1 installation activity, I am recompiling all my open source projects. The first is XHTMLFIX at http://xhtmlfix.codeplex.com/ This LGPL project has simple fixes to ASP.NET 2.0/4.0 to achieve XHTML compliance as measured by the W3C tests at http://validator.w3.org/ The XHTML project shows as untrue the commonly held belief that MVP or MVC are necessary for producing XHTML compliant web pages. Incidentally the other supposed advantage of MVP and MVC over web forms of easier testing ...
(UPDATED 2/26/2011 with higlighted information) I previously blogged on running ASP.Net MVC in an ASP.Net WebForms project. My reference at the time was a freely-available PDF document by Scott Guthrie which covered the setup process in good detail. As I am preparing references to share with our audience at my upcoming talk at the Deerfield Beach Coders Café on March 1st (http://www.fladotnet.com/R... I found a nice blog post by Scott Hanselman on running both ASP.Net 4.0 WebForms ...

At http://blogs.msdn.com/b/ukmsdn/archive/2011/02/10/msdn-virtual-lab-introduction-to-microsoft-asp-net-web-forms-4-0.aspx there is a free virtual lab on some of the developments that Microsoft have made in web forms in ASP.NET 4.0.

In this Issue: Robby Ingebretsen, Victor Gaudioso, Andrea Boschin(-2-), Rudi Grobler(-2-), Michael Crump, Deborah Kurata, Dennis Delimarsky, Pete Vickers, Yochay Kiriaty, Peter Kuhn, WindowsPhoneGeek, and Jesse Liberty(-2-). Above the Fold: Silverlight: "Silverlight Simple MVVM Printing" Deborah Kurata WP7: "Creating theme friendly UI in WP7 using OpacityMask" WindowsPhoneGeek Tools: "KAXAML v1.8" Robby Ingebretsen Shoutouts: Peter Foot posted Silverlight for Windows Phone Toolkit–Feb 2011 Rudi Grobler ...
Applications get data from lots of different sources. The most common is to get data from a database or a web service. Typically, we encapsulate calls to a database in a Repository object and we create some sort of IRepository interface as an abstraction to decouple between layers and enable easier unit testing by leveraging faking and mocking. This works great for database interaction. However, when consuming a RESTful web service, this is is not always the best approach. The WCF Web APIs that are ...
We had a very interesting meeting on Friday 28th last week. We had 10 attendees and two speakers. The first topic presented was Cloud Computing, presented by Allan Rwakatungu @arwakatungu who works with MTN Uganda. He gave a very brilliant outline of how Cloud computing and service oriented applications had begun changing the platform for operating business and the costs it saves because of scalability and elasticity. He went on to demonstrate the steps you would take if you are beginning a new Windows ...
Many of my clients are actively using Silverlight 4 and RIA Services to build powerful line of business applications. Getting things set up correctly is critical to being to being able to take full advantage of the RIA services plumbing and when developers struggle with the setup they tend to shy away from the solution as a whole. I’m a big proponent of RIA services and wanted to take the opportunity to share some of my experiences in setting up these types of projects. In late 2010 I presented a ...
The EONumLib provides a set of types to represent numbers with arbitrary precision. There are three extended numeric types, to represent signed and unsigned integers, rational numbers, and real numbers: BigInteger, BigRational and BigFloat As you are aware: BigInteger (http://msdn.microsoft.com/... ) and Complex (http://msdn.microsoft.com/... ) structs are included with .NET 4.0 System.Numerics namespace and the BigRational ...
I would like to share a few points with regards to encrypting web configuration sections in .Net 4.0. This information is also applicable to .Net 3.5 and 2.0. Two methods can work perfectly for encrypting connection strings in a Web project configuration file: 1-Do It All Yourself! In this approach, helper functions for encrypting/decrypting configuration file content are implemented. Program would explicitly retrieve appropriate content from configuration file then decrypt it appropriately. Disadvantages ...
I have been specifically requested to blog about getting an ASP.NET 4.0 site working on a Windows 2008 server that has never run a 4.0 web site before. Make sure the 4.0 framework is installed on the server! Patch it will ALL the security patches have been applied. ((for a live server, make sure that you tested the patches on your development server first) You will find the HTTP Log status codes at http://support.microsoft.co... - they are very important in understandign the IIS logs) After ...
Today's Apress $10 deal of the day is Beginning WF: Windows Workflow in .NET 4.0 "Indexed by feature so you can find answers easily and written in an accessible style, Beginning WF shows how Microsoft's Workflow Foundation (WF) technology can be used in a wide variety of applications." I am reviewing this book. At $10 for the PDF, this book is a bargain ...
NET Mathematical Libraries .NET Builder for Matlab The MathWorks Inc. - http://www.mathworks.com/pr... MATLAB Builder NE generates MATLAB based .NET and COM components royalty-free deployment creates the components by encrypting MATLAB functions and generating either a .NET or COM wrapper around them. .NET/Link for Mathematica www.wolfram.com a product that 2-way integrates Mathematica and Microsoft's .NET platform call .NET from Mathematica - use arbitrary .NET types directly from ...
Today's Apress $10 deal of the day is Introducing .NET 4.0: with Visual Studio 2010 Deal is at http://www.apress.com/info/... Details of the book are at http://www.apress.com/book/... I have been using Framework 4.0 for a year now and I am still finding out new things introduced with 4.0 - a book like this is a very welcome addition to my library ...
We are currently in the process of upgrading one of our applications to .Net 4.0. Aside from us geeks wanting to always use latest and greatest technologies, an immediate business need for Silverlight 4.0 features justified our upgrade endeavor. The following is a summary of some issues we ran into with our web project: For security purposes, the IIS 7 .Net 4.0 ISAPI filter is disabled. “Allow” it from the ISAPI and CGI Restrictions screen as shown: Figure 1 - Allowing ASP.Net 4.0 ISAPI Filter By ...
Up to ASP.NET 3.5 Request Validation is enabled by default. In order to to disable this for a page you needed to set the ValidationRequest property in the page directive to false. This is no longer the default case in ASP.NET 4.0. If you want to use this behaviour you need to add the follwing setting in web.config <httpRuntime requestValidationMode="2.0" /> Of course you need to check all input in the page for XSS or other malicious input if you set the pages request validation to false ...