Posts

Showing posts with the label SILVERLIGHT 2 BETA 2

Silverlight 2 RC0 : Important Considerations for Developers

There are hundreds of “Me Too” blog posts about this, so I won’t bore you with more of the same. There are, however, two of what I think are very important considerations about Silverlight 2 RC0 that developers need to know about. You can only find out about this stuff if you take the time to RTFM carefully. In this case that would be the info on Scott Guthrie’s blog and possibly on Tim Heuer’s blog as well.  Pete Brown also does a great job of covering details, and he writes well. Finally, another smart person to follow would be Mike Snow , who is a Senior Software Design Engineer in Test (SDET) for Visual Web Developer Tools.   1)   RC0 is a developer release only . You cannot deploy RC0 applications to the web. They won't work. It's only for test environments where you want to ensure that existing or new applications will work with the final Silverlight 2 release. To repeat: there is no end-user installable runtime for RC0, only the developer runtime with the ...

Learning Experiences: What Developers Want

“The last update to the Hypertext Markup Language — the lingua franca of the web — was the 4.01 specification completed in September, 1999.” – Digg Post Recently I read a post on Jesse Liberty’s blog about getting flamed by some commenter who didn’t like what he was publishing. I responded in a comment that I thought he was doing just fine, and that you cannot expect to please everybody. But I also recommended that he put up one of those free poll “thingies” that would allow his visitors to vote on what they did want to see, and Jesse took me up on it. He put up a comprehensive poll that allowed write-in suggestions. I thought it was very well designed. The preliminary results of some 250 responses (including mine) is quite revealing, I think: “The results have held steady from the very beginning – Webcasts have overwhelmingly been the "last choice" for over 2/3 of users and in-depth tutorials have been the first choice; with short videos and short tutorials splitting t...

Silverlight: Handy Dynamic Javascript Debugger Favorite

Often you need to be able to View Source on a page that has injected dynamic javascript to see what you did, and,surprise – it’s not there. Here is a neat way to view source (including any dynamically generated elements or script):     javascript:document.write('<xmp>'+document.documentElement.innerHTML+ '</xmp>');   What this does is simply using the <xmp> (“example”) tag to literally render  your “stuff” without parsing. You can add this to your browser’s favorites as an A-HREF link and that way you can simply choose the favorite to view the complete source on any page.  This is extremely useful when using the Silverlight Browser classes to manipulate the DOM of the underlying Page. Here’s a sample like (this may not work as Blogger does funny stuff, but you can still mouse over it): Debug Js

Bugs in Silverlight?

Dr. Evil: Right, people you have to tell me these things, okay? I've been frozen for thirty years, okay? Throw me a frickin' bone here! I'm the boss! Need the info. I've seen more than a few posts on the Silverlight Forums where people are complaining (or sometimes just asking for help / guidance) on issues where they appear to be attempting to "tax the system"  and thus expose what they believe is "a bug".  Hey - Silverlight has bugs - even release software does -- that's not the issue. But creating artificial programming situations where one can claim "It's a bug" is not always a  legitimate effort. More often than not, this revolves around issues like "memory leaks" when attempting to set up some sort of "test" code that does some operation in a tight loop, or some similar operation that does not necessarily relate to what would likely happen in a "real world" Silverlight application. The poste...

Silverlight 2 Beta 2: ConfigUnrecognizedElement issue and Fix

  When you create a Service Reference in a Silverlight App to an ASMX WebService, you may get the:  "An unhanded exception ('Sys.InvalidOperationException: ManagedRuntimeError error #4004 in control 'Xaml1': System.InvalidOperationException: ConfigUnrecognizedElement at System.ServiceModel.Configuration.BindingsSection.ReadXml(XmlReader reader)" Exception. This "is a real bug".  When your Visual Studio 2008 Silverlight app generates the ServiceReferences.ClientConfig file, it creates a customBinding section that it cannot parse. In fact even the IDE marks the customBinding tag with squiggles saying "The element 'bindings' has invalid child element 'customBinding'. List of possible elements expected: 'basicHttpBinding'." This is because SIlverlight doesn't understand SOAP 1.2, which is the default for ASMX webservices. DUH! To fix, you can do this with WCF: <customBinding> <binding name=...

Silverlight: Some HttpWebRequest Headers don't work

Parents: Talk to your kids about Linux. Before somebody else does. -- XKCD I saw a couple of posts where people were attempting to make GET or POST requests to some service (which, if not same-domain, had the required crossdomain.xml or clientaccesspolicy.xml file) and this service required BASIC authentication credentials. Normally, you would add an "Authorization" header with the value "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==" where the gobblydegook after the word BASIC is username:password converted to a Base64 string.  That's standard W3C Header protocol . Unfortunately, even though there is sample code illustrating this from Karen Corby here , it does not work (she does not actually add an Authorization header, just illustrates how to add a header). It turns out that the "Authorization" header is on the "restricted list". See here for a complete listing .  So, if you have been trying to do this, or any similar header that is on th...

OMG, Silverlight! Asynchronous is Evil! (or, Call me back when you got it)

