Tag | .NET 3.5 Posts

It is an oft-repeated maxim that you shouldn't add methods to a publically-released interface in an API. Recently, I was hit hard when this wasn't followed. As part of the work on ApplicationMetrics, I've been implementing auto-reporting of MVC action methods; whenever an action was called on a controller, ApplicationMetrics would automatically report it without the developer needing to add manual ReportEvent calls. Fortunately, MVC provides easy hook when a controller is created, letting me log ...
Last week I was asked to mask or obfuscate a large volume of data residing in a production database for our software quality assurance team to use in testing some functionality. The data resided in various tables and in several columns per table. Yet, this procedure would need to be done over and over again as the data gets depleted. Yet, the masking supposed to be hidden from the QA people and centrally controlled. I proposed to use SSIS. The next day I did a web scan to just find out that noting ...
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 ...
If you've ever had a poke around System.dll or System.Core.dll in Reflector, you may have noticed TypeForwardedToAttributes applied to the assembly: [assembly: TypeForwardedTo(typeof(Lazy... [assembly: TypeForwardedTo(typeof(Lazy... [assembly: TypeForwardedTo(typeof(Acti... [assembly: TypeForwardedTo(typeof(Acti... [assembly: TypeForwardedTo(typeof(Acti... [assembly: TypeForwardedTo(typeof(Acti... This post has a look at what these are, ...

Here we go! After the Microsoft team released version 5 of Silverlight yesterday, MVVM Light is available for this version of the framework too. I did not create the installer yet (that will take a few more days), but you can download the source code and build it yourself easily.

Read the rest of this entry »

