In this software market developers, software engineers or software architects, whatever you would like to be call today, are having a hard time catching up in technology when your day work is concentrating on a framework. Yet, the demand for Silverlight developers is higher right now than the available developers with those skills. To fill that gap in the Inland Empire, the University of Riverside (UCR) is offering this course this fall. Register before September 9 to take advantage of their price and become a Silverlight Developer.
Course Number: CS X433.5 Register here
Learn the hottest technology from Microsoft to create Rich Internet Applications using Visual Studio 2008/2010. Microsoft Silverlight is a powerful development platform for creating engaging, interactive user experiences for Web, desktop, and mobile application when a user is online or offline. Silverlight is a cross-browser, cross-platform and cross-device browser plug-in that helps companies design, develop, and deliver applications and experiences on the Web.
Schedule:
Thurs. 6-10 p.m. (no meeting Nov. 11), Sept. 16-Nov. 18 (9 meetings)
Preregistration:
Requested by September 9th
Location:
University Extension Center − LAB 211, RIVERSIDE Map
Textbook:
"Silverlight 4 in Action," 1st, Pete Brown and Chad A Campbell ISBN: 1935182374 Buy Online
Credit:
4 units
Fees:
$895
Cheers
Al
b100c433-687a-4fda-8656-3ea32a10f17c|0|.0
![pete-brown-silverlight-in-action[1] pete-brown-silverlight-in-action[1]](http://alpascual.com/image.axd?picture=pete-brown-silverlight-in-action%5B1%5D_thumb.png)
Silverlight in Action by Pete Brown covering Silverlight 4, ViewModel/MVVM, WCF RIA Services, MEF and more is coming out in a few days, I have read many parts of this book, I believe that if you want to learn Silverlight or you want to go deep in any subject of Silverlight 4, this is the book to read.
All chapters have great detail of why and how Silverlight internally working and when you finish the book, you’ll understand inside and out how Silverlight works as well as how can you apply it better to your work.
The samples are simple, yet exciting as well as every code line is comment and explain. Without any doubt Pete did a great job writing this book and thinking about all those Silverlight developers to be and the developer that wants to improve or understand better how it works under the hood.
Its a revised edition of Silverlight 2 in Action by Chad Campbell and John Stockton.
Order the book here.
The table of content for your reference:
1. Introducing Silverlight
2. Core XAML
3. The application model and the plug-In -
4. Integrating with the browser -
5. Integrating with the desktop -
6. Rendering, layout and transforming -
7. Panels -
8. Human input -
9. Text -
10. Controls and UserControls -
11. Binding -
12. Data controls: The Datagrid Dataform -
13. Input validation -
14. Networking and communications -
15. Navigation and dialogs -
16. Structuring and testing with MVVM/ ViewModel pattern -
17. WCF RIA services -
18. Graphics and effects -
19. Printing -
20. Displaying and capturing media -
21. Working with Bitmap images -
22. Animation and behaviors -
23. Resources, styles and control templates -
24. Creating panels and controls -
25. The install experiences and pre-loaders -
Appendix A: Database, connection and data model setup -
About Pete Brown from his blog:
Pete Brown is a Developer Division Community Program Manager at Microsoft, focusing on helping developers create great Windows Client and Silverlight applications. Pete speaks locally in the mid-atlantic US, as well as internationally, and creates content for windowsclient.net, MSDN, and, of course, here. Oh, and Pete adores his C64. :)
You can follow him in Twitter @pete_brown
58bcad9b-9b9d-4343-a2b2-dba432d3159b|0|.0
The iPhone is an amazing platform, yet coming for the .NET world, Objective C really makes me feel like I'm going back to the old days of C, now when Novell came out with MonoTouch I thought that I could do something with that.
I spent many years in Visual Studio and working in .NET, going to a Mac with XCode makes it a little hard, Novell started many years ago the Mono project an open source, cross-platform implementation of C# and the CLR that is binary compatible with Microsoft.NET. Mono provides you as well with a version of the Visual Studio for the Mac called MonoDevelop that will make the .NET developer feel better using a Mac or Linux. Those are open source and you can download them from their main page.
MonoTouch is the implementation of that library in the iPhone, iPod Touch and iPad world, allowing developer to create C# based applications that runs on Apple’s iOS by binding on the native libraries. The best part is that, there is no JIT or interpreter shipped with your application, only native code when you deploy to the Apple AppStore as well as MonoTouch does not support VB.NET ;-)
Let’s get stated.
So I thought to give MonoTouch a chance. My test is going to be to use the native library created by ESRI to consume maps on the iPhone. So I downloaded the Beta of the ArcGIS library for the iPhone 4.
Add the native library (.a) to the project just by right click –> Add –> Add Files, select the library file and add it into the main directory of your project.

