Tags: | Categories: Blog Posted by admin on 7/9/2009 2:30 PM | Comments (0)

Finally after not that long of a wait the “rumors” were true, Silverlight 3.0 is here, the first release was at the Mix09, and now we already have a release. Microsoft proofs again they can move fast even being a huge corporation.

Even when the Silverlight.NET website says that is Silverlight 3 Beta the links are to the release version of those applications. I guess they haven’t updated the site yet or will be updated tomorrow morning. The final version is a day ahead of the product launch event in San Francisco.

http://silverlight.net/getstarted/silverlight3/default.aspx

You can get more information of the new feature on SharpGIS blog.

Cheers

Al

Tags: | Categories: Blog Posted by admin on 7/3/2009 10:55 AM | Comments (3)

Since SQL 2005 you can add .NET dlls into the SQL Assemblies, therefore get called on triggers and event from SQL to do something. Those should be simple utilities as the installation is still quite painful.

Now when you are trying to use WCF or WPF dlls referenced on your application that could be a little harder.

You’ll have to reference all the assemblies by hand that means setting the trust level .

ALTER DATABASE DatabaseName SET TRUSTWORTHY OFF
use MASTER
GRANT UNSAFE ASSEMBLY to public

Working with a DLL referencing WPF toolkit you first need all those:

CREATE ASSEMBLY [SMDiagnostics]  FROM 'C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\SMDiagnostics.dll'  WITH permission_set = unsafe
CREATE ASSEMBLY [System.Runtime.Serialization] AUTHORIZATION dbo FROM 'C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\System.Runtime.Serialization.dll' WITH permission_set = unsafe
CREATE ASSEMBLY [System.Data.Linq] AUTHORIZATION dbo FROM 'C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.Linq.dll'  WITH permission_set = unsafe
CREATE ASSEMBLY [System.Core] AUTHORIZATION dbo FROM 'C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\system.core.dll' WITH permission_set = unsafe
CREATE ASSEMBLY [WindowsBase] AUTHORIZATION dbo FROM 'C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\windowsbase.dll' WITH permission_set = unsafe
CREATE ASSEMBLY [PresentationCFFRasterizer] AUTHORIZATION dbo FROM 'C:\Windows\Microsoft.NET\Framework\v3.0\WPF\PresentationCFFRasterizer.dll' WITH permission_set = unsafe
CREATE ASSEMBLY [System.Drawing] AUTHORIZATION dbo FROM 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll' WITH permission_set = unsafe
CREATE ASSEMBLY [PresentationCore] AUTHORIZATION dbo FROM 'C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\PresentationCore.dll' WITH permission_set = unsafe

CREATE ASSEMBLY [PresentationHost] AUTHORIZATION dbo FROM 'C:\Windows\Microsoft.NET\Framework\v3.0\WPF\PresentationHostDLL.dll' WITH permission_set = unsafe

CREATE ASSEMBLY [System.Windows.Forms] AUTHORIZATION dbo FROM 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll' WITH permission_set = unsafe
CREATE ASSEMBLY [System.DirectoryServices] AUTHORIZATION dbo FROM 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.DirectoryServices.dll' WITH permission_set = unsafe
CREATE ASSEMBLY [PresentationFramework] AUTHORIZATION dbo FROM 'C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\PresentationFramework.dll' WITH permission_set = unsafe
CREATE ASSEMBLY [PresentationUI] AUTHORIZATION dbo FROM 'C:\Windows\Microsoft.NET\Framework\v3.0\WPF\PresentationUI.dll' WITH permission_set = unsafe
CREATE ASSEMBLY [System.Web] AUTHORIZATION dbo FROM 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.dll' WITH permission_set = unsafe
CREATE ASSEMBLY [System.Messaging] AUTHORIZATION dbo FROM 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Messaging.dll' WITH permission_set = unsafe
CREATE ASSEMBLY [System.IdentityModel] AUTHORIZATION dbo FROM 'C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\System.IdentityModel.dll' WITH permission_set = unsafe
CREATE ASSEMBLY [System.IdentityModel.Selectors] AUTHORIZATION dbo FROM 'C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\System.IdentityModel.Selectors.dll' WITH permission_set = unsafe
CREATE ASSEMBLY [System.ServiceModel] AUTHORIZATION dbo FROM 'C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\System.ServiceModel.dll' WITH permission_set = unsafe
CREATE ASSEMBLY [Microsoft.Transactions.Bridge] AUTHORIZATION dbo FROM 'C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\Microsoft.Transactions.Bridge.dll' WITH permission_set = unsafe