Threading was never so easy since .NET 4 with the TPL has been released. I know I am a bit late but there are so many nice things which might still be new to many of us. The IEnumerable interface has become famous with the introduction of LINQ but many of us have not yet realized that IEnumerable<T> and T[] or List<T> can be exchanged in many cases but there are cases where it is important to fall back to a pure IEnumerable<T> if you want to support lazy evaluation. .NET 4 has for ...
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: ...
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. ...
If you are developing you WCF service for web service deployment under IIS and coding with the Visual Studio web server you are in for a rude awakening when it comes time to deploy your solution. Ok, so that is a little over dramatic, but there are a few steps and precautions you need to know about. Below are the main steps to deploying your application to IIS assuming WCF is already installed and registered. The first step is to create an application pool. Make sure that for your .NET 3.5 WCF service ...
Giovanni Bassi published the original NuGet package for LINQ to Twitter (L2T), which I'm appreciative of. Since then, I have yet to do a release myself, but that is changing now. The current version of LINQ to Twitter is stable enough for a release, so the time is right. I think there are a few aspects of a LINQ to Twitter NuGet package that aren't as simple as point at a project and your done, so I'll document my process here in case anyone else is interested. Getting Started I had played around ...
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 ...
One of my recent projects involved creating an authentication module compatible with both .Net 3.5 and 4.0 and supporting platforms as early as Windows 2000. In the next few lines, I will highlight our progressive thinking and the various implementations we experimented with along with a summary of shortfalls we found with each. For those reading this post, please feel free to share your thoughts in the comments section as I am looking forward to reading and learning from your ideas and input. Principal ...
Visual Studio 2010 Service Pack 1 (SP1) is now available for general download for almost a week now. The Beta of SP1 came couple of months back and it did a lot of performance enhancements, added support for HTML5 tags and few other stuff related to web development. Now, the final release of SP1 is available. The good part is that, if you had installed the SP1 beta, you don’t have to remove the Beta and start all over again. You can apply the final release on top of the Beta and it works like a charm. ...
The reason I pose this question is that I'm looking at WPF development and so using the latest version seems sensible. However, this means rolling out the .NET 4 runtime to PCs on old versions of the framework. Windows XP is still the number one O/S (estimated 40%+ market share). To run .NET 4 on XP requires Service Pack 3, and although it is good practice to move to the latest service packs, often large companies are slow to keep up due to the extensive testing involved. In fact, .NET 4 is not installed ...
Neural Networks · I recently read a book Introduction to Neural Networks for C# , by Jeff Heaton. http://www.amazon.com/Intro... Not the 1st ANN book I've perused, but a nice revision. · Artificial Neural Networks (ANNs) are a mechanism of machine learning – see http://en.wikipedia.org/wik... , http://en.wikipedia.org/wik... · Problems Not Suited ...
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 ...
If we have to get data from the SQL database, the standard way is to use a receive port with SQL adapter. SQL receive adapter is a solicit-response adapter. It periodically polls the SQL database with queries. That’s only way it can work. Sometimes it is undesirable. With new WCF-SQL adapter we can use the lightweight approach but still with the same principle, the WCF-SQL adapter periodically solicits the database with queries to check for the new records. Imagine the situation when the new records ...
To follow up a previous article about timeouts and how they can affect your application I have extended the sample we were using to include WCF. I will execute some test scenarios and discuss the results. The sample We begin by consuming exactly the same web service which is sitting on a remote server. This time I have created a .net 3.5 application which will consume the web service using the basichttp binding. To show you the configuration for the consumption of this web service please refer to ...
A simple and straight forward article taken from http://christopherdeweese.c... which uses WCF REST Service Template 40(CS) Drop the Soap: WCF, REST, and Pretty URIs in .NET 4 Years ago I was working in libraries when the Web 2.0 revolution began. One of the things that caught my attention about early start-ups using the AJAX/REST/Web 2.0 model was how nice the URIs were for their applications. Those were my first impressions of REST; pretty ...
I recently bought Call Of Duty: Black Ops for the PC. It's a really realistic and challenging game, and my kids love it. However, if you want to share a gaming experience, you want to have different profiles for each player in the family. No luck with CoD:BO though. The game doesn't support mutliple profiles. I started looking around on the internet for known solutions and stumbled upon this guy who made his own multi-profile CoD:BO launcher. I was quick to notice that it was a .net 3.5 app, probably ...
Interested in learning Windows Server AppFabric? I hope so. It will be the backbone of the on-premise version of BizTalk in the coming years and based on news out of the PDC it looks like it will be moving to Azure (in some form) as well. There are many resources out there for learning Windows Server AppFabric. However, not all of them are equal and you can spend a lot of time meandering through material without making a lot of progress. Below is my suggested path for coming up to speed on it with ...
Over the last 3 years, Microsoft has slowly but surely been embracing REST as a programming model for the web in WCF. .NET 3.5 SP1 introduced some REST constructs allowing us to invoke WCF services with HTTP GET/POST/PUT/DELETE verbs in conjunction with UriTemplates. The REST Starter Kit (RSK) was then introduced on CodePlex and this provided many great features including an HTML help page, request interceptors, an HTTP client library, and more. Then WCF 4 was released and some of the features in ...
Extension methods were introduced with the .NET 3.5 framework as a mechanism to add methods to extend existing types without modifying the original assembly. This is how the Linq methods were implemented to enable some very powerfull predicate function based operations to be performed over all existing collection types. Searching for web controls on a page is one of those tasks that seems to come up for all kinds of reason while programming using web forms. I was reminded of this problem recently: ...
You’ve heard good things about Visual Studio 2010 but you still need to answer the question “What’s in it for me?” You need to justify the cost the new software as well as the not insignificant cost of migration. The Entity Framework is a powerful tool for creating a conceptual model of your data store and abstract away the details of data access. Exposing these conceptual entities over the wire to client applications mean one of two things: ADO.NET Data Services (now called WCF Data Services) or ...
I recently worked with a friend on a small C# teaching project. We started with the premise of writing a String Truncate function for .NET 3.5 SP 1. At its simplest, this is trivial to create. public String Truncate(String input, int length) { return input.Substring(0, length); } After a review of the weaknesses of this implementation, we went in search of a more meaningful challenge. We expanded on this first effort with a few additional requirements: Input validation Do not truncate in the middle ...
I blogged last month about an unsolved mystery I was experiencing, which I dubbed the Mystery of the Uncooperative EF Model and the Missing Target Frameworks. Since then, I’ve since expanded that to include the Mystery of why VS.NET 2010 can’t seem to resolve where my .NET 3.5 assemblies reside. Because of all this, let’s just go with the title of this blog, or as it’ll be known in its European release: HOOPED – a boy and his VS.NET installation. Without getting too wordy, let me give you the recent ...
[Source: http://geekswithblogs.net/E... Using Parallel Extensions you can reduce loop execution time by 95%. Which, if you're evaluating .NET 4.0 and VS 2010, should be a cinching argument*. The Parallel Extensions library includes an abundance of features for fine-grained control over concurrent operations, and it also provides the very simple Parallel.ForEach construct, which takes an IEnumerable<> collection and an Action to run over each item, so: Normal 0 false false false EN-US ...
For the past 4 weeks I have been assigned on a project with lot of performance issues. It’s an asp .net 3.5 project based on DNN 4.9 framework. The project is quite complex and the team has already put in almost 50 man years in the project and as usual most of the efforts were towards getting functional part working as per requirements. At first I tried to verify the server configurations and other parameters to make sure that there was no issue with any of that. After couple of days of research ...
So today I finally got around to playing a bit more with Silverlight. F# has been taking most of my spare time and I felt I needed to branch out into something different for a day or two… Now, before I go into this post… my disclaimer… I am a Silverlight noob – in fact I have focussed most of my development time at normal applications so the whole internet is a bit of a mystery to me… that being said I had some very definite goals for this posting… Setup my server so that it would work with the services ...
I recently had the privilege of taking part of a conversation about available blog engines with some of our Microsoft Community Leaders. I since got interested in finding out more about available .Net-based extensible blogging engines. Two days ago, I came across a link about Oxite, a codeplex ASP.Net MVC-based mature open source blogging engine (http://oxite.codeplex.com). While the Oxite project is no longer active, its source remains available and downloadable. Additionally, the future holds great ...
I'm in the process of evaluating how my team will upgrade our product from .NET 3.5 SP1 to .NET 4. I expected the upgrade to be pretty smooth with very few, if any, upgrade issues. To my delight, the upgrade wizard said that everything upgraded without a problem. I thought I was home free, until I decided to build and run the application. A big problem was staring me in the face -- I couldn't log on. Our product is using a custom ASP.NET Membership Provider, but essentially it's a modified SqlMembershipProvider ...
The Windows Azure team had just announced the release of the latest version of its tools and SDK (v1.2) at the TechED 2010 New Orleans. You can download it here. The biggest new feature/improvement of this version of the SDK would be Visual Studio 2010 RTM and .NET 4.0 support. It gives us the facilities to build our azure-based applications on top of .NET 3.5 and 4.0 as well. So the guys who is working on, like me, or is going to be working on .NET 4 would better to have this SDK installed I think. ...
I have good news! Microsoft has released the June 2010 Windows Azure Tools + SDK. These new tools extend Visual Studio (both VS 2010 & VS 2008) for Windows Azure development. With these tools you can create, configure, debug, build, run, and deploy scalable web apps on Windows Azure. At first glance what I see as some of the most interesting points of interest are the fact that Visual Studio 2010 RTM is fully supported as well as .NET 4 support. You can choose to build your apps with the .NET ...
Yey – we have a public release of the Windows Azure Tools which fully supports Visual Studio 2010 RTM and the .NET 4 Framework (When did that go public!?) And the biggy I have been waiting for – IntelliTrace support to debug your cloud deployed services (Requires VS2010 Ultimate) Download today http://bit.ly/azuretoolsjune New for version 1.2: Visual Studio 2010 RTM Support: Full support for Visual Studio 2010 RTM. .NET 4 support: Choose to build services targeting either the .NET 3.5 or .NET 4 framework. ...
I have come across 2 issues with deploying WCF services in a Silverlight solution, admittedly the one is more of a hiccup, and only occurs if you take the easy way out and reference your services through visual studio. The First Issue This occurs when you deploy your WFC services to an IIS server. When browse to the services using your web browser, you are greeted with “This collection already contains an address with scheme http. There can be at most one address per scheme in this collection.”. ...
I do quite a bit of debugging .NET applications but from time to time I see things that are impossible (at a first look). I may ask you dear reader what your mental exception handling model is. Exception handling is easy after all right? Lets suppose the following code: private void F1(object sender, EventArgs e) { try { F2(); } catch (Exception ex) { throw new Exception("even worse Exception"); } } private void F2() { try { F3(); } finally { throw new Exception("other exception"); } } private void ...
Recently I surfaced a problem where, one of my friend had a tough time in getting rid of an assembly reference error. Despite adding reference to the assembly, while referencing it in code, it was spitting out the “The type or namespace name ‘ASSEMBLYNAME’ could not be found” error. This was a migration project and owing to the above error, it was throwing another 100 errors. We tried adding reference to the assembly in other projects and it was not even resolving the namespace while typing out in ...
Continuing part 2 of my Stepping outside the Visual Studio IDE, is the open-source Mono Project. Mono is a software platform designed to allow developers to easily create cross platform applications. Sponsored by Novell (http://www.novell.com/), Mono is an open source implementation of Microsoft's .NET Framework based on the ECMA standards for C# and the Common Language Runtime. A growing family of solutions and an active and enthusiastic contributing community is helping position Mono to become ...
An upgraded article and solution had been posted here. I migrated the project to ASP.NET MVC 4 with some features added. - Upgraded to ASP.NET MVC 4, Visual Studio 2012. - Moved the solution to a separated project. - Moved the procedure originally executed in base controller's ExecuteCore to a separated class. Now can use the this solution without needing inherit from the localization base controller. - Implemented the localization resource provders so that can use any data source (database, XML ...
The purpose of my blog is to explain things for a Silverlight developer. One of the best things about Lambda's is that you not only use them in Silverlight but any project targeting .net 3.5 I’ve seen several blog post that use lambda expressions always assuming the audience is familiar with them. The purpose of this post is to make them simple and easily understood. Let’s begin with a definition. A lambda expression is an anonymous function that can contain expressions and statements, and can be ...
Alex (http://simpleisbest.co.uk/) does a very good job in covering the new features of .NET 4.0 and Visual Studio 2010. His focus is on the developers that have experience in development using previous versions of Visual Studio, more specifically Visual Studio 2008. The following are my views towards his book. 1. Scope / Coverage Even as the book is labeled as introduction, it is covers a broad spectrum of technologies, features and references that are focused into helping a developer quickly decide ...
With MVC2 officially released, I was involved in a few conversations regarding the feasibility of upgrading existing MVC 1.0 projects to quickly leverage the newly introduced MVC features. Luckily, Microsoft has proactively addressed this question for both Visual Studio 2008 and 2010 and many online resources discussing the upgrade process are a "Bing/Google Search" away. As I will happen to be speaking about MVC2 and Visual Studio 2010 at the Ft Lauderdale ArcSig .Net User Group Meeting on April ...
Microsoft TechEd 2010 - Day 2 @ Bangalore Today is the day 2 @ Microsoft TechEd 2010. We had lot of technical sessions as usual there were many tracks going on side by side and I was attending the Web simplified track, Which comprised of the following sessions : Developing a scalable Media Application using ASP.NET MVC - This was a kind of little advanced stuff. Anyways I couldn't understand much because this was not my piece of cake and I havent worked on this before ASP.Net MVC Unplugged - This ...
One of my colleague and friend, Robin is playing and struggling with the ASP.NET MVC 2 on a project these days while I’m struggling with a annoying client. Since it’s his first time to use ASP.NET MVC he was meetings with a lot of problem and I was very happy to share my experience to him. Yesterday he asked me when he attempted to insert a <br /> element into his page he found that the page was rendered like this which is bad. He found his <br /> was shown as a part of the string rather ...
FredNUG is pleased to announce that we have an excellent speaker lined up for April. On April 20th, we’ll start with pizza and social networking at 6:30 PM. Then, starting at 7 PM, Dane Morgridge will present “Getting Started with Entity Framework 4” The scheduled agenda is: 6:30 PM - 7:00 PM - Pizza/Social Networking/Announcements 7:00 PM - 8:30 PM - Main Topic: Getting Started with Entity Framework 4 with Dane Morgridge Main Topic Description: Getting Started with Entity Framework 4 With .Net 3.5 ...
Time for another guest post (check out others in the series), this time bringing together the world of mocking with the world of Entity Framework. A big thanks to Moses for agreeing to do this. Unit Testing Entity Framework Dependent Code using TypeMock Isolator by Muhammad Mosa Introduction Unit testing data access code in my opinion is a challenging thing. Let us consider unit tests and integration tests. In integration tests you are allowed to have environmental dependencies such as a physical ...
In this Issue: Max Paulousky, Jeremy Likness, Mark Tucker, Christian Schormann, Page Brooks, Brad Abrams(-2-), Jeff Wilcox, Unnir, Bea Stollnitz, John Papa and Adam Kinney, and Bill Reiss(-2-). Shoutouts: Ashish Shetty posted his material from his MIX10 presentation: Stepping outside the browser with Silverlight 4 Not Silverlight, but dang useful, Karl Shifflett posted a Visual Studio 2010 XAML Editor IntelliSense Presenter Extension Yavor Georgiev posted his MIX10 material: Two samples from today's ...
I spent a few hours scratching my head on this one... So I thought I would blog about it in case someone else had the same headache. Assume you have a class, and you are wanting to use the INotifyPropertyChanged interface so that when you bind to an instance of the class, you get the magic sauce of binding to do you updates to the UI. Well, I had a special instance where I wanted one of the properties of the class to add some additional formatting to itself whenever someone changed its value (see ...
A WCF Service I provided took a very simple data contract as parameter (containing one string and one int...) and had a very simple task to do. A .NET 3.5 client was created using the VS2008 feature "Add Service Reference". Everything worked as expected. Then a slight change came in: The client was expected to run on machines with .NET 2.0 only. So we set the Target Framework to .NET 2.0, removed the references to System.ServiceModel, System.Runtime.Serialization and the ServiceReference and created ...