Change the flag to do not build, so MonoDevelop does not try to build the native library on the solution, the latest MonoDevelop already does that, however, is a good idea to check.

Create the .NET dll to bind it all.
Now we needed to create a dll to use with MonoDevelop, there are lots of steps to be able to bind a iPhone native library in MonoTouch, I was lucky enough that Novell gave me all the support I needed. I created an interface from the exisiting library, for that I used a parser provided by Novell to go over the header files The parser can be pointed to a file or a complete directory, and will create the binding to the Objective-C Type.
"mono parser.exe directory"
or
"mono parser.exe file.h"
Miguel de Icaza has a great documentation of the binding details. Please read carefully how to bind each object on the documentation, so you can fix errors after the parser, is very important to learn the Objective-C syntax. I recommend not to do it by hand, use the parser.exe that I compiled already and you can download it to give you 98% of what you need. Download it here

Then that created the C# code and enums, I used those to create the library by using the MonoTouch application bTouch, make sure you run it on a console window, I fixed the errors produce by the parser so you can download the C# code files from here, you'll find that there are 4 files, 2 for the device and 2 for the simulator. You can find the dll created as well that will bind to the ESRI libArcGIS.a iPhone SDK. You can always recreate the dll by running btouch.
/Developer/MonoTouch/usr/bin/btouch -v parserArcGISClassesSim.cs -s:parserArcGISEnumSim.cs
Please Note: There is a bug that Geoff Norton from Novell found on the btouch utility, download this one here that fixes the issue. btouch was fixed in 3.0.12 as well which will be pushed to the stable channel this week.
In the zip you’ll find that I created bindings for the simulator library and for the device library, please use the correct one, otherwise you’ll get an exception like this if you using the incorrect dll bound to the wrong native library.
Unhandled Exception: MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -[UIDevice machineType]: unrecognized selector sent to instance 0x6670e90
at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging:IntPtr_objc_msgSend (intptr,intptr)
at MapViewer.AGSMapView..ctor () [0x00000] in <filename unknown>:0
at MapViewer.AppDelegate.FinishedLaunching (MonoTouch.UIKit.UIApplication app, MonoTouch.Foundation.NSDictionary options) [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00000] in <filename unknown>:0
at MonoTouch.UIKit.UIApplication.Main (System.String[] args) [0x00000] in <filename unknown>:0
at MapViewer.Application.Main (System.String[] args) [0x00000] in <filename unknown>:0
Binding it all together.
The last step to link everything; you need to change the project settings as well, all the information is here from MonoTouch.net however the linker has a few issues and Geoff Norton from Novell gave me the perfect flag to avoid the problem, you must also specify use the -ObjC and -all_load linker flags in your project's Other Linker Flags build setting. This is because the ArcGIS library defines objective-c categories which do not get loaded without these flags, is not a problem on the –ObjC like we first thought.
-gcc_flags "-L${ProjectDir} -lArcGIS -framework CFNetwork -force_load ${ProjectDir}/libArcGIS.a"
Now you are ready to write some C# code and with a few simple line of code after adding your Map View using the Interface Viewer.

