|
>
 Friday, March 23, 2007
 |
|
 |
|
|
|
|
|
I created a presentation in November of last year with the goal of helping folks make sense of the vast number of Microsoft technologies from development tools, language, data, windows, web and SOA development. This blog post holds the latest links to resources and code for each section. System Requirements The links below use the following technology platforms: - Visual Studio 2005 and .NET 2.0
- .NET 3.0
- NET 3.0 Runtime (installed with Vista)
- Windows SDK for .NET 3.0
- Visual Studio 2005 Orcas Extensions for .NET 3.0:
- WCF&WPF (Nov 2006)
- WF (Nov 2006)
- ADO.NET and LINQ CTP for VS 2005 (May 2006)
- LINQ CTP
- ADO.NET vNext CTP
- ADO.NET vNext Entity Data Model Designer Prototype, CTP
- Visual Studio Orcas CTP (March 2007)
Development Tools In this section I reviewed the stack of development tools and explained how to choose between them. Language Enhancements In this section I talked about moving from .NET 1.1 to 2.0, and discussed the key features of 2.0 that folks should be leveraging. Then, I focused on the language enhancements forthcoming with C# 3.0 and VB 9.0. Demos: Data Access In this section I focused on data access technologies, designing the data access tier, and key features of ADO.NET 2.0, vNext and LINQ to give you some idea how to prepare for the next set of innovations. Demos: - When you install ADO.NET vNext and LINQ there are literally 100s of samples that will really help you get up to speed here. I show a selection of these in this presentation.
Windows Development
In this section I review Windows Forms 2.0 innovations, primarily ClickOnce, and then talk about how to prepare for WPF, explaining the various deployment models. I also talk about practical approaches to choosing the right platform for your development efforts. Demos: Web Development
In this section I showed an ASP.NET sample application that illustrates key features of ASP.NET 2.0 and practical application of those features. Then we looked at AJAX and discussed trends on the Web compared to Windows development. Popular AJAX Frameworks: Demos: Distributed System Programming In this section I reviewed the typical use for earlier distributed computing technologies like remoting, enterprise services and ASMX web services with WSE, and compared them with WCF. BPM and Workflow In this section I discussed BPM, BizTalk and workflow and trends for BizTalk vNext. DinnerNow To pull it all together, there is a sample you can download here: www.dinnernow.com that illustrates all of the technologies in a practical example. It includes WCF, WF, WPF, AJAX, Vista gadgets and mobile apps.
|
|
|
 |
|
 |
 Sunday, November 12, 2006
 |
|
 |
|
|
|
|
|
A big thanks to all the participated in this monstrous tutorial at Dev Connections. Whew, I can fully admit it was a lot of work to put all the information together in one place, but I hope that you got a lot out of it. For those that didn't attend, the goal of the tutorial was to provide an overview of the current state of the various technologies and tools for Microsoft developers, with an emphasis on the reasons for moving forward with each technology stack, and hopefully some enlightenment on when you might choose each technology. I'll be keeping this one day session current for future conferences, and for on-site sessions with clients. If you are interested in such a thing, contact me at IDesign: www.idesign.net.
Here are the resources I promised from the tutorial.
Development Tools
In this section I reviewed the stack of development tools and explained how to choose between them.
Language Enhancements
In this section I talked about moving from .NET 1.1 to 2.0, and discussed the key features of 2.0 that folks should be leveraging. Then, I focused on the language enhancements forthcoming with C# 3.0 and VB 9.0.
Demos:
Data Access
In this section I focused on data access technologies, designing the data access tier, and key features of ADO.NET 2.0, vNext and LINQ to give you some idea how to prepare for the next set of innovations.
Demos:
- When you install ADO.NET vNext and LINQ there are numerous overview documents, tutorials, and samples that will really help you get up to speed here. These are the demos that I showed in the tutorial.
Windows Development
In this section I reviewed Windows Forms 2.0 innovations, primarily ClickOnce, and then talked about how to prepare for WPF and who should use it today.
Demos:
Web Development
In this section I showed an ASP.NET sample application that illustrates key features of ASP.NET 2.0 and practical application of those features. Then we looked at AJAX and discussed trends on the Web compared to Windows development.
Popular AJAX Frameworks:
Demos:
Distributed System Programming
In this section I reviewed the typical use for earlier distributed computing technologies like remoting, enterprise services and ASMX web services with WSE, and compared them with WCF.
BPM and Workflow
In this section I discussed BPM, BizTalk and workflow.
|
|
|
 |