CREATE ASSEMBLY [System.Web.Extensions] AUTHORIZATION dbo FROM 'C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Web.Extensions.dll' WITH permission_set = unsafe

CREATE ASSEMBLY [wpftoolkit] AUTHORIZATION dbo FROM 'C:\Program Files\WPF Toolkit\v3.5.40128.1\wpftoolkit.dll' WITH permission_set = unsafe

 

Now you are ready to add your dll into SQL

CREATE ASSEMBLY YourDLLName
FROM 'C:\temp\YourDLLName.dll'

 

Create a trigger to get called when there is a table insert.

CREATE TRIGGER InsertTrigger
ON TableName
FOR INSERT
AS EXTERNAL NAME Assembly.Class.Method

Of course you can add a trigger for update or delete.

Preparation

You’ll need to allow .NET CRL objects enabled on your SQL Database, to do that, please run:

EXEC sp_configure 'clr enabled', 1;
RECONFIGURE WITH OVERRIDE;
GO

Looks like is a little complicated, yet with a little SQL script and patience you can have a very powerful trigger that will call you C# dll on SQL events.

A warning here is that there is no debugging or way to attach the debugger, so keep it simple or send the information to a WCF service.

Cheers

Al

Tags: | Categories: Blog Posted by admin on 7/3/2009 10:53 AM | Comments (0)

The ESRI International User Conference is almost here and its being all this resources and links going around all the blogs. If you coming to San Diego from July 13th to the 17th you may want to set up twitter to find out the latest information

Follow ESRIUC for the latest and greatest, check the online community.

I would highly recommend to read the Q & A from Jack Dangermond

When going to a conference there are many interesting things happening at the same time, setting up an schedule really works, yet the real time feedback from the users at the conference is actually the best part. Setting up a Twitter account on your computer or better on your phone is  the way to go. The ESRI User Conference will provide as every year to the people attending the conference, free wireless Internet, check how to connect here.

With that you can use your laptop or your phone to get a Twitter client application. Sign up at twitter here.

image

 

Enter your name and a username you want to use, is that easy. The next step is to start following people, I would recommend to follow ESRIUC.

You can always follow me if you got any questions about twitter that I can help, of course, to follow me, just click at the link and click the button follow.

You can always use the Twitter website to catch up and get all your information, yet the client applications for your laptop or your phone make this easier and more fun.

If you need to know how to use Twitter, Scott Hanselman has a great beginners guide.

I recommend for the iPhone to download any free Twitter Client, Twitter Deck is pretty good. As well for the computer there is a TwitterDeck.

I’ll see you in San Diego.

Cheers

Al

Follow me in twitter | bookmark me | Subscribe to my feed | Add stats to your blog

Tags: | Categories: Blog Posted by admin on 7/3/2009 10:35 AM | Comments (1)

Once a year I completely escape with my family to a place without any possible connection to the Internet or computers, well actually we take a little laptop in the small chance to get some Internet connection and of course to play the kids DVDs on the plane. This year we are going to South Cancun, Mexico. We had many vacations in Mexico, all in Puerto Vallarta, a place my family enjoyed during the years. This time we are going to the other side of the country to a resort located at the Ecological Park.

 

 

After a long year of working hard in many projects, I found a beach all inclusive vacations with my wife and kids is all I need to catch up with life again.

This resort called The Hacienda Tres Rios is a new resort of many that will be build in that Ecological Park, located on 326 acres of the Riviera Maya’s jungle, there are 3 natural rivers surrounding the resort for kayaking and providing fresh water. This resort is a model for environmentally sustainable tourism.

 

Tres Rios fulfills all environmental standards, reusing the natural resources without impacting the exceptional beauty around it. The AC heat is reused to heat the water in your shower for example. For all that, my family believes that could be a great place for us to spend 2 weeks enjoying their natural park and bird sanctuary with botanical garden.

These kind of vacations allows me to spend 24 hours with my kids and play with them, something that with my busy schedule during the year I can only enjoy on weekends. We also are planning to enjoy and visit many Maya ruins and get into the culture.

Being able to speak Spanish allow us to travel and get to know more details about the places we go in Mexico, my family and I enjoy that country and its people quite a lot.

We have taken vacation to Grand Cayman, Thailand, Europe and Hawaii, still Mexico is one of our favorite destinations to go, to be honest we like the direct short flights, a must when traveling with kids, the friendly people, the awesome resorts and the great food.

If you are planning a family vacation and I would encourage you to look and environmentally friendly resorts like this one.

