Use the ASP.NET Authentication Service with Windows Phone 7

Posted by on Comments (0)

If you want to use the ASP.NET Authentication Service with your Windows Phone 7 (this is quite similar if you want to use it with Silverlight), just create a standard Windows Phone project in Visual Studio 2010 :

Once this is done, add an empty web test project :

Create a new WCF service in this Web Application :

Name it AuthenticationService.

Remove the auto-generated Code-Behind file and Interface.

Edit the .svc to rely on the AuthenticationService (more info) provided by Microsoft :

Edit the Web.config or use the WAT (Web Site Administration Tool Security Tab) to enable the Authentication Service and to create some users. Here is how my Web.config file looks like :

 

Once this is made, you can reference this service in your WP7 application and start to use the authentication mechanism :

And the result is :

Or :

You can download the sample here

I created a user Spiderman with a password Spiderm@n

Sharepoint 2010 SilverXplorer V 0.1

Posted by on Comments (0)

Recently I've worked on a small Silverlight application that targets Sharepoint 2010 file operations (copy, move, delete, …).

Sharepoint 2010 has a lot of great enhancements compare to Sharepoint 2007 but still lacks of basic file operations facilities (e.g. if you want to copy a file from a doclib to another doclib, you must give the URL of the destination doclib).

This V 0.1 of Sharepoint 2010 SilverXplorer currently only offers files & folders browsing.

Here is how the application looks like inside of Sharepoint :

Here is how the loading progress looks:

To change the Sharepoint site, click the button and choose a new site URL:

To go inside a folder, just click it!

To go up, click the button.

 

You can also use it in an out of browser way (with elevated trust).

 

On the Silverlight side, the new Sharepoint 2010 Client Object Model has been used.

If you take a look at the code, you'll also note that I've used a Resource Dictionary & Merged Dictionaries for styles and states and that I'm playing a lot with states (I like them!).

Sharepoint queries were optimized by Mathieu Gretry who joined the project!

 

To download the V 0.1 of the XAP or to access the source code, just go to : http://spsilverxplorer.codeplex.com/

Silverlight debugging with Firefox 3.6.4 or above

Posted by on Comments (1)

If you've Firefox 3.6.4 or above installed on your computer and if you use it as your default browser, you'll probably meet some problems while trying to debug a Silverlight application in Visual Studio.

The Mozilla team has changed security settings for plugins.

I found the solution in the Silverlight forum (Thanks to MisterGoodcat!).

Here is what you to do :

  • Type "about:config" into Firefox address bar
  • Accept the warning (if applicable)
  • Search for the entry "dom.ipc.plugins.enabled.npctrl.dll"
  • Change its value from "true" to "false" (by double-clicking it)
  • Restart the browser

Sync your Silverlight out-of-browser application data without service but with Dropbox

Posted by on Comments (2)

Imagine this scenario :

  • You've built a Silverlight application with the out-of-browser feature.
  • This application is installed on multiple computers.
  • You may work with your Silverlight app without being connected.
  • You want to avoid complex sync programming and you don't want to use server-side data service(s).

In this scenario, you need to work with a local repository to persist your data. Keep it simple and let's consider an XML file to serialize your data (for more complex scenario, this article may be a source of inspiration).

But… Implementing a data sync pattern may lead to headache.

How to avoid writing a server sync service, a (proprietary?) client agent (with a nice data changes detection), and how to remain the less system-dependant as possible?

Others have done it for you with Dropbox!

Simply said, Dropbox "is software that syncs your files online and across your computers".

Dropbox is stable, secure and very seamless. It works on Windows, Mac and Linux.

For more information about it and if you want to register, go here (and, at your turn, invite your friends to earn more space).

So, come back to our Silverlight OOB application. Here is then my architecture suggestion:

You can try it with this application : DropboxSLOOB

To use it :

  • Install the application on your computer (out-of-browser with elevated privileges) clicking the button

  • Your Dropbox folder MUST be installed in your "My Documents" folder.
  • Create a small XML file in your Dropbox folder, copy this :

    <?xml version="1.0" encoding="utf-8"?>

    <Items>

    <Item data="This is an item data" />

    <Item data="This is another item data" />

    <Item data="efefe" />

    </Items>


Now you can get your items and create new ones. And if you try to use another computer with the same application, you'll see that your data is synced! 

To download this test application and the test XML file (it's inside the Visual Studio project), go here.

This application is made under VS 2010 RC with SL 4.0 RC.