|
Monday, February 16, 2009
For many years MSDN Live has been a free service provided by Microsoft. At one point they added a fee for no-show. The reason was obvious: ordering food, drinks and freebees cost money, and they had extra cost because of no-show. This time (and probably for the coming rounds) they’ve added a attendee fee of NOK 1000,- (early bird), NOK 1500,- (after 15th of February) or 500,- if you’re a student. Why is this? On their website they explain (translated): …the reason for this [the change] is to provide you with an even better service when attending the conference. The conference fee is explicitly giving you a better experience on MSDN & TechNet Live. MSDN & TechNet Live gives you the equivalent of one week of education to the price of one hour consulting. They continue listing several benefits of attending the event. I asked Børge Hansen, Architect Advisor at Microsoft, who also work on the DPE team responsible for the technical content for the event, if he could give me his explanation (translated): As you know, Microsoft have for many years presented MSDN Live as a free service to the developer community. It has been an arena where we have presented many new technologies and best practices to solve the challenges one have as developer. Now however, Microsoft Norway have also been hit by the financial disturbance and have to reduce cost. We have supported many different groups and activities, but one round of MSDN Live cost a lot of money and when we have done this two times per year, it goes without saying that this has high cost. We know many appreciate this event and use it as a main part of their plan for maintaining their competence. Therefore we have decided to keep running MSDN Live, but we have to require a fee to ensure the event will continue and that it will not steel resources from other important activities for our developers. At the same time the focus on educational content and relevance is clearer. We hope that many think this is a cheap investment in one’s own competence. We believe that for a whole day with relevant sessions, network building and lunch, this is cheap compared to equal alternatives. My thoughts Most developers have an employer they need to consult in order to go to this event. From the employers view the real cost is having the developer away from work for one day, not the 1000/1500 kroner that the event cost. From a developers point of view, it’s easier to ask your employer to go to a free event than to one that cost money. This will for some be the extra barrier needed to skip registration and ask for money. However, from the employers view I don’t think many really mind this cost. The main thing however will always be the quality of the content provided and the speakers that present. To attract more people, Microsoft could do what the music festivals do; have at least one famous star to attract audience. By getting some foreign well known speaker, they could make it more interesting for many. Not a bad word about the speakers of this event, most of them I know personally, but this is just how things work. So what DO you get for you money? Is it worth the 1000,- kroner and one day away from work? The technologies covered are Silverlight 2, Windows 7, Windows Azure, WPF, ASP.NET and ADO.NET Data Services (with REST). These are one of the latest technologies available and should in itself be interesting, but for many of the sessions the technologies are not what’s interesting. It’s the practices used to work with the technologies. I personally think Microsoft have done a poor job in communicating this. If you look at the agenda, the only thing you see is technologies. To know more you need to click on each and every session. Historically Microsoft and MSDN Live have been known (by some) to do much marketing of their technologies in these events, showing fancy drag/drop functionality and how little you need to code. I feel this is not the case now, and haven’t been like that for a while. Free tip to MS: Name your sessions better! Session details For Silverlight they focus on building business applications, which I this is what Silverlight is all about, but not focused on enough. Demos of Silverlight tend to show videos playing in a browser.. Hurray! Silverlight is all about putting user friendly apps into your browser and Jonas Follesø shows us his dive log app as an example of this. While on the topic you should also check out Jonas article where he ask if Silverlight is ready for business applications. Jonas will also show some tips and tricks for Silverlight. Should be some good content here. For Windows 7, Rune Zakariassen will focus on what’s interesting for us as developers. Things like multitouch, jump lists, Windows error reporting etc. Personally this is not so interesting for me. It’s more on the nice to know list. Cloud Computing with Azure on the other hand I find really interesting. If your doing web apps or any kind of online services (not only Internet), then Azure is something you should have a look at. I firmly believe this (Cloud Computing) is the future platform we as developers need to relate to. WPF has been around for a while (and covered several times on MSDN Live) and I would not go to a session for WPF alone. The WPF session done by Pål Fossmo however, should probably not be called WPF at all (in my opinion). By reading the session description I see best practices in software development, not WPF specifically. Though the focus is on the Composite Application Guidance (by P&P) for WPF, you should be able to pick up a few tricks outside of WPF. ASP.NET Instrumentation however is a much better session title and something every developer should focus more on. Most developers I know don’t spend much time in this area, until they experience the benefits of instrumentation during the maintenance of an application. In other words this is usually a “I wish we had it” thing that comes along either too late or very late in the dev game. ADO.NET Data Services titled “Building applications with Data Services and REST”. Interesting, but I have some personal opinions on how this should be used As long as you using it to share data only using e.g. REST it’s all fine, but a fear people will use this technology as a replacement for their business layer :-( Will be interesting to see how it’s communicated and scenarios for usage. Conclusion After reading thoroughly through every session in the agenda, I personally find it to be worth the cost. Let’s be fair, it’s cheap. The only problem is that it used to be free and now it’s not. If you want to keep up with what’s going on and to get some best practices around how you should code; this should give you good value. I will attend! What’s your take on this? Will you attend MSDN Live?
Friday, January 16, 2009
My article about The Future of Microsoft .NET Programming Languages just got published on InfoQ.This is my first attempt at being an editor for them, so if this works out I hope you will see more stuff from me in the near future. Would love to hear what you think, so drop me a comment if you like.
Monday, December 15, 2008
Last week I attended 2 sessions about the new Microsoft platform in the cloud: Microsoft Azure Services Platform. The first was held by David Chappell and the second by Clemens Vasters. Two great speakers. Unfortunately I didn’t get to see Clemens complete talk, because I had to catch a flight back home, but hopefully I got the main content of his talk. In this blog post I’m going to ask and answer some questions by the help of these two sessions + the additional study I’ve done around this topic. Disclaimer: The answers I provide below is based on my current knowledge of this platform and might not be correct now or in the future, though I’ve spent a fair amount of time making sure it is. What is it? It’s a platform where you can deploy and manage new services or even complete web applications into the “cloud”, in addition to make use of existing services already provided by the platform. This is often referred to as cloud computing. Today the Azure platform contains the following services: Windows Azure (the platform), Microsoft .Net Services, Microsoft SQL Services and Live Services. Microsoft SharePoint Services and Microsoft Dynamics CRM Services are also mentioned in relation to the platform. All of these services make up the Microsoft Azure Services Platform. By reading these names you may see the potential naming confusion? When you say Azure, do you mean Windows Azure or Azure Services Platform? Now you may ask, what is it really? From a simplified developers perspective it’s a platform on the internet (the cloud). Instead of hosting your web application/service on your local server, you publish it into the cloud. In addition it gives you access to the services you need to build a multi-tier architecture. From another perspective it’s big monster of a datacenter providing you with a lot of data power (virtual Win 2008 servers) to do your stuff, giving you the option to scale up and down at will or dynamically. How committed are Microsoft to this platform? As committed as they’ve never ever been before with anything as far as I can remember! They invest heavily in the technology and infrastructure needed to support this platform. By heavily I mean they’ve told the marked that this is such a huge investment that it will highly impact Microsoft’s money bin. As an example of this, here’s a short description of what they’re doing with their datacenters needed to host this beast: Every datacenter is set up of a grid of physical and virtual computers. These computers are delivered by HP and Dell and some in preconfigured shipping containers ready to be plugged in. I don’t mean the computers are ready to be plugged in, but the containers! What Microsoft then does is put a bunch of these containers close to a power plant (for obvious reasons), plug all the containers in and they’re up and running. At least that’s how it was described to me The applications, services, data etc you have put into this cloud is distributed across many VM’s, meaning if a VM or server (hosting VM’s) goes down, it’s not a problem. There is always some VM on some server holding your data. Actually the shipping containers I mentioned are remotely managed and MS never enters any of these containers for maintenance. If a computer goes down and does not come up again, it just stays down. If this happens to a certain number of servers within one container, the whole container is disconnected from the grid and sent back to HP or Dell to be fixed, without affecting any of the applications or services! This little story told by Clemens Vasters really says a lot of the scale on this monster! Can I take my existing application and deploy it to the cloud using Azure Services Platform? The short answer is: no. The longer answer is: you might in the future. First of all the platform is still in Beta, but beside from that David Chappell says: “Azure Services Platform today targets the next Facebook”, meaning it’s highly scalable and can support a lot of users. To support this level of scalability there are some compromises to be made. On Azure this is (among other things) how you store and access data. Using a plain SQL server with relational tables and ADO.net would just not scale/perform. Thereby they decided to implement a different solution where the data are stored hierarchically and data is exposed via a RESTful interface using a LINQ like query language. Unless your application have this type of data implementation today, you would have to rewrite your data access and data layer. But don’t take my (or David’s) word for it, check out this video about table storage (which you would think is normal relational tables, but it’s not) from MS and you can make up your own mind: http://wm.microsoft.com/ms/msdn/azure/scalablestoragetables.wmv. Note though that in this video they’re using Windows Azure Storage and not SQL Services, but the same is true for SQL Services. If I can't deploy my existing app to Azure Services today, what CAN I do? The obvious thing is to wait and hope Microsoft will add support for relational tables allowing you to use existing SQL Server data implementations, but the Azure Services Platform is much more than a place to have your application and data. Your (local) application might want to interact with services in the cloud to enhance your existing application. I find the Service Bus to be especially interesting, or even the Access Control Service. This is only from my perspective and within the enterprise domain where I work. If you work with a more consumer oriented domain, you might find the Live Services interesting. Note that you don’t have to use the complete platform to make use of Azure Services. You can of course select the ones giving you value for you particular domain. What’s the difference between Microsoft SQL Services and Windows Azure Storage? First of all these two services looks very similar today and one might think why have both? My impression though is that Windows Azure Storage is going to remain much the same, but SQL Services are going to expand quite a bit (reporting, analytics, synchronization etc). Clemens offered this simplified analogy: “Think of Azure Storage as the registry on Windows, and think of SQL Services as your SQL Server.”. Another important difference is that Azure Storage is not built on existing SQL Server technology, but SQL Services is. Another interesting thing pointed out by David is that none of these services use SQL!? They use a RESTful interface with a LINQ like query language. He offered one explanation to this: SQL within MS means SQL Server  What’s the Access Control Service and is it limited to only Azure apps? The Access Control Service is “Microsoft’s humble attempt” to support as many access control providers as possible, so that this service will become a common place to perform identification. They state that “No one is willing to take this responsibility, so we have to” Just think of it. How many providers of access control do we have today? Google, Microsoft, Amazon all have their own personal identity services on the internet. In addition there are a lot of others like Active Directory, Novell eDirectory, Apple Open Directory etc. What if this service would support the majority of these? Then you could use this service to do the access control for your system being in the cloud or not, and the end user could use his provider of choice. For more information about the Access Control Service check out the MSDN site: http://msdn.microsoft.com/en-gb/library/dd129876.aspx (note that this url might be quickly outdated). By choosing the Azure Services Platform, will I be locked in by that platform? By “locked in” I’m here going to assume you mean if you can move your cloud application away from this platform and on to another if you want to. Taking into account the current providers of cloud platforms we have today and the current services they provide, my impression is that you will be locked in. Just because of the simple fact that no one else is supporting .Net like Microsoft do. Hey, wait a minute… What if I use Amazon’s EC2 which gives me a Windows Server 2008 and a SQL Server, can’t I then move to that platform? That environment support .Net just fine. Well, it depends… If you’re using the Azure Storage or SQL Services, you can’t cause it’s just not a plain SQL Server. It seams like the common thing to do among cloud services providers is to create their own data access solutions (or even programming languages like SaleForce.com have done), meaning you will be locked in on that. If you’re not using the data storage solutions you might not be. Why should I be afraid of being locked in anyway? I’ve already chosen Microsoft as my technology provider. Yea, but now you’re also locking onto your host. If your host (in this case MS) decides that the solution you’re running in their environment should be increased by a cost of 500% and you can’t afford that, what do you do? Find another cloud provider? However, one interesting thing to note about Azure Services Platform is what MS says about programming languages. They want (though they don’t do today) to support many other languages like Eclipse, Ruby, PHP and Python. Google only support Python, SalesForce only support their own language Apex, Amazon basically provide you with VM’s (Linux and Windows) leaving you to choose. Another interesting aspect is that MS seams to be very open about what and how they’re doing things. People are talking about the Web Role and the Worker Role. What’s that all about? The Web Role and the Worker Role is part of the Windows Azure fabric (see separate section for more fabric info). Microsoft says: A web role is an ASP.NET web application that may be accessed via an HTTP or HTTPS endpoint. Web roles run in integrated pipeline mode on a hosted IIS7 web core. ..and/or: A web role is a web application accessible via an HTTP and/or an HTTPS endpoint. A web role is hosted in an environment designed to support a subset of ASP.NET and Windows Communication Foundation technologies. A worker role is a background processing component. It does not accept inbound network connections. ..and/or: A worker role is a background processing application. A worker role may communicate with storage services and with other Internet-based services. It does not expose any external endpoints. A worker role can read requests from a queue defined in the Queue storage service. A service may consist of a single web role, a single worker role, or one of each. When you create Azure projects in Visual Studio, you select which Role you want your project to be (or both). As described above the main difference between the two is that the web role allow incoming traffic, while the the worker role does not. What’s “The Fabric”? The Fabric, or more accurately Windows Azure fabric, is the operating system that the services run on. Again from MS: The Windows Azure fabric offers an Internet-scale hosting environment built on geographically distributed data centers. This hosting environment provides a runtime execution environment for managed code. The fabric handles load balancing and resource management and automatically manages the life cycle of a service based on requirements established by the owner of the service. The developer includes with the service code specifications for the service topology, the number of instances to deploy, and any configuration settings. The fabric deploys the service and manages upgrades and failures to maintain availability. To try to simplify (in my words): Below the fabric you’ll find a lot of VM’s. On top of the fabric you’ll find Compute and Storage. The fabric host .Net and take care of networking stuff. What if I’m not going to build “The next FaceBook”, is this still something for me? Absolutely. Even though the architecture behind it all is built so that it can handle the next Facebook, it does not mean you can’t use it for an enterprise solution which have less than 1000 users or an application you want to share with your friends. It will be interesting though to see if MS will provide us with different data models, so that we don’t have to use a really scalable one, when we will never need it, also allowing us to port existing solutions onto their platform. What’s it going to cost? No one knows. At least not outside of Microsoft. We do however know some thoughts they have around the pricing model(s). It does not look like they’re going for a “simple” price model as e.g. Amazon which charge per hour. They will probably use a combination of CPU, network, storage and transactions(data) to calculate the price. More details can be found here: http://www.microsoft.com/azure/pricing.mspx (note that this url might quickly become outdated). Who else out there offer cloud services? According to David Chappell; Amazon, Google and SalesForce.com are the leading providers today. All of these provide different solutions and pricing models. Will everybody now deploy their apps to the cloud? Not now, but I defiantly see this as a very attractive hosting model in the future, and for some it is already today with services provided by e.g. Amazon. I would think it’s especially interesting for startups that does not have the resources (money and knowledge) to set up a datacenter for hosting their solution. Hi, this is your mom. Do I need to know what this is? No. You together with the rest of the world not running an IT company or doing programming can happily not care and just use whatever services that will be provided through this platform without you knowing. Btw mom, you don’t have to read my blog if you don’t want to  Where’s Hello Cloud? It’s here: http://wm.microsoft.com/ms/msdn/azure/hellocloud.wmv ..and implemented here: http://hellocloud.cloudapp.net/ Are any of the material from the sessions you attended made available for the public? You can find David Chappell’s presentation here: https://cid-88b5769d9bbdf846.skydrive.live.com/self.aspx/Offentlig/Azure%20Services%20Platform--Chappell.pdf
Wednesday, October 01, 2008
Saturday, September 27, 2008
Børge Hansen is the latest employee of the DPE team at Microsoft Norway. The DPE team is responsible for MSDN Live, the Norwegian MSDN site, follow up on MS related community activities, Norwegian Developers Conference and are the technical advisors from MS for Norwegian companies. If you're a developer this is the guys you should get in contact with to get closer to Microsoft and find out what they can do for you. Anyway, Børge is DPE's Architect Advisor. I've met him a couple of times and already had some interesting discussions. We're currently discussing if there is something we can do in the community (like NNUG) to spread the word about architecture and what it means to be an architect. Hopefully something great will come out of this and we as architects (or coming architects) will have a architecture community to throw ideas and discussions at. One of the things I vision is that architecture is less platform dependant, so there should be room for more than just MS technologies in this community.
Friday, August 08, 2008
A couple of days ago I discovered a bug in Hotmail that you can read about here. As it turns out it was both a bug in Hotmail and in my code (sort of), and a type error in my blog post causing some confusion. Thanks to Rune Grothaug for getting me in touch with the Hotmail team. The bug in Hotmail is related to how they query for content id's in the email. It's too expensive to load the email into a html parser to get the id's, so they do a string match instead. Here's how I understand it: When they try to match nnug10 they actually get nnug1 back (as the first match). One solution suggested by them was to reverse the order of the searches allowing nnug10 to be found first. I'm not sure if this is what they're going to do. (Update: I got confirmation that this is the solution they're going for)
As for my bug it was that I forgot to add the file extension to the ContentType.Name (see code below). This is the name that actually gets displayed for the attachment image in the mail. In Hotmail (and Gmail for that matter) it shows all linked resources as attachments, and the name of these attachments had no extensions (e.g. jpg). A workaround for the Hotmail bug could have been to do the same with the ContentId. When the id is nnug10.jpg it actually works! In my blog post I said that the cid's where nnug0.jpg, nnug1.jpg etc. which was not the case. It did not have the .jpg extensions. Taking the above into account this makes the Hotmail bug far less serious than I originally thought. But..., when you see the property ContentId you're thinking it can be whatever only it's unique right? This is why I didn't think much of what the ContentId was as long as it was unique. However, to be absolutely sure that something like this will not happen again I changed the cid's to be guid's instead (this was also suggested by the Hotmail team). Better safe than sorry  Here's the code after my modifications: LinkedResource img = new LinkedResource(stream, mediaType);
img.ContentId = guid;
img.ContentType.MediaType = mediaType;
img.TransferEncoding = TransferEncoding.Base64;
img.ContentType.Name = img.ContentId + fileExtension;
img.ContentLink = new Uri("cid:" + img.ContentId);
resources.Add(img);
Thursday, August 07, 2008
Update: More on this story here.
I've been playing around with an email tool that I've created to send out emails to NNUG members. It's just a simple command line tool sending an email to each person in a list to avoid using bcc which sometimes get hooked in a spam filter. Another thing this tool does is to take an html page (an html formatted email), scan it for images and embed the images using the AlternateView class and its LinkedResources collection for sending as an html email. The emails sent by this tool looked ok in Outlook, Gmail and Hotmail on every test I did. Except for when I decided to use the tool to send out an official NNUG invitation to 300 members! The only change I had done was adding one extra image. I noticed that the email I got on my Hotmail account had a wrong image at the end. The image used was the same as the second image in the email. The reason was not hard to find. When I add images to the LinkedResources collection, I name the images/files nnug[someNumber].jpg like this: nnug0.jpg, nnug1.jpg, nnug2.jpg etc. This worked fine for all images up to nnug10.jpg. Can you see why nnug10.jpg did not work and what the bug is? The last image that was supposed to be nnug10 was showing up as the second image instead (nnug1). E.g. nnug10 = nnug1! Hmmm.... Come on! Then my apology. To all members of NNUG with a registered Hotmail account and to Christian Weyer: I'm sorry that I did not discover this bug before, so I could have changed my algorithm. Sorry to you Christian for being nnug1.jpg! You replaced the NNUG logo, resulting in the email ending with: Kind regards [image of Christian] instead of Kind regards (image of NNUG logo) ...giving the email a bit different meaning than I intended  Btw. don't forget to sign up for the NNUG events by Christian Weyer and Dan North 25th and 27th August!
Tuesday, June 03, 2008
Don't want to download and install all the tools from Sysinternals? Want to have access from anywhere on any computer? Just hook up to the UNC path: \\live.sysinternals.com\tools and you can run them directly. Thanks to John St. Clair for letting me know. Is that cool or what? For more information about the different tools go to http://technet.microsoft.com/sysinternals.
Thursday, May 29, 2008
Friday, April 18, 2008
Today I had a problem. At work we had a SCSI Raid controller that failed and we lost a logical device. Man I was pissed off! On top of this the raid was RAID 0 (striped), meaning there was no chance of getting any data back. This was the drive(s) hosting the OS which we had to reinstall :-( Anyway, this resulted in me having to spend quite some time in a freezing and noisy server room fixing the problems. While doing stuff like this (reinstalling OS, software and a pointless effort of restoring data) there is a bit of waiting time, so I figured I might as well work on our new server waiting to get TFS 2008 up and running. A brand new server (see spec below) dedicated to protect the heart of our company; the source code! So I started digging around for the TFS 2008 DVD, knowing it should be on my desk with the MSDN subscription we get through the Microsoft Gold Partner program, but it was nowhere to be found. After a call to MSDN it turns out that the DVD's are now being shipped to our headquarters in Oslo, which was the case for TFS 2008 as well, but they couldn't find it. The guy who knew was of course away that day. You might wonder why not download? Well, you can't. TFS versions available on MSDN subscription is only Workgroup and trial editions. My last attempt before giving the whole thing up was calling my friend John from NNUG and ask if they had a DVD I could use. He had a much better idea: "Just use the trial and upgrade with your key at a later time". Dooh! Why didn't I think of that. Check out Brian Harry's blog for more details: http://blogs.msdn.com/bharry/archive/2007/11/22/2008-installation-questions.aspx Server spec: - HP ProLiant DL380 G5 Intel® Xeon® E5440 Quad Core Processor 2.83 GHz 12MB 2GB 1P Rack Server
- HP 4 GB PC2 5300 DDR2 DIMM Memory
- 6 HP 72GB 2.5 inch 15K rpm Hot Plug DP SAS Hard Drives
- 2 HP 146GB 2.5 inch 10K rpm Hot Plug DP SAS Hard Drives
I think this should keep our source code safe for a while...
Friday, April 11, 2008
The first .Net user group ever (as far as I could find out) was started by Ruth Walther in Seattle December 2000. It seams like this group is no longer active and I was unable to find out why. Anyway, today you'll find a user group in almost every major city in any country. And if you don't have a user group where you live, I think it's about time you start one! Seriously, it's not that hard and you'll be a hero where you live! I can really recommend the experience and people will defiantly appreciate someone taking the first step to get your city on the user group map. After the first user group started up in the US many others soon followed during 2001. To pick a few other countries I'm familiar with I can say that my home country Norway started their first user group in Oslo October 2001 and in my city Bergen we started up in December 2002, the London .Net User Group was started in 2002 and Sydney Australia in April 2002, . It's free
Most user groups I know of don't charge for membership. Many don't even have memberships, but use the word of the people to announce their meeting or that "everybody" knows that their having a meeting last Wednesday in every month, and it's just to show up. User groups rely on local, national and/or international sponsorship. If your country have a Microsoft company present, they usually help out. This can be to help you get in touch with speakers, sponsor travel costs (for speakers), pizza and the like. The user group I run in Bergen use local sponsors for pizza, but get some help from Microsoft for travel costs. When requesting speakers it's often smart to provide them with consulting when they visit your city. This is a nice way of helping your local companies get excellent consulting and it make the speakers trip to your city a bit more attractive. Why are user groups so popular? There are many reasons for this and they vary from user group to user group. But from my experience there are some general things that should more or less apply to all user groups: - It's free
- You get free food (usually pizza)
- You get to meet other people from other companies to share experience with, that you would usually not meet outside the user group
- You learn a lot
- Keeps you up to date on what's going on
- Communities in general are popular
INETA
INETA is the mother organization for all .Net user groups. Its an acronym short for International .NET Association. You will find user group related to SQL server, VB, SharePoint and other .Net related products. They all have in common that they focus on some type of Microsoft .Net related technology. INETA is divided into five geographical areas; North America, Latin America, Middle East and Africa, Asia Pacific and Europe. My experience is with INETA Europe, but I expect it to work much the same in the rest of the world. INETA Europe have among other things a Speaker Bureau with lots of good speakers. As a member your user group can request two speakers per year. These are top notch speakers! In Europe you'll see names like Ingo Rammer, Christian Weyer, Dino Esposito to mention a few. As a member your user group will also get a quarterly kit where you can select some books, cd's and other stuff to use as giveaways for you members, prizes etc. INETA also helps getting user groups started, especially if it's the first user group in the country. If there are existing groups in the country, the other groups usually helps you getting started in your city. That's how communities work!
Thursday, March 13, 2008
Server deployment of ClickOnce? Isn't ClickOnce client deployment? Yes, it is. However, you will have to deploy the ClickOnce files to a server, right? I feel this is a poorly documented step and I thought I share some of my experience around this. So what's the problem? The main issue is the deployment manifest file. If you've worked with ClickOnce you know about this file, if not here's a (very) short description. The deployment manifest includes information about where the ClickOnce application is located (e.g. http://myServer/myWD/myApp.application) as showed in the following snippet:
... <deployment install="true" mapFileExtensions="true" trustURLParameters="true">
<subscription>
<update>
<beforeApplicationStartup />
</update>
</subscription>
<deploymentProvider codebase="http://myServer/myWD/myApp.application" />
</deployment> ...
This file needs to be signed with a certificate to be valid, which means that any changes to this file makes it invalid and you'll have to resign it. This is a good thing for security, but it causes some problems regarding deployment. The url specified in this file must be changed when deployed at a server. Unless you want to get all information needed from your customer and create the deployment package before sending it to them or force them to set up a server named myServer . I don't think that solution is very likely to be used in production systems. So what you need to do, is make the installation (e.g. msi) change the manifest file and resign it during installation.
Microsoft has provided us with a tool to do exactly this. However, you're not allowed to redistribute it. Another issue is that you need to have a certificate for signing and you don't want to have your corporate certificate laying around in your msi. The most common solution around this problem is to prompt the user during installation for a certificate (like suggested here). But then your app is signed by someone else's certificate, which is probably not what you want.
I will now suggest a different solution to this problem. In the System.Build.Tasks.dll you'll find much of the functionality needed to do the same thing as Microsoft's Mage.exe is doing. The nice thing about this dll is that it's a part of the default .Net Framework installation. Here's a short description of the classes needed:
DeployManifest
An object model for the manifest file. Gives you direct access to specific parts of the manifest and makes it really easy to make changes.
ManifestReader
Have a static method (ReadManifest) which let you read and return the manifest you are going to work with.
ManifestWriter
Use the static method WriteManifest to write your changes back to the manifest file.
X509Certificate2
Your certificate to sign the manifest file with.
SecurityUtiities
Has the static method called SignFile which let you sign your manifest.
By using the classes described above it should be quite easy to achieve the same as with the Microsoft utility. Here's an example:
using System;
using System.IO;
using System.Reflection;
using System.Security.Cryptography.X509Certificates;
using Microsoft.Build.Tasks.Deployment.ManifestUtilities;
... string manifestPath = @"C:\Temp\myApp.application";
string deploymentUrl = "http://myServer/myWD/myApp.application";
DeployManifest manifest = (DeployManifest)ManifestReader. ReadManifest("DeployManifest", manifestPath, false);
manifest.DeploymentUrl = deploymentUrl;
ManifestWriter.WriteManifest(manifest);
X509Certificate2 certificate = new X509Certificate2(GetCertificateFile(), "password");
SecurityUtilities.SignFile(certificate, null, manifestPath);
There is one important step we need to solve. How do we protect the certificate we need to sign the manifest file. For this I suggest you incorporate this into your tool (either a command line tool or a .Net library) by using Build Action = Embedded Resource. This will make your certificate inaccessible for most people. If you want to secure it even more, you can crypt it in however way you want. I leave this up to you In my code above I've done this in the GetcertificateFile() method:
X509Certificate2 certificate = new X509Certificate2(GetCertificateFile(), "password");
There is of course one other issue which you'll have to consider. What if someone uses your custom tool to sign their ClickOnce app? So you need to protect this as well with a password or some other mechanism. If you have a good suggestion to this, please let me know.
Thursday, February 21, 2008
Before installing SP1 I could right click anywhere in Windows Explorer and select search to do searches in that folder. After SP1 it's gone! Why? Blame "us" (the Europeans or actually EU). They (I say they, because Norway is not part of EU ) found a "new" game to play with MS. It's called Antitrust and it's about Suits meeting up in in European courts to talk about software. Browsers are especially popular, but sometimes they talk about other types of software as well. The looser of the Game (usually MS) have to become agile and change their software so the Europeans can get their price. This time MS didn't want to play, so they just gave the EU the price. What's the price you might ask? A pluggable search architecture. If you are a provider of a desktop search engine, users can now set your search engine as default search in Windows. So what if I want to have the contextual search like it was? Then you can change a registry key as described here or just use Windows key + F as I do.
Saturday, February 16, 2008
As mentioned on the Vista blog, Microsoft changed their mind regarding the release date of Vista. The original statement was that it would not be available until mid march (though it was already in RTM). You can now find the download at MSDN Subscriber Downloads. You'll will not find it in your normal subscriber download page, but on the front page where you have a list of Top Subscriber Downloads, like this: I installed SP1 Friday night and it took it's time, but there were no problems. My first concern was if all my drivers would still work after installation, or if I had to reinstall some of them (as mentioned on the Vista blog). After initial boot everything was fine so no problems there. The next morning however I went out for 30 minutes leaving my laptop on. When I came back it had restarted. I inspected the System log only to find this: The previous system shutdown at 10:29:45 on 16.02.2008 was unexpected. Nice! In the Security log the only trace I could find of a shutdown was this: Audit events have been dropped by the transport. The real time backup file was corrupt due to improper shutdown. I'm quite sure that this was not related to any external event (like power failure or the like). If it was, my laptop would still be turned off when I came back. I really hope this was a one time incident and that I don't have to worry about this in the future.
Tuesday, February 12, 2008
If you want to attend the first ever Norwegian Developers Conference you should keep an eye on this site: http://www.ndc2008.no/ They will start to sell conference passes from 1st of March and I will definitely be in the virtual cue. Unofficial rumors say that a two day conference pass will cost around 3000 Norwegian kroner (about $500 or €380). B.t.w. I wonder what the url will be next year? ;) Hopefully they'll get the www.ndc.no domain by then. Looks like it's not used for anything else than sponsored links (that's why I'm not linking). Someone probably whispered that MS is involved in the conference and their dreaming of an insane price for the domain, which their probably going to get... yea right!
Friday, February 08, 2008
Update: I've found a temporary solution. After inspecting which files was in
our package I found a 3rd party component that we don't use anymore but still
had a reference to. This was references by our business layer, which all our web
services use, hence this dll was in every bin folder on every web service. Since
the size of the file was quite big it was enough to get the installation down to
a reasonable size and avoiding the described error message. For a while now our msi file that contains the application server for our product has not been working. Not an msi that our customers have, but one we're about to ship in two weeks. I've had my hands full for a long time, but today I finally got around to check what was causing the problem. Here's a screen shot of the error I get: After a quick Google search I found that this is related to a bug on Windows Server 2003 and Windows XP. Cause: This problem occurs if the Windows Installer process has insufficient contiguous virtual memory to verify that the .msi package or the .msp package is correctly signed. Fantastic! I will not go and ask all our customers to install the hotfix on their servers. That's just to stupid. About now you're probably thinking something like "How big is their app-server really?" or "What product can get to big for an msi file?". I can tell you... The size of the msi is 576MB. No images, no database, just pure .Net dll's! And actually we're not alone. Visual Studio Service Pack 1 had the exact same problem! Go figure. And even better, there is no hotfix for this on Windows XP. Have we been coding like mad men for a decade and producing tons of code? I wish (or maybe not) :) The answer is simpler than you might think. Our application server contains web services only. At the beginning of our project we took an architectural decision to have our web services separated in virtual directories (or projects in VS). This to be able to update parts of our application without affecting the whole system. This was part of a master plan around the smart client principle and would let us deploy small modules into our application which dynamically loads the new behavior. As it turns out we have almost never done this in production. The drawback of this is of course that you get many of the same dll's scattered around in many virtual directories. And when you have many web services (by web services I mean asmx files and not web methods, 43 to be exact), and each one is dependent on your business and data access layer (which is quite huge) and more, megabytes is piling up. So what's the solution? Well, since we don't really use this as intended we can just merge our web services into one and we will be home free. Except you don't do that two weeks before deployment with acceptance testing coming up. So I have to think of something else. The only solution I can see now is to find some way of making the msi smaller, which at the current time I don't have the faintest idea of how to accomplish. I can use a setup launcher (exe) which will probably solve it, but that will not make our customers very happy. Hopefully I'll figure something out during the weekend, or maybe you have a solution?
Wednesday, February 06, 2008
Vista Service Pack 1 is now finished. The Vista team announced on their blog that they now have released SP1 to manufacturing (RTM). They also say that: "...we have made great progress in performance, reliability and compatibility." and "...copying or moving files around your PC, your home network or your corporate network should now be much faster -- up to 50% faster in some scenarios (according to our internal tests)." This has annoyed me a lot on my HP: "In addition, on many kinds of hardware, resuming a Windows Vista-based PC from sleep is faster on Service Pack 1." So when and where can I download? It will be available trough Windows Update in mid March (and auto download in mid April if you have this enabled). So why not today? During beta testing some issues was found related to some device drivers "that did not follow our guidelines for driver installation". So the next month will be used to: "...giving us time to work with some of our hardware partners to make adjustments to the installation process for the affected drivers." If you don't want Vista to update itself to SP1 when it's available, check out my previous post on how to block the update.
Saturday, February 02, 2008
Sunday, December 23, 2007
SP's are a necessity, but what I want to know is what have they done to improve IIS 7? Here's what the release notes for SP1 RC says: IIS was included in some Windows Vista SKUs to enable web-based developers to write and test their applications. IIS in Windows Server 2008 is a significant server role which requires Internet-level scalability and performance requirements. The IIS7 components have gone through significant performance and reliability enhancements since Windows Vista originally shipped, in order to be a large-scale server component. These changes do not affect most Windows Vista users who do not even have the IIS7 components installed, however because Windows Vista and Windows Server are aligned, these changes are included in Windows Vista SP1. You can find the "complete" change log here: http://technet2.microsoft.com/windowsvista/en/library/005f921e-f706-401e-abb5-eec42ea0a03e1033.mspx?mfr=true So does this mean that there is a full UI and ftp support? The current IIS available in Vista is very limited by this. You can configure most of the stuff in config files (like I did with http redirect and logging bandwidth and referrers), but I would at least expect the features found in IIS 6 to be available from the UI in IIS 7. I've googled around to find some more info, but nothing yet. I guess I'll have to install the RC to find out. Not sure if I want to risk it though...
Soon Windows Vista SP1 will be available for download. Or actually, it might even decide to automatically update itself, even though you specifically told it not to! However, not all of us want this to happen without our knowledge (or want to wait until some unexpected behaviors has been discovered), so Microsoft has release a service pack blocker. This blocker will also work for Windows XP and Windows Server 2003. The blocker only work for a set period of time. Mary Jo Foley has more details in her blog.
Wednesday, November 21, 2007
 You probably know allready, but Visual Studio 2008 is now available on MSDN Subscriptions for download. If you don't have an MSDN Subsription I'm afraid you'll have to wait until February 2008...
Tuesday, August 14, 2007
 Just
saw that there was a new
episode (Silverlight) of The .Net Show out,
and it started with telling us that this is the last episode! I've been
watching this show on and off since its startup in December 1999! The show has
been running for almost 8 years which makes this the longest running series at
Microsoft. However, all good things have to come to an end. But it’s sad. I’ve
really enjoyed this show and for a time (before blogging and rss) it was one of
my few sources to new .Net technology inside the walls of Microsoft. Robert
Hess’s (the host) last words in the show were: “Well, until next time, we'll see you on the
Web and I might recommend you check out channel9.msdn.com. You never know who
you might see show up there.”
So I guess this isn’t the last time we see
Robert. Thanks for all your hard work on this show during the years, giving us the latest news and
insight into .Net technology! Salute!
Thursday, July 12, 2007
Yes,
it’s important to distinguish between the two. At the partner conference in
Denver Kim Saunders (Senior Director, SQL Server Marketing) said that they
launch SQL Server 2008 in February, but the actual release will be in Q2. And
by launching they mean that they have all the marketing material and the final
product information, but not the product.
As for Visual Studio and Windows
Server I have not yet heard anything similar, so I'm still thinking 27th for these.
I'm in Denver at Microsoft World
Wide Partner Conference, and I find it strange. The conference itself is not
strange, but it's strange for me. I'm a developer/architect and not a sales guy.
I'm used to devcons where the primary purpose is not to interact with as many
people as possible, but to get your hands on as much information as physically
possible. Here it's a total different game. The sessions are just not the most
important. Making connections and meeting up with people you've been matched
with by the conferencing tool is!
The
first day I was the only attendant from my company since our COO arrived later
that day. Because of this I was supposed to set up some meetings with potential
partners. I just have to admit that this is so not me! So this brings up the
question; what am I doing here really?
When I first got the opportunity to attend this conference my first thought was
that this was not for me, but when I looked at the agenda and started to read a bit more about the conference I changed my mind. This
was really an opportunity to get a different view of Microsoft technology and set
it in another perspective. I think most devcons focus on the how, but at the partner conference its more the why.
Another
difference with this conference is that there are actually women here! We
tech guys are not spoiled with having many women on our conferences and I think
that is really bad. I notice right away that this conference has a different
tune to it just because of the mixed gender.
To sum it up I (surprisingly) can recommend
this conference for tech people as well because of the overview you’ll get of
the technology, but be prepared and bring your social skills! And
don’t expect 400 lectures...
Tuesday, July 10, 2007
Update: At TechEd Barcelona Microsoft announced today (2007-11-05) that Visual Studio 2008 and .Net Framework 3.5 will release in late November. See the official press release here: http://www.microsoft.com/presspass/press/2007/nov07/11-05TechEdDevelopersPR.mspx
I’m at the Microsoft Partner Conference in Devner where
Microsoft just announced the release date for Visual Studio 2008, SQL Server
2008 and Windows Server 2008. Look forward to February 27!
Monday, July 02, 2007
Monday, June 04, 2007
 This
was just to cool to not blog about! Nothing much to say except that you have to
check it out yourself. I have two links for you, one to the official Surface site
at Microsoft and the other to PopularMechanics. The last link shows much of the
same as the official site, but in a more “documentary” style :) If anyone gets hands-on experience with
this, I would really like to hear from you on how it was.
Monday, April 16, 2007
 First thing I thought about when I heard about WPF/E was that it's Microsoft's answer to Flash. Nothing wrong with that, but now when I saw the official name I thought the exact same thing! Silverlight, Flash, silverlight, flash.... Hmmmm... Just another name for flash :) I wonder if this was what they meant. At least they didn't end up with Microsoft Windows Presentation Foundation for Extreme Internet Graphical User Interface (MWPFEIGUI) or something like that. Guess they saw the blog post over at Secret Geek. Anyway, I'm looking forward to do some real coding on Silverlight and for the record; here are the official Silverlight page. Update: For more info about Silverlight, check out Mary Jo Foley's blog post.
Sunday, April 15, 2007
According to Scott Hanselman, Microsoft has released an update to speed things up a bit. Here are some of the improvements: - Accelerate the download of messages from the Exchange e-mail server
- Reduce temporary freezes resulting from deleting messages or copying them from one folder to another
- Allow faster switching between messages
- Enable faster program startup
Saturday, April 14, 2007
Just a reminder for MSDN Live in Bergen the 23rd of April. This time Microsoft have joined forces with Norwegian .Net User Group and me and John St. Clair are speaking at the last session of the day. I will talk about migration to WCF and John will do Debugging, Tracing, and Administration: Tips & Tricks. Here you'll find details about the "NNUG Agenda".
Wednesday, March 07, 2007
Jamie Cansdale over at TestDriven.NET had a rather strange experience with Microsoft lately. Check out what they sent him: I’m contacting you to ask if you would like to be considered for an MVP
Award in recognition of your contributions to technical communities
over the past year.
And then: Vicki Collins (Brook Street) would like to recall the message, "Microsoft Most Valuable Professional Award"
Check out the full story at his blog.
Wednesday, January 24, 2007
 In case you missed it, MS AJAX 1.0 is now released. Now you can play for real :) Check out Scott Guthrie's blog for details. Or if you want to go strait for the download, you'll find it at ajax.asp.net.
 Don't forget to register for MSDN Live in Bergen 13. February! It's no surprise that Ajax and IIS 7 attract a lot of people to this event, so register now before it's full. You don't want to become the guy, who wasn't there, would you? ;) You can even pick up some Tips & Tricks for VS 2005. If this Tips & Tricks session is the same as at TechEd, you'll have to see it!
Monday, January 22, 2007
The guys at Microsoft Patterns & Practices have created a new site for upcoming releases. Nice to see what’s going on release wise. Take a look at Tom Hollanders blog to get the complete story.
Wednesday, January 10, 2007
Everyone who knows me knows that I have a special interest for memory leaks in .Net. At the company where I work we have solved a lot of these issues and I’ve also had talks about this at Norwegian .Net User Group (NNUG) in Bergen and Stavanger. One of our biggest problems was memory leaks related to events. Rico Mariani (MS performance guru) has set focus on this in his blog today by this blog post, so go check it out!
He focuses on the issue related to event generators, but there are other areas where you can get into trouble as well. I’ll try to explain our scenario: -
We have a graphical engine responsible for creating graphical components (user controls) dynamically by using reflection.
- All of these user controls inherit from the same class which exposes a lot of events.
- When our graphical engine creates new instances of these user controls it hooks up these events.
This model is created to have loose coupling between the user controls, the engine and other components we have in our app. The engine has a lot of knowledge about other components and services in our app, which sometimes our user controls wants to communicate with. This communication is done through these events. Here’s an example:
I have a user control that wants to tell a service that he have made some changes the service should know about. For this we have created a special event on the user control that the engine listens to. So I trigger this event on the user control, the engine receives it and tells the service about it.
These event hookups caused us a lot of pain at some point. Our solution was the first that Rico mentioned in his blog post (IDisposable), which I personally would prefer. In addition to this we added some reflection code which found events and removed them. You’ll find more info about this here: http://channel9vip.orcsweb.com/ShowPost.aspx?PostID=180985
Before I end I want to recommend two tools you can use to find memory leaks in .net. The first one which we use is called .Net Memory Profiler. The other one which I’ve not personally used but I’ve heard others are using is the ANTS Profiler. So go find your leaks. Happy hunting!
Thursday, January 04, 2007
Friday, December 29, 2006
As one of Microsoft latest publicity efforts they offered Joel Spolsky (Joel on Software) and other bloggers a new Ferrari laptop with Windows Vista to keep, in return of his opinion of Windows Vista. They got what they bargained for and a bit more. Check out his latest blog post to get the details.
I must say I admire Joel as one of our best bloggers out there and he really knows how to attract an audience. I’m not sure if I have dared to blog about this in the same way as Joel and I'll give him credit for that, but why on earth did Microsoft offer him this deal if they knew who he was? I’ve read quite a bit of his work including his Joel on Software book and this is not the first time he’s brutally honest about these things. I remember quite a few references back to the Excel team where he once worked at Microsoft. Very interesting reading. Anyway my humble opinion is that this happens all the time and I guess it’s up the each and every one of us to decide for our self what to do. I agree with Joel in great extent, but as I said I don’t think I would have blogged about it. But that’s probably why he has a trillion readers and I have 7. But at least I got a brand new hot tub 6 months ago… Still waiting for that Ferrari though... Yeah, in
my dreams!!
|
| |
|
|
|
|
| |
| August, 2010 (2) |
| June, 2010 (3) |
| April, 2010 (2) |
| March, 2010 (2) |
| February, 2010 (3) |
| January, 2010 (4) |
| December, 2009 (1) |
| August, 2009 (4) |
| July, 2009 (4) |
| June, 2009 (2) |
| May, 2009 (4) |
| April, 2009 (7) |
| March, 2009 (7) |
| February, 2009 (4) |
| January, 2009 (4) |
| December, 2008 (7) |
| November, 2008 (1) |
| October, 2008 (6) |
| September, 2008 (7) |
| August, 2008 (4) |
| July, 2008 (3) |
| June, 2008 (7) |
| May, 2008 (7) |
| April, 2008 (5) |
| March, 2008 (3) |
| February, 2008 (9) |
| January, 2008 (3) |
| December, 2007 (4) |
| November, 2007 (10) |
| October, 2007 (10) |
| September, 2007 (2) |
| August, 2007 (6) |
| July, 2007 (6) |
| June, 2007 (3) |
| May, 2007 (2) |
| April, 2007 (8) |
| March, 2007 (6) |
| February, 2007 (5) |
| January, 2007 (10) |
| December, 2006 (9) |
| November, 2006 (5) |
| October, 2006 (8) |
| September, 2006 (5) |
|
|
 |
 |
|
|