|
 |
 Monday, March 20, 2006
 |
|
 |
|
|
|
|
|
I have zipped up a collection of ClickOnce samples for your enjoyment. You may find a few of these samples interesting since they touch on some of the practical uses for ClickOnce. Here's the overview of the individual samples you'll find in the zip:
- ClickOnceContext - shows you how to detect a ClickOnce application from one that is not, along with other important states such as IsNetworkDeployed, etc.
- ClickOnceFirstRun - includes a utility for detecting first run ever versus first run since last update
- ClickOnceDataFiles - using the data directory for local user storage
- ClickOnceIsolatedStorage - using isolated storage for local user storage
- ClickOnceDeployGAC - shows you how to use a custom setup project (MSI) that deploys a GAC dependency for a ClickOnce application, as a bootstrapped MSI
- ClickOnceOnlineDetection - includes a utility for detecting when the application is deployed remotely, running as clickonce, and online
- ClickOnceMsmq - a WCF service with netMsmqBinding provides a reliable message queue to send transactions to a service even if the client is offline
- ClickOnceOnlineService - illustrates a factory pattern to use a WCF service used for connected clients, local data directory used for offline clients
- ClickOnceUtils - utilities used for several of these samples
- LocalizedFileGroups - sample illustrates a globalized application that uses download file groups to initiate download of required files in demand
- ManualCheckForUpdates - illustrates manually detecting updates
I have another sample for deploying a database script, that I am adding some things to for an upcoming conference, and will post here when I have completed the changes.
Enjoy! ClickOnceSamples.zip (1.41 MB)
|
|
|
 |
|
 |
 Sunday, February 19, 2006
 |
|
 |
|
|
|
|
|
After rebuilding my machine a few weeks ago, once again I find myself running into old problems and trying to remember how to repair them. This time, generating keys to strongly name my asesmblies through the Signing tab in Visual Studio 2005. I thought I would share it this time in case others have seen this problem...and struggled with it...
The Scenario:
For a Windows client application, open the Properties for the project, navigate to the Signing tab, check Sign the assembly and create a new key. In the Create Strong Name Key dialog, provide a new key name, provide a password, and click "OK".
The Problem:
An error message is presented: Create strong name key the operation could not be completed. Access is denied.
The problem repeats itself when I tried to use the strong name utility (sn.exe), with this error: Failed to generate strong name key pair. Access is denied.
The Solution:
I had to give my user account access to the key container in C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys. It turns out, even administrator rights were disabled on my machine! I am not sure if this was the default installation (I rebuilt the machine a few weeks ago) or if this is modified when I install WinFX, or if when I granted ASP.NET and NETWORK SERVICE access it somehow lost the inherited permissions that were granted when I installed the OS. In any case, at least it seems predictable, you need access to the key store in order to generate keys, makes sense!
How does it work?
Each container created using sn.exe -i is located in the MachineKeys directory (unless you specify elsewhere). The default key container that is used by sn.exe is also in that location.
In the event you reset your key container to a new one, and forget where it is...you can reset the key container for the strong name utility using sn.exe -c. So, if the account access fix doesn't work, you may be using an alternate key store so a reset may be in order.
I googled this topic a bit before writing this blog, and was surprised that very little has been written on this subject for a solution...furthermore...many people actually rebuilt their machines to solve the problem!!!! I hope this blog entry prevents a few more of those!!!
|
|
|
 |
|
 |
 Thursday, November 17, 2005
 |
|
 |