Now we sit through Shakespeare in order to recognize the quotations. - Orson Welles I just have to shake my head at this absolutely moronic thread on the Silverlight Forums promoting a "petition" to bring back synchronous webrequests in Silverlight. Really, it has all the elements of the old VB6 flame wars… N.B. 8/18/2008: It looks like the moderators finally took the thread down; it was so full of hate posts and name-calling and ad-hominem attacks, its about time! They just don't understand: Have you ever had your browser freeze up when requesting a page somewhere which request (or even a subrequest in the page, such as for advertising or an image) doesn't come back right away? Your browser turns white, your whole damned desktop is frozen, and you may need to get rid of IEXPLORE.EXE from within Task Manager just to free up your system (in rare cases you may actually have to shut down and reboot). This is what happens when a developer who doesn't know how t...

Silverlight: Recent Updates Developers Should Know About

If you got the original Silverlight 2 Beta 2 developer bits which became available around 9PM on the very last Friday of Tech-Ed 2008, you may have noticed that you just recently got a refresh in the form of KB955011 from Windows Update. It turns out that this is supposedly included in a newer version of the silverlight_chainer.exe consolidated installer, which was freshly updated on 7/11/2008. That is to say, the version up there now is NEWER than what you got right after Tech-Ed. I suspect there are some additional fixes in the Tools portion of this, and so I recommend downloading it and reinstalling.  In fact, when I did so, I was pointed to a .vbs script whose header comments are self-descriptive: ' Installation verification script for Microsoft Visual Studio 2008 ' This script checks for KB949325 and reinstalls all Advertised features ' At no time should there be Advertised features for Microsoft Visual Studio 2008 ' Any features in an Advertised state are an...

Client-side database with Silverlight?

Image
I’ve seen some discussion threads about doing things like putting VistaDb (a 100% managed code database) into a Silverlight app. Most of this was wishful thinking, IMHO. If you are going to put a database into a Silverlight app, obviously the data file(s) need to go in IsolatedStorage. So that’s one hurdle – handling file access. And VistaDb is kind of on the large side for inclusion in a Silverlight app that’s designed to download into the browser. I took a look at SharpHsql , which a much simpler managed – code database effort that has had its ups and downs since being ported from the JAVA implementation.  I tried ripping out the Provider (which depends on System.Data – not present in Silverlight Framework) and thought I was making progress, but then I saw that there were still too many other dependencies on stuff from the full Framework that just isn’t there in Silverlight, so I gave up for now. However, I still think this is an idea that has merit. Think of a notetaking app...

Tips for Silverlight Developers / Tutorials

Friends may come and go, but enemies accumulate. – Thomas Jones I’ve downloaded some very simple “one page” zipped or rar-ed Silverlight demos that were 1MB and larger. If you remove all the .dll and .pdb files from such a solution, you save about 2.5 MB before you compress it. If you use tools like Resharper, and you remove all the Resharper – related files, you’ll save even more.  Remember, not everybody uses Resharper! The last one I downloaded was a one -pager Silverlight .rar that weighed in at nearly 1 MB. It also had the Resharper files in it. After I did the above cleanups and re-rared it, it was only 43Kb! D00ds! Almost 1 MB vs only 43K after cleanup! When you load and build one of these  “cleaned up” demo or tutorial solutions like this, all of the assemblies and pdb files will be regenerated perfectly. You do not need to distribute all this baggage with your demo! Computers run on electricity. And electricity comes from coal, oil, or gas (and sometimes the hot ...

Silverlight 2 Beta 2 Installation Issues

Image
The "bottom line" (you can read all the gory details after this): 1) I DO NOT recommend installing Visual Studio 2008 SP1 Beta and / or .NET Framework 3.5 SP1. There are simply too many issues and fragile fixes. Just wait until all this stuff gets fixed and save yourself a lot of headaches and lost time. 2) I DO recommend installing Silverlight 2 Beta 2, the Tools, the documentation, and Blend June 2008 Preview. Just be very careful about the ServiceProxy assembly issue mentioned at the end of this post, as it seems to be able to occur whether or not you choose to try the Service Pack route. Well, 2 out of 3 ain’t so bad! I got SL2B2, the Visual Studio Tools and Blend June Preview on 2 out of 3 PCs and everything is working beautifully. On the third PC (the one at the office, which of course had to wait until Monday June 9, unless you stayed very late Friday night) however, I ran into the below issue: Method 'SelectSilverlightProject' in type 'Microsoft.VisuaS...

Silverlight 2 Beta 2 Downloads

Image
NOTE: Since this post has been a "work in progress", updated links are found starting at the nota bene number 2. You want "Silverlight_Chainer.exe". Jeesh! I don’t know why they seem to make this stuff so hard to find. Here they are, more later ( go to the bottom for more recent links, including the "chainer")   Silverlight 2 Beta 2 Download (4.66 MB) Silverlight 2 Beta 2 Documentation (50.3 MB) Have fun!   At this point I haven’t been able to locate links for the Silverlight 2 Beta 2 Visual Studio Tools, or the June Preview of Expression Blend.  You would think what with Tech Ed and all that Microsoft would be scrambling to get these links up on the Silverlight.net site, but – hey, that’s progress, huh? if you happen to be reading this and you find the Tools or other links before I do and update this post, leave a comment with the hyperlink  so we can do a service to the .NET Developer community. N.B. – The latest from MS at the Silverlight.net...