Let’s add the map.
Make sure you create an outlet for the map as is a UIView. The very detail steps to do so are documented here, to work with the Interface Viewer as is the same for MonoTouch than XCode.
Now that you have an outlet for the map called myOutletMap you can go ahead in the Main.cs file and after the application finishes, you can add a tiled layer before the window gets visible to the user.
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
// If you have defined a view, add it here:
// window.AddSubview (navigationController.View);
MonoTouch.Foundation.NSUrl myurl = new MonoTouch.Foundation.NSUrl("http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer");
AGSTiledMapServiceLayer second = new AGSTiledMapServiceLayer(myurl);
myOutletMap.AddMapLayer(second, "basemap");
window.MakeKeyAndVisible ();
return true;
}
Let’s make it easier, download it all!
You can find the complete project source code here to download it and not having to go over all the steps for you to compile and start adding your business logic, the link above is the complete solution. Please make sure you have a license of MonoTouch if you want to deploy as well as a license of ArcGIS products before using it
Cheers
Al
PS. Thanks so much to Novell specially to Miguel de Icaza and Geoff Norton for all the fixes and help.
812948aa-b7cc-4d91-8fc8-1cd0f0ecb791|0|.0
Tags: json, oData |
Categories: Blog
Posted by
al on
7/30/2010 10:24 PM |
Comments (0)
Lately I have been using Json objects to consume data back and forward, is a great idea to use serialization and is the way that Json was defined to use, so let me provide you the class I have used to deserialize the Jsons strings to a C# class containing points and polygons.
Here many people would argue about using a oData provider, however oData does not have yet objects for point, lines and polygons, I hope that will be an extension soon for that.
JSON output of list of points:
{"displayFieldName":"user_","fieldAliases":{"objectid":"OBJECTID","user_":"User_","when_":"When_","message":"Message"},"geometryType":"esriGeometryPoint","spatialReference":{"wkid":4326},"fields":[{"name":"objectid","type":"esriFieldTypeOID","alias":"OBJECTID"},{"name":"user_","type":"esriFieldTypeString","alias":"User_","length":50},{"name":"when_","type":"esriFieldTypeDate","alias":"When_","length":36},{"name":"message","type":"esriFieldTypeString","alias":"Message","length":50}],"features":[{"attributes":{"objectid":556,"user_":null,"when_":null,"message":null},"geometry":{"x":-122.20946263799993,"y":46.347259295000072}},{"attributes":{"objectid":557,"user_":null,"when_":null,"message":null},"geometry":{"x":-121.7832936559999,"y":46.327096106000056}},{"attributes":{"objectid":558,"user_":null,"when_":null,"message":null},"geometry":{"x":-121.45076981699992,"y":46.223192199000039}},{"attributes":{"objectid":559,"user_":null,"when_":null,"message":null},"geometry":{"x":-121.60421939299994,"y":46.447141897000051}}]}
List of polygons
{"displayFieldName":"user_","fieldAliases":{"objectid":"OBJECTID","user_":"User_","when_":"When_","message":"Message","st_area(shape)":"st_area(shape)","st_length(shape)":"st_length(shape)"},"geometryType":"esriGeometryPolygon","spatialReference":{"wkid":4326},"fields":[{"name":"objectid","type":"esriFieldTypeOID","alias":"OBJECTID"},{"name":"user_","type":"esriFieldTypeString","alias":"User_","length":50},{"name":"when_","type":"esriFieldTypeDate","alias":"When_","length":36},{"name":"message","type":"esriFieldTypeString","alias":"Message","length":50},{"name":"st_area(shape)","type":"esriFieldTypeDouble","alias":"st_area(shape)"},{"name":"st_length(shape)","type":"esriFieldTypeDouble","alias":"st_length(shape)"}],"features":[{"attributes":{"objectid":851,"user_":null,"when_":1268488335000,"message":null,"st_area(shape)":0.034047438257996235,"st_length(shape)":0.77206915728427228},"geometry":{"rings":[[[-122.16579076999994,46.786080545000061],[-121.96758767299991,46.806778769000061],[-121.94071267599992,46.647888904000069],[-122.21282201299994,46.654806891000078],[-122.16579076999994,46.786080545000061]]]}}]}
JSON string to C# classes
public enum PositionType { none, esriGeometryPoint, esriGeometryPolygon }
public class Ref
{
public int wkid { get; set; }
}
public class SubObject
{
public Dictionary<string, string> attributes { get; set; }
}
public class SubObjectPoint : SubObject
{
public Position geometry { get; set; }
}
public class SubObjectPoly : SubObject
{
public Rings geometry { get; set; }
}
public class Rings
{
public ArrayList rings { get; set; }
}
public class Position
{
public double x { get; set; }
public double y { get; set; }
}
public class PointJson : Json
{
public PointJson() { features = new List<SubObjectPoint>(); }
public List<SubObjectPoint> features { get; set; }
}
public class PolygonJson : Json
{
public PolygonJson() { features = new List<SubObjectPoly>(); }
public List<SubObjectPoly> features { get; set; }
}
public class Json
{
public PositionType geometryType { get; set; }
public string displayFieldName { get; set; }
public Dictionary<string, string> fieldAliases { get; set; }
public Ref spatialReference { get; set; }
}
2099b5d8-ac22-4e50-8ce4-be06adb9185c|0|.0
Update 7/29/2010:
Actually I found my problem I think, when referencing any of this 2 dlls I get into the error described.
System.Windows.Controls.Data.Toolkit.dll
System.Windows.Controls.Toolkit.dll
I don't need to use them, just for the fact to be reference, MEF will roll over and die.
Hope this helps
MEF is great technology yet, looks still a little young and without much documentation for my personal taste. There are a few samples, however, when you are trying to go beyond what is provided you can get in a huge amount of troubles with a generic error:
I found that trying to load just one xap file was giving me this error:
[System.InvalidOperationException] = {System.InvalidOperationException: The package downloaded successfully but an error occurred while reading the contents of the package. See the inner exception for more details. ---> System.Reflection.ReflectionTypeLoadException: Unable to load one or more ...
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_InnerCatalog()
at System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_Parts()
at System.ComponentModel.Composition.Hosting.DeploymentCatalog.DiscoverParts(IEnumerable`1 assemblies)
at System.ComponentModel.Composition.Hosting.DeploymentCatalog.HandleOpenReadCompleted(Object sender, OpenReadCompletedEventArgs e)
Just by doing this
var catalog = new AggregateCatalog();
catalog.Catalogs.Add(CreateCatalog("something.xap"));
CompositionHost.Initialize(new DeploymentCatalog(), catalog);
CompositionInitializer.SatisfyImports(this);
private DeploymentCatalog CreateCatalog(string uri)
{
var catalog = new DeploymentCatalog(uri);
catalog.DownloadCompleted += (s, e) => DownloadCompleted(s,e);
catalog.DownloadAsync();
return catalog;
}
private void DownloadCompleted(object sender, AsyncCompletedEventArgs e)
{
if (e.Error != null)
{
MessageBox.Show(e.Error.Message);
}
}
If I changed the second line for a dot, MEF now load all the xaps in that directory, that by default is ClientBin
catalog.Catalogs.Add(CreateCatalog("."));
The samples on the MEF codeplex website have a few syntax error for DeploymentCatalog
http://mef.codeplex.com/wikipage?title=DeploymentCatalog
I fixed it to the best of my knowledge.
public interface IDeploymentCatalogService
{
void AddXap(string relativeUri, Action<AsyncCompletedEventArgs> completedAction);
}
[Export(typeof(IDeploymentCatalogService))]
public class DeploymentCatalogService : IDeploymentCatalogService
{
private static AggregateCatalog _aggregateCatalog;
Dictionary<string, DeploymentCatalog> _catalogs;
public DeploymentCatalogService()
{
_catalogs = new Dictionary<string, DeploymentCatalog>();
}
public static void Initialize()
{
_aggregateCatalog = new AggregateCatalog();
_aggregateCatalog.Catalogs.Add(new DeploymentCatalog());
CompositionHost.Initialize(_aggregateCatalog);
}
public void AddXap(string relativeUri, Action<AsyncCompletedEventArgs> completedAction)
{
DeploymentCatalog catalog;
if (!_catalogs.TryGetValue(relativeUri, out catalog))
{
catalog = new DeploymentCatalog(relativeUri);
if (completedAction != null)
catalog.DownloadCompleted += (s, e) => completedAction(e);
else
catalog.DownloadCompleted += (s, e) => DownloadCompleted(s, e);
catalog.DownloadAsync();
_catalogs[relativeUri] = catalog;
_aggregateCatalog.Catalogs.Add(catalog);
}
}
void DownloadCompleted(object sender, AsyncCompletedEventArgs e)
{
if (e.Error != null)
{
throw new InvalidOperationException(e.Error.Message, e.Error);
}
}
}
Now I want to load xap files without having to know what type there are, I found this great blog post from Glenn Block (Mr. MEF) where provides a Widget project to load them in MEF http://codebetter.com/blogs/glenn.block/archive/2010/03/07/building-hello-mef-part-iv-deploymentcatalog.aspx?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+CodeBetter+%28CodeBetter.Com%29
Glenn provided a better way to load xap files, just using this 3 lines of code:
DeploymentCatalogService.Initialize();
CompositionInitializer.SatisfyImports(this);
CatalogService.AddXap("HelloMEF.Extensions.xap");
Using his example shall work to load UserControls, now I tried to modify to load ResourceDictionary by changing the MEF attribute to:
[MetadataAttribute]
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public class ExportThemeAttribute : ExportAttribute
{
public ExportThemeAttribute()
: base(typeof(ResourceDictionary))
{
}
public WidgetLocation Location { get; set; }
}
To receive the error again: The package downloaded successfully but an error occurred while reading the contents of the package.
I made sure there wasn’t any circular reference and the metadata was like the sample provided and still didn’t had any success.
How can I load a xap containing other resources besides UserControls?
Cheers
Al
62ce5e6b-c3fb-4ed3-939f-39d45cd5bc90|0|.0
I was playing with the Telerik Map control that out of the box provides you Bing Maps and Open Street Maps OSM maps. I found myself wondering how long would take to implement a provider for ArcGIS Online, so I gave myself a few minutes while the kids were watching TV and I created this provider that will attached to the Silverlight Telerik Map Control to consume ArcGIS.com Tiled map services.
The XAML for the Telerik Silverlight 4 Map Control:
<UserControl x:Class="TestMap.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<Grid x:Name="LayoutRoot" Background="White">
<telerik:RadMap x:Name="RadMap1" ZoomLevel="7" />
</Grid>
</UserControl>
The Code Behind
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
//this.RadMap1.Provider = new OpenStreetMapProvider();
this.RadMap1.Provider = new ArcGISServerMapProvider(Telerik.Windows.Controls.Map.MapMode.Aerial, true);
RadMap1.Center = new Location(34, -117);
RadMap1.ZoomLevel = 7;
}
}
The provider:
public class ArcGISServerMapProvider : MapProviderBase
{
public string mapServiceUrl { get; set; }
public string Token { get; set; }
public ArcGISServerMapProvider(MapMode mode, bool labelVisible) :
base(mode, labelVisible)
{
// You can always change this property to another map service.
mapServiceUrl = "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer";
}
public override MapProviderBase GetSource(MapMode mode, bool isLabelVisible)
{
return this;
}
/// <summary>
/// Only supports Web Mercator for now
/// </summary>
public override ISpatialReference SpatialReference
{
get
{
return new MercatorProjection();
}
}
public override Uri GetTile(int tileLevel, int tilePositionX, int tilePositionY)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat("{0}/tile/{1}/{2}/{3}", new object[] { this.mapServiceUrl, tileLevel/2, tilePositionY, tilePositionX });
if (!string.IsNullOrEmpty(this.Token))
{
builder.AppendFormat("?token={0}", new object[] { this.Token });
}
Uri uri = new Uri(builder.ToString());
return uri;
}
public override void Initialize()
{
}
public override bool IsLabelSupported
{
get { return false; }
}
public override bool IsModeSupported(MapMode mode)
{
return false;
}
public override System.Collections.Generic.IEnumerable<MapMode> SupportedModes
{
get { return null; }
}
protected override void OnMapModeChanged(MapMode oldMode, MapMode newMode)
{
}
}
The results is a nice looking map that you can zoom in and out and pan around.

Download the Source Code with the project file to play around or to fix my bugs.
I already found out that when zooming in very close, the viewer is requesting tiles from a level that does not exist, when I get sometime or the kids decide to go to sleep earlier, I’ll debug with the help of Fiddler to see what is the tiles requesting schema.
Disclaimer: The map consume is from ArcGIS Online, so please make sure you read this below to use it in a commercial application:
To use this map in a commercial (revenue-generating) application, you must purchase an annual subscription for the World Street Map Bundle or the USA/World Bundle. Please call 1-800-447-9778 or contact your local ESRI office to purchase a subscription.
5aa8fc3c-9e79-40fb-ace3-5e3f34b1e696|0|.0
Tags: Twitter |
Categories: Blog
Posted by
al on
7/21/2010 7:18 PM |
Comments (0)
Twitter is a very useful tool as a parent, this year I have been travelling a lot and I found a few online tools easy to communicate with my kids, Tiny Chat and Twitter are a must, yet security is a huge concern for me or any parent.
My 7 years old daughter love writing, for her to practice writing and send me messages while I travel, we use twitter, is also a way for me to send funny pictures and open a conversation with her, now she is using her protected timeline as her daily 140 character diary.
The step I followed to let my 7 year old use Twitter
When setting up their account, make sure you go to the profile and enable the Tweet Privacy, when the check box is enable, nobody can see those tweets besides the followers.
Using Tweet Deck and removing all columns besides the reply and direct message.
I used one of my email addresses so nobody can request to friend her without my accepting, only my wife and I are her friends and can communicate with her for now.
My daughter in the past year has learn how to manage a computer, from turning on and off to navigate the application and use some, of course she is a ninja in the browser to go to her favorite websites.
Every kid should learn how to use a computer and Smartphone. What are your thoughts in that one?
Cheers
Al
da0655e0-18b2-44dd-ae66-308f985ebfd4|0|.0
Tags: OSM, ESRI |
Categories: Blog
Posted by
Admin on
7/7/2010 10:40 AM |
Comments (0)
I’ll be showing around the Open Street Map http://www.openstreetmap.org/ implementation to consume and edit free geographic data such as street maps to anyone who wants to see it. The tools for ArcMap 10 will be available from ESRI as an Open Source project. Now you’ll be able to consume Open Street Maps and use the tools in ArcMap 10 for your editing and analyzing geographic information. I don’t have the timeline or the details, a little too early for those details just yet. Keep an eye to this blog or more important the ESRI Prototype Lab blog where innovations are being created right now.
Anybody can edit and consume OSM, for this reason, this approached is great and very welcome in an event of emergency. Volunteer found Open Street Maps extremely useful in Haiti.
I’m personally looking forward the presentation from Charles Kennelly (ESRI UK) on problems with metadata on Saturday 10th at 4:30 PM UTC+1
If you want to contact me around the conference or you would like me to demo the ArcMap 10 Extension of the Open Street Map, the best way is sending me and email or I’ll be watching my twitter account http://twitter.com/alpascual and I’ll be available at the conference, just look for me.
The Conference HashTag is: @sotm10 http://search.twitter.com/search?q=%23sotm10
If you new at the conference, some information about State Of The Map 2010
The 4th Annual International OpenStreetMap Conference Girona, Spain, July 9th – 11th, 2010
What’s State of the Map?
The State of the Map is the world’s leading OpenStreetMap community event. Join participants from all around the world in Girona from July 9th – 11th to hear talks, participate in workshops and hang out with OpenStreetMappers from around the world. If you are involved with any aspect of OpenStreetMap from mapping to coding to campaigning, or if you want to hear more from the global mapping movement that is changing the way maps are made and used, the State of the Map is for you.
Hope I’ll see you there
Cheers
Al
UPDATE: Marten Hogeweg's overview blog post about the Open Street Map Editor for ArcMap 10, download the source code here and send us feedback http://esriosmeditor.codeplex.com/
9408d770-da42-4acb-93d3-68be6e87b7fe|0|.0
With the new .NET 4 framework, comes some problems if you are still running still IIS 6 on Windows Server. IIS 6 does not let you have more than one framework at the time running in the same instance or website like IIS7 that can create a Application Pool targeting a different framework.
When IIS 6 runs under ASP.NET 2.0 (3.0 and 3.5 are superset, not frameworks) you are going to hit this error if the application is 4.0
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.
Source Error:
Line 11: </configSections>
Line 12: <system.web>
Line 13: <compilation debug="true" targetFramework="4.0">
Line 14: </compilation>
Line 15: <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/></system.web>
You have a few options, downgrade the .NET application to 3.5 that Visual Studio 2010 makes it really easy. Just go to the WebSite properties -> Application tab and there is a drop down with all the framework releases, select 3.5, you VS2010 will reload the project and modify the web.config, if you added web service reference, that you may have to delete them and re-add them under 3.5

Now, you’ll have to unregister the ASP.NET 4.0 under IIS6, to do so, go to your console windows and go to the directory Windows/Microsoft.NET/Framework/v4.xxxx and type->aspnet_regiis /u

Then register ASP.NET 2.0 by going to Windows/Microsoft.net/Framework/v2.xxxxx> type aspnet_regiis /i
Hope that work for you.
Cheers
Al
fab9f154-9b16-4aeb-a918-328b28aeff86|0|.0
Read the post from Silverlight 3 Accessing Security and Authentication in Silverlight using .NET RIA Services.
I have received many questions about the previous post of how the proxy files actually work. I was looking how WCF RIA Service connects ASP.NET and Silverlight, I was expecting the code that I call from Silverlight using the generated proxy file to call the ASP.NET in the server, yet this is not the case, .NET RIA Service makes a complete copy of the file and compiles it under Silverlight, so all the shared code is just that, 2 different classes, one running in ASP.NET and the other running in Silverlight. That’s why you need to make sure the classes you use in ASP.NET are 4.0 compatible.
Authentication with .NET RIA Services.
Creating a Silverlight application and using the Checkbox to enable that project for ,WCF RIA services won’t give you everything you need to use the WCF RIA Services Authentication right now, I do not know if that will change on the release version.
The concept is great, yet, WCF RIA Services is still in development and I believe they haven’t added the “Authentication Domain Service” to secure your Silverlight application with the ASP.NET security context.
For Authentication .NET RIA Service need to be a little different, as need to run on the ASP.NET, even if you call it from Silverlight. So you want to Authenticate a user from Silverlight and you add this code:
namespace SilverlightApplicationRIA
{
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
RiaContext.Current.Authentication.Login("al", "pascual");
}
}
}
You’ll receive this error from the WCF RIA Services letting you know you need to create a Context first.
“No contexts have been added to the Application's lifetime objects. For RiaContextBase.Current to resolve correctly, add a single context to the lifetime objects.”

So doesn’t work out of the box, you need to configure ASP.NET with a Membership provider and enable authentication on the web.config. The fastest way is to enable Windows Authentication, then create a Domain Service, go to Add –> New Item and select “Authentication Domain Service”

This is where the problem starts, you won’t be able to find these item in the list. The item is missing on the lastest .NET RIA Service from July sample.
Using the Business Application Template for Security enable application.
So if you want Authentication in .NET RIA Services, you’ll have to create a new project instead of just linking or enabling .NET RIA Services.
Go to create a new project, select Silverlight and “Silverlight Business Application” to create a new application with many things build in for you.

Click to register a new user/.

Upon registration and also login in, Silverlight talks to ASP.NET using WCF RIA Services, the biggest concern for developers is how to prevent the credentials to be seen by anybody as the client needs to send it to the server.
I added Fiddler in the middle to see the communication between the client and the server. Silverlight sends in a post sending the username and password in text.
POST /ria/ClientBin/DataService.axd/BusinessApplication1-Web-AuthenticationService/Login HTTP/1.1
Accept: */*
Content-Length: 58
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0)
Host: alhome
Connection: Keep-Alive
Pragma: no-cache
userName=al&password=hellowworld3%23%23&isPersistent=False
Works the same way than in ASP.NET with a post into the server, then is the server that checks the database and does the authentication. So the best way to secure that communication will be using SSL if you do not want to protect the credentials.

Credentials get stored into a File database on ASP.NET.
This template is using the Authentication context to the server
private AuthenticationService _authService = RiaContext.Current.Authentication;
Securing a Silverlight object using Roles in Silverlight and .NET RIA Services.
So this sample will explain using the ESRI Silverlight Map Control, coolest Silverlight control out there, how to protect using Authentication Roles a object in Silverlight.
In the Home UserControl I added the ESRI Silverlight Map and change the visibility depending on the user authentication.
public Home()
{
InitializeComponent();
if (RiaContext.Current.Authentication.IsLoggingIn == true)
MyMap.Visibility = Visibility.Visible;
else
MyMap.Visibility = Visibility.Collapsed;
RiaContext.Current.Authentication.LoggedIn += new EventHandler<System.Windows.Ria.ApplicationServices.AuthenticationEventArgs>(Authentication_LoggedIn);
RiaContext.Current.Authentication.LoggedOut += new EventHandler<System.Windows.Ria.ApplicationServices.AuthenticationEventArgs>(Authentication_LoggedOut);
}
void Authentication_LoggedOut(object sender, System.Windows.Ria.ApplicationServices.AuthenticationEventArgs e)
{
MyMap.Visibility = Visibility.Collapsed;
}
void Authentication_LoggedIn(object sender, System.Windows.Ria.ApplicationServices.AuthenticationEventArgs e)
{
MyMap.Visibility = Visibility.Visible;
}

As well I register the events for login and logout to make sure I hide the map when the user logout.
You can register a username and password or use:
username: test
password: test123!
This is how WCF RIA Services shows the best way to use Role base security using Silverlight.
Download all the code here
Hope this helps
Cheers
Al
bcbe71de-4fd2-408d-ab10-c7d1e5c058c5|0|.0