|
|
|
|
|
I for one had a great time yesterday at the launch. Bernard Wong invited Tim Huckaby and myself to help out presenting smart client and ASP.NET, respectively, while he demonstrated code from the Visual Studio 2005 launch event.
For all of you who attended, I offered some content that you might find relevant to ASP.NET and ClickOnce. All of my content references are in my most recent blog entries from DevConnections (see below) but the most relevant are these two:
I also wanted to make sure you all know about the .NET course curriculum at UCSD Extension. You can get links to all the courses from our new community blog here: www.ucsdxcommunity.com We'll post special advanced classes here, and also link you to our new course blogs (this is new, not a lot of content yet). I am the advisor to the program (since 1993!) so if you have any special requests, ask away!
<blatant_sales_pitch>
At IDesign we do architecture consulting, but we also do training. I teach the official IDesign Master Class at UCSD 2x per year (www.ucsdxcommunity.com/masterclass) and also do on site training, someone asked about this as well. See www.idesign.net for more information about those courses.
</blatant_sales_pitch>
I hope you enjoyed the day, please keep in touch!
|
|
|
 |
|
 |
 |
|
 |
|
|
|
|
|
For my globalization talk, I illustrated how to architect Windows Forms and ASP.NET applications for localization, leveraging .NET resources where appropriate. Here are the samples:
Don't forget to read the instructions for the Web application, it requires a database restore step. If you have any trouble, let me know!
Additional globalization resources:
Cheers!
|
|
|
 |
|
 |
 Wednesday, November 16, 2005
 |
|
 |
|
|
|
|
|
For this half day smart client tutorial, I talked about UI design, globalization, deployment, versioning, security, offline data and download on demand using the System.Deployment APIs. The sample code uploaded here is drawn from my demos, and a few extras listed here:
UI Design
Thread Safety
Globalization
ClickOnce
Also, we have number of other advanced samples on the IDesign site, don't forget to check out our downloads section of the site.
Thanks for attending the tutorial, and let me know if you have any questions about the code samples.
Cheers!
-Michele
|
|
|
 |
|
 |
 Wednesday, November 09, 2005
 |
|
 |