Cheers

Al

Tags: | Categories: Blog Posted by admin on 7/2/2009 5:54 PM | Comments (0)

 

  So glad that that Microsoft renewed my ASP.NET Most Valuable Professional for the third time. I am so honored yet I feel a little guilty that I’m taking a spot from some other developer around the world that never been a Microsoft ASP.NET MVP. There are so many people deserving to at least find out the benefits of being a Microsoft MVP.

Yet, let’s face it, the Microsoft MVP Summit is the best “conference” out there and the resource the company gives you access is as well every single thing that any developer needs to keep up with technology. Therefore I am so glad that Microsoft has awarded me this year again their MVP program.  

 

 

Thank you to my MVP Lead that never ignored any of my emails and Toby Richards for this great program. This is a great program for developer around the world, I had experience it and many companies should adopt the same philosophy to reward people that embraces their technology, this way is a two way street, the developer gets more training while the company gets feedback from their products.

Personally I’m looking forward to the next MVP Summit 2010 where the dates haven’t been announced yet. May I make a suggestion and ask this time to schedule it for the summer? Not that I don’t like the rain, yet is getting a little too predictable.

Again, thanks Microsoft for all your year of Support.

Follow my MVP Lead at @zannabanana

Cheers

Al

Tags: | Categories: Blog Posted by admin on 7/1/2009 2:44 PM | Comments (0)

When the iPhone 3G 3.0 update came out, we were expecting some kind of tethering for people like me that goes on the road a lot and need the laptop connected to the web in regular basis. AT&T didn’t supply that option and they might be adding that for a huge monthly fee.

Now some people found the way around that problem and how to do it, in 5 minutes following this instructors your laptop can be online connected  to your iPhone via USB or Bluetooth.

All the details to do that takes 5 minutes and can be found here at iSmashPhone

http://www.ismashphone.com/2009/06/activate-internet-tethering-now-on-iphone-os-30.html

Follow those instructions to be able to activate your iPhone for tethering. Now this is not what AT&T wants you to do, so they may charge you if they find out and of course that application to unlock the feature is not being tested by Apple.

Cheers

Al

Tags: | Categories: Blog Posted by admin on 6/30/2009 10:42 AM | Comments (2)

Message based authentication managed by Silverlight not the browser.

Silverlight can use the browsers cookies and send them to the hosts. When you authenticate with ASP.NET the authentication cookie stored to your computer will be used by Silverlight if you create a Silverlight Authentication Service

 

Create a service.svc make sure to select the Silverlight Service.

<%@ ServiceHost Language="C#" Service="System.Web.ApplicationServices.AuthenticationService %>

 

On your web.config add the service to be enable it.

<!-- this enables the WCF AuthenticationService endpoint --> <service name="System.Web.ApplicationServices.AuthenticationService" behaviorConfiguration="AuthenticationServiceTypeBehaviors"> <endpoint contract="System.Web.ApplicationServices.AuthenticationService" binding="basicHttpBinding" bindingConfiguration="userHttp" bindingNamespace="http://asp.net/ApplicationServices/v200"/> </service>

Then just connect to the service as a service web reference and use the methods for the authentication

 

Related posts

http://blogs.msdn.com/brada/archive/2008/05/03/accessing-the-asp-net-authentication-profile-and-role-service-in-silverlight.aspx

http://blogs.msdn.com/brada/archive/2008/06/23/using-asp-net-authentication-in-a-web-service-with-silverlight.aspx

 

Cheers

Al

Follow me in twitter | bookmark me | Subscribe to my feed

Tags: | Categories: Blog Posted by admin on 6/28/2009 4:38 AM | Comments (3)

I deployed a Silverlight application that needs to access HTTPS resources, for the deployment of course I read the guidelines to declared on the clientaccesspolicy file the https explicitly. So on the resources that needed to be access by Silverlight I added the following clientaccesspolicy.xml

 

<?xml version="1.0" encoding="utf-8" ?>
<access-policy>
  <cross-domain-access>
    <policy>
      <allow-from http-request-headers="*">
        <domain uri="http://*"/>
        <domain uri="https://*"/>
      </allow-from>
      <grant-to>
        <resource path="/" include-subpaths="true"/>
      </grant-to>
    </policy>
  </cross-domain-access>
</access-policy>

 

On some of my previous posts I explain my frustration believing that Silverlight was not able to read the security cookie to send it at each request, until a change was made to the client access policy file to do not state explicitly that HTTPS had access to that resource.

 