|
|
|
|
|
In my tutorial yesterday here at DevConnections I tossed the slides for the last half (those are for your reference) and basically spent the time demonstrating varioius aspects of ClickOnce: deployment, versioning, security, download on demand, globalization and offline data deployment. Whew, even without slides that was a lot to cover, and we opened many a can of worms that just leads to additional questions on the entire lifecycle of a smart client app deployed with ClickOnce.
One thing that really hit home is the “rights” users have to install applications. There are a variety of answers to that question, some of which were only vaguely answered in our discussion, and one item I wanted to follow up on...which I did with my colleague Brian Noyes.
Q. Who can install a click once application?
Any user can click a link to a ClickOnce application and install the application. If the appilcation requires greater trust than the zone they are installed from will grant (Intranet, Internet, My Computer) they will be prompted to approve the installation.
HA! That's that part I wasn't expecting (thanks Brian)...because I thought that ClickOnce was secure by default, meaning...users can't just click “ok“ to accept the download and elevation of application privileges...apparently I'm wrong...and I could swear I remembered speaking to someone “who knew“ about this in the past...but my memory may fail me...too much stuff in there I guess.
Q. What's the prompt for?
The download prompt is for one thing only: do you want to elevate security of this application you are downloading, beyond the security settings for its zone?
Are you sure? Are you REALLY sure?
And away we go, the app gets all the security it needs to run...that is, if there is sufficient permissions to complete the installation...
Q. Are users ALWAYS prompted to elevate security?
They are prompted every time the application is updated if it requires additional permissions beyond what the zone allowed.
UNLESS...the certificate is installed in the trusted publishers section of the certificate store, and if the issuer of the certificate is installed in the trusted roots section. Administrators can push the certs out to machines within the domain so that users are not prompted to elevate security for trusted publishers.
For non-trusted publishers, users will continue to be asked...WHAT??!? Yep, users by default have the right to “decide“ if they want to trust an application...and yes, it could be an application that when run deletes that special project they have been slaving over...or some other malicious behavior... and all because they were asked a question to which they responded...
duh...ok!
Q. Can administrators protect users from downloading untrusted applications?
Yes. If the prompting behavior is turned off, only applications that are trusted (cert has been installed) will be allowed to elevate security. Other apps can only run within the confines of the zone they belong to. So, if you install the application with an MSI, you get My Computer zone, and that grants full trust by default. Internet or Intranet downloads are granted less.
To turn off prompting behavior, set up the registry key:
KLM\Software\Microsoft\.NETFramework\Security\TrustManager\PromptingLevel
From Brian Noyes MSDN article:
The registry key \HKLM\Software\Microsoft\.NETFramework\Security\TrustManager\PromptingLevel is the one that allows you to customize the prompting behavior. This key is not present by default after a .NET Framework 2.0 installation, so you will have to create it manually if you want to customize these settings.
Under that registry key, you can add any of 5 string values, named MyComputer, LocalIntranet, Internet, TrustedSites, and UntrustedSites. These correspond to their respective zones. As a value for these, you can set one of three strings: Enabled, Disabled, or AuthenticodeRequired. Enabled is the default for the MyComputer, LocalIntranet and TrustedSites zones. The Internet default is AuthenticodeRequired, and the UntrustedSites default is Disabled. Table 2 shows the values that you can set for each zone and their effects. Figure 4 shows the registry key values set to their default behavior, but keep in mind this key does not exist by default so you will typically only create it if you are going to set them to different values than the defaults.
My take on this, the key should have been enabled by default. Why?
To make life difficult for users? no
To make life difficult for Mort? no
To make it difficult to accidentally trust a malicious third party and give them full access to the machine? yes, absolutely
So, administrators get your SMS push ready and get that registry setting up and running...pronto! Unless you don't concern yourself with the users ability to install apps to the corporate domain.
Conclusions:
- by default anyone can install an application and elevate trust unless admins turn off the prompting features
- applications that have publisher certificates installed are trusted to elevate security
- application installations over the Web or via MSI still may need administrative if the bootstrapper calls for adding components to the GAC, or downloading SQL Server Express which requires an admin as well...so ClickOnce is not necessarily removing the pain of installing complex applications...but it sure makes it easy for apps that don't require admin installation privileges
- in any case, once installed updates that don't bootstrap additional functionality that requires admin installation rights...can be easily handled by any user
Hope this is helpful to those that were new to ClickOnce...since we really couldn't get through all the nit picky details in my talk.
Please visit my collegue Brian's talk tomorrow for more:
Wed 2:00-3:15pm - VSM351: Secure Smart Client ClickOnce Deployments
Unless you want to come to my talk on Indigo/WCF security:
Wed 2:00-3:15pm - VID304: Indigo and Security: Experience the Magic
See you around!
|
|
|
 |
|
 |
 Sunday, May 08, 2005
 |
|
 |
|
|
|
|
|
Ok, I noticed a few other little things about the publishing process through Visual Studio 2005, related to Beta 2. So, in an effort to save you all the 45 minutes I wasted on some of these things, here's the list. Luckily, I was somewhat aprised of this before I did my presentation yesterday, however, it still ate up some demo time given that things didn't always work the first time...
1. Publishing will continue even if you can't successfully build (see my previous post), so I recommend you always try to build first and watch your output. I know what you are thinking: “Oh, I'll just publish and check the output window for errors before I run the app”. But, I guarantee you will be sometimes seduced by that little browser window with the “Install” button...and you'll forget...and you'll find a bug...and you'll try to think about what the problem is but really you didn't get the latest assembly (or, worse, the assembly you're referencing never was built).
2. The “Properties” tab doesn't appear to be saved as part of the build step. So, if you make changes they won't be reflected when you publish...another ghost. The problem is, it still increments the published version, so you “think“ you have it.
3. Sometimes, not always, if you don't version your assemblies, the updated code is not deployed with the newly published version. This problem seems strange to me, since the published application version has been incremented...however I haven't had time yet to inspect what the cause of this is, in terms of the server deployment and its files.
If I see any more problems, or find a solution for these issues...I'll update this post. Feel free to comment if you find it before I do, I'm about to bury myself in ASP.NET 2.0 and Indigo for the next few weeks, I won't have much time for ClickOnce...
|
|
|
 |
|
 |
 Saturday, May 07, 2005
 |
|
 |
|
|
|
|
|
Having some trouble getting ClickOnce publishing to work on Beta 2? Yeah, me too. On several of my VPCs and on a recent client's laptop machine, the Beta 2 install appeared to share the same problem. When publishing a smart client application through the Visual Studio IDE, the following error appeared:
Publishing files...
Error: Failed to copy file
'C:\SmartClientDemos\ClientApp\ClientApp\publish\setup.exe' to 'http://localhost/ClientApp/setup.exe'. Unable to add 'setup.exe' to the Web. Unable to add file 'setup.exe'. The system cannot find the file specified.
Publish failed.
Well, a little birdie named Ahti told me to create a mime mapping in IIS for the .application extension, that maps to application/x-ms-application. The link where the problem is described is here:
http://msdn2.microsoft.com/library/ms165433(en-us,vs.80).aspx
It worked like a charm for me.
Now, the real question: why isn't this set up when ASP.NET is installed on the machine, through the IIS configuration step? Furthermore, why do we need this mapping to publish the application? I would think that the error related to mime mapping should not occur until someone actually tries to click on the published application link, which downloads the setup.exe file, which in turn will try to access the .application manifest. I would expect to be able to publish without this error, regardless of any mime mapping.
|
|
|
 |
|
 |
 Saturday, March 26, 2005
 |
|
 |
|
|
|
|
|
I delivered not one, but two talks on this subject at the conference in Orlando…the first a fundamentals session, followed by a more advanced session that ended with ClickOnce. I have written some tutorials and articles on the subject that can be found here:
http://www.dotnetdashboard.net/sessions/versiondeploy.aspx
|
|
|
 |
|
 |
 Monday, March 21, 2005
 |
|
 |
|
|
|
|
|
In this session I walked through some live demos using .NET 2.0 and ClickOnce, to demonstrate how the smart client story is evolving to solve deployment, versioning, automatic updates, offline/online connectivity, and more. Here are some more resources on the subject:
http://www.softinsight.com/bnoyes/
that's my colleague Brian Noyes blog, he writes pleny on ClickOnce, has many reference to other articles he's written on the subject, and is my own personal ClickOnce hero
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnreal/html/realworld11022004.asp
a fellow Regional Director, Mauro Sant'Anna, writes fantastic article on ClickOnce, also a must read
And, in addition, resources for .NET 1.1 versioning, deployment, update and security issues at this blog entry:
http://www.dasblonde.net/PermaLink.aspx?guid=544e8515-afa0-46d3-8586-8512e686a911
|
|
|
 |
|
 |
 Wednesday, January 12, 2005
 |
|
 |
|
|
|
|
|
Tonight was my turn to present as part of Regional Directors presentation month in southern california. Tim Huckaby presented at the San DIego .NET Developer's Group last week, I presented to the VBUG in Orange County (with a good collection of C# UG members also present), and Paul Sheriff is next, presenting to the San Diego .NET User Group the last week of January.
Tonight I test drove my latest materials on .NET 2.0 ClickOnce and related subject matters for Smart Clients such as offline connectivity and data storage, versioning and deployment, security evaluation and elevation, and so forth. The slide deck is in PPT format here:
versiondeploysmartclient20.zip (979.02 KB)
Related links I showed at the end of my talk:
http://www.idesign.net - See some of the .NET 2.0 webcasts delivered by my colleagues http://www.dotnetdashboard.net/sessions/versiondeploy.aspx - see my resources on .NET 1.1 versioning and deployment
Other Microsoft resources for smart clients: http://www.windowsforms.net http://msdn.microsoft.com/smartclient
|
|
|
 |
|
 |
|
|
ON THIS PAGE
|
|
|
|
SEARCH
|
|
|
|
CATEGORIES
|
|
| |