<?xml version="1.0" encoding="utf-8" ?>
<access-policy>
  <cross-domain-access>
    <policy>
      <allow-from http-request-headers="*">
        <domain uri="*"/>
      </allow-from>
      <grant-to>
        <resource path="/" include-subpaths="true"/>
      </grant-to>
    </policy>
  </cross-domain-access>
</access-policy>
 

All the sudden as an act of magic, Silverlight was able to access those resources. The SSL certificate is not self signed so Silverlight is happy using those resources after changing the clientaccesspolicy.xml to allow any access.

I was very surprise at that, anybody can shine some light to this problem? All resources I read mandate to explicitly add the https on the domain uri to allow https calls from Silverlight, yet that part was the one that blocked my Silverlight application.

Cheers

Al

Follow me in twitter | bookmark me | Subscribe to my feed | Add stats to your blog

Tags: | Categories: Blog Posted by admin on 6/23/2009 4:15 PM | Comments (0)

At the MVP Summit I got more than just new technology and roadmaps, many people have the philosophy of building software. I now it’s being a while since the 2009 MVP Summit, I wanted to practice the philosophy before posting it and saying that is the best thing since slice bread. Just to make sure to give credit where credit is due, this is was my philosophy, I “borrowed” it from the right people:

  • Scenario focused
  • Business customers drive scenarios.
  • Scenarios drive the technology.
    • Technology does not drive the scenarios.
    • Scenarios should be end to end.
    • Enable scenarios (simply and basically)
  • Take only a few innovative risks

As I think about it I have failed many times in following this philosophy, I enjoy taking risks as well as technology drives my scenarios in many instances.

As developers we know there is more than just writing code, something that business analysts do not account when trying to price your resource and time. We should get rid of all developers as Phil Haack fantastic blog post described. Hey wait, he is in our side on this one. Yet brings something very interesting into surface, programmers are not communicating effectively to non very technical person or we get frustrated to keep repeating or explaining the same concepts.

A developer is just a resource in a project, is not even the most important resource nor the one that deserves more attention, the developer in a project yet is normally the one that requires more time and budget to get the product to the customer.

Following the philosophy to build new application, developers and architects should spend as much time as they need to build an architecture and build prototypes proof the concept.

When architecting a solution we are eager to use the latest technology as well as not creating workflows from end to end. If you look back on your previous challenges you would be surprise to find out you took perhaps a few risks that increased the time and cost of the entire project. I’m not saying, that you should never take a risk, I for once take many risks in my projects and I’ll be taking more in future ones, I make sure to managed those by early prototyping and increasing the amount of time to avoid surprises, even with that, surprises will come, yet you’ll have the proper budget and time to deal with those as they arise.

This works for me besides my 2008 resolution, easy, flexible and always ready!

Some great resources to help manage your programmers ego.

http://www.secretgeek.net/program_communicate_4reasons.asp

 

Cheers

Al

Follow me in twitter | bookmark me | Subscribe to my feed | Add stats to your blog

Tags: | Categories: Blog Posted by admin on 6/23/2009 4:11 PM | Comments (0)

As many developers come to the wonderful side of Silverlight there are now many new resources to help you to write code in Silverlight. I would like to bring some very interesting ones into the light on my monthly link series.

The Interesting list.

GeoReference any XAML to place it correctly on an ElementLayer by Morten Nielsen

Hanselminutes Podcast – Silverlight 3 with Tim Heuer where Scott Hanselman and time Heuer discuss the new features of Silverlight 3

Hanselman’s Breaking all the rues with WCF. A must have if you work with Silverlight and Silverlight web services.

Silverlight 3: Displaying and Charting with TwitterCounter.

Stream operations in WCF and Silverlight 3.

Silverlight 3 and Expression Blend 3 Launch date.

Art’s Place announcement : ArcGIS API for Silverlight/WPF Release Candidate now available.

Adam Kinney’s blog : Silverlight-based Local Impact Map

Deep Zooming on the fly.

Corey SchumanVersioning your Silverlight application.

From the wonderful blog at nikhilk.net

And if you are tired of the ASP.NET MVC project, you can always check the Silverlight MVC

The Locate Me with Virtual Earth Sample for Silverlight

MouseWheel behavior for Silverlight.

Rolling Stone Archives in Silverlight.

The Silverlight Toolkit

The late news about the new release for Silverlight 2 and 3

The .NET RIA Services

What’s the .NET RIA Services?

.NET RIA Services MIX ‘09 Talk and Sildes

And the geeky goes to:

And the Silverlight cool application award goes to a French developer.

Cheers

Al