Posted by
al on
12/27/2011 8:46 PM |
Comments (0)
The SQL Compact Database format is a simple file that acts as a SQL database, lately I have loved that kind of database as the set up is mainly non existing and the portability is amazing. Of course, without explicitly saying it, there are lots of limitations. You need to use that kind of technology for simple applications that do not require lots of data.
Using the SQL Compact Database with Entity Framework Code First is just elegant and clean code, then a little ASP.NET MVC 3 creates a project that can be deployed almost anywhere.
First stop was the Azure Cloud, just by adding a new project Azure to the solution, will let you publish the web project to Azure, that simple, you do not need to convert the ASP.NET MVC 3 app to Azure, you still can deploy the web app to your server with a simple Publish or Web Deploy.
Now, when deploying to Azure, you’ll see this error with the SQL Server Compact:
General failure Unable to load the native components of SQL Server
Compact corresponding to the ADO.NET provider of version 8482.
Install the correct version of SQL Server Compact.
Refer to KB article 974247 for more details.
The problem is a missing DLL that is required for the SQL Server Compact, to avoid this problem,
I recommend to go to project and add all deployable dependencies to the project like the image below:

Now all the dlls required to run the application will be in a folder ready to package and be sent to Azure.
In a few minutes, your ASP.NET MVC 3 with SQL Server Compact Database using Entity Framework Code First will be running in the cloud. Please make sure to delete the package from Azure when you are not using it to avoid charges, just by doing an stop of the application is not enough.
Cheers
Al
a1d0410d-fb95-4df3-adb2-2d6735aad6c4|0|.0
Posted by
al on
11/26/2011 8:07 PM |
Comments (0)
A few notes I have been gathering from DevConnections this year.
Main attraction to me is to see what Scott Guthrie is interested on. I like that he introduces the hold presentation before turning into the slides. This time everything is about the Microsoft Cloud; Azure.
The cloud save money? What about for development and research that is not expecting to have users for a long time? Mr Guthrie didn’t tell us how can developers start testing Azure without adding a credit card on the profile.
You can start to create a Azure app by just creating an MVC 3 app. Then add Windows Azure Deployment project that creates a new project that will take care of all your Azure options without changing your MVC app. Great to port existing Web Apps to Azure, this are great news, when there are so many projects that start like a web application and when you are ready to deploy, you decide to go to the cloud instead of hosting it in a “classic” way.
Debugging for Azure creates 2 instances in your computer. I can see that Microsoft is providing all the tools for developers besides allowing it to run on the cloud for limited IPs for free.
Background roles to run without UI for processing data is everything we always need in a web application, the database to create reports, for example, always needed a background process. This is the way to do it in the cloud.
The publish process is easier and can be done in TFS as well to let the team keep building and testing without the overhead of deployment and configuration. A real agile approached here, I see a lot of companies adoption Azure for dynamic development.
Storage with Azure is for safe and massive amount of data with NOSQL, drag and drop files to the web. The presentation from Mr. Guthrie didn’t answer the question: Can it also work in SQL 2008 Compact files?
Cheers
Al
718bc4d4-14a5-4744-82b9-56aff4e15384|0|.0
Tags: iOS, Cocoa |
Categories: Blog
Posted by
al on
8/29/2011 4:23 PM |
Comments (0)
A website that people creating controls for the iOS can share as Open Source libraries. Those Custom UI Component Database for iOS and Mac OS X are now at your finger tips to create more exciting applications
You can find the controls here http://cocoacontrols.com/platforms/ios/controls
My favorites :

WhirlyGlobe is an interactive 3D globe toolkit for ios. It handles the rendering and data manipulation side and strives to maintain a constant frame rate. It's pretty and it's quite good. It can be used to display a few data points on the earth or as a center piece for an earth based app.
Read more…

Basic PDF reader/viewer code for iOS developers struggling with wrangling PDF files onto iOS device screens.
Read more…

A collapsible toolbar that is affixed to one of the four corners of the screen.
Read more…

DCRoundSwitch is designed to be a drop in replacement for UISwitch. It is styled 'modern' so will unify the look of your apps into the future whilst retaining backwards capability. Drawing is done in CoreGraphics so no images are required.
Read more…

MKTickerView is a drop-in replacement for a horizontal stock ticker kind-of control. Infinite scrolling, and wraps around automatically when the last item is hit. Butter smooth scrolling.
Read more…

A pie menu implementation specially designed for iPhone and iPod touch
Read more…

Cocoa/UIKit view to display text like light-up bulbs on a sports scoreboard.
Read more…

Dashboard-style gauges for iOS.
Read more…

An iOS library for displaying tiled maps with support for custom tile providers.
Read more…

An open-source version of iPhone's native Messages app.
Read more…

CoolButtons is a subclass of UIButton that draws glassy iOS style buttons, all using CoreGraphics and no images.
Read more…

Draw line charts and pie charts in iOS.
Read more
711dd437-67b4-47d3-8079-6584bd498342|0|.0
To the Apple Board of Directors and the Apple Community:
I have always said if there ever came a day when I could no longer meet my duties and expectations as Apple’s CEO, I would be the first to let you know. Unfortunately, that day has come.
I hereby resign as CEO of Apple. I would like to serve, if the Board sees fit, as Chairman of the Board, director and Apple employee.
As far as my successor goes, I strongly recommend that we execute our succession plan and name Tim Cook as CEO of Apple.
I believe Apple’s brightest and most innovative days are ahead of it. And I look forward to watching and contributing to its success in a new role.
I have made some of the best friends of my life at Apple, and I thank you all for the many years of being able to work alongside you.
Steve
925cc440-14b6-4548-b842-10a51f2eaadc|0|.0
Tags: Esri |
Categories: Blog
Posted by
al on
7/22/2011 7:28 PM |
Comments (0)
Save the date October 26-28 in Madrid.
For three days, in one place, you can get the latest in GIS and connect with Esri staff and partners. Register now to join your fellow GIS professionals
d6e64e86-f5bf-4d2c-8776-dd6d4a7f450d|0|.0
Keep having this problem when compiling COM in 32 bits applications that target .NET 4. This is the article that takes care of the issue and you’ll have to run it in each machine
1. Close all instances of Visual Studio.
2. From the Visual Studio Tools subfolder, open an elevated “Visual Studio Command Prompt (2010)” (using “Run as administrator” option). Change directory to "<system_drive>:\Program Files (x86)\Microsoft SDKs\Windows\v<x.xx>\bin\”.
3. Issue the command :
corflags /32bit+ ResGen.exe /force
4. Open <project_name>.csproj in notepad.
5. Add the following property <ResGenToolArchitecture>Managed32Bit</ResGenToolArchitecture> under the PropertyGroup section. Save and close the csproj file.
More info here
Cheers
Al
67f23c35-ba12-4e1c-b082-e553bd099295|0|.0
Tags: VS2010 |
Categories: Blog
Posted by
al on
6/16/2011 7:50 PM |
Comments (0)
With Visual Studio coming out with out of band updates, Service Packs, platform support and Web Standards Updates including support for HTML 5 and CSS3 is really hard to keep your development machine up to date. Now when NuGet and other tools can be installed on your IDE we just find it more complicated.
There are ways to keep developers for having to fetch each update, there is a magic button of love on the web that will update all the needed items in VS2010. That button is mislabeled in my modest opinion, and hopefully that button will be called “The Magic Button of Love” if Microsoft is listening. Right now says “Install Visual Studio Express” and that’s kind of correct, yet if you have VS2010 already, will just install SP1 with all updates.
So, keep your development current by clicking at it:
![clip_image002[4] clip_image002[4]](http://alpascual.com/image.axd?picture=clip_image002%5B4%5D.png)
Magic button that installs everything can be found here: http://www.asp.net/mvc
The HTML 5 and CSS3 Support for Visual Studio 2010 (aka Web Standards Update)
http://visualstudiogallery.msdn.microsoft.com/a15c3ce9-f58f-42b7-8668-53f6cdc2cd83
b8c71215-c530-40fb-a0b1-fa6f54f7e1f1|2|3.0
Tags: Twitter, iOS |
Categories: Blog
Posted by
al on
6/15/2011 7:34 PM |
Comments (0)
Twitter sends you notification for everything, when people start following you and when they reply to your tweet, even when they add one of your tweets into the favorites list. The only notification you don’t get so far is when a user stops unfollowing you.
Wouldn’t you like to know when people dislike your opinion so much that you start losing lots of twitter users? Building followers is not an easy task, realizing what people finds boring and what is good content, is an art in the twitter world. The iPhone and IPad application is another tool for you to find out how good are you doing in the micro blog sphere. Learning each twitter user unfollower can be great information.
You can download the iPhone/iPad app here:
http://itunes.apple.com/us/app/unfollowers/id438011083?mt=8
Any feedback is appreciated
Cheers
Al
4f5490f4-19d8-4c0d-bb78-cfa10e13acf6|0|.0
For JavaScript and CSS3 to access your website resources without having to post using proxies, CSS3 is now here to help. On your web application add on your web.config under system.webServer and all response to javascript will include that letting JavaScript know that is ok to post without the limitation and without using a proxy.
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
</customHeaders>
</httpProtocol>
</system.webServer>
In ArcGIS 10 you can enable that by adding it to the web.config found at c:\inetpub\wwwroot\ArcGIS\rest\web.config
Hope this helps
Cheers
Al
acdef606-a766-4bea-b260-d6fc1ece8d28|0|.0
Having some issues deploying applications with ASP.NET MVC 3 and Entity Framework Code First using Microsoft SQL Server Compact Edition, even after I have installed on the server Microsoft SQL Server Compact Edition and Express.
Deploying ASP.NET MVC 3 with Entity Framework Code First you may have a few issues when deploying into a computer with only .NET 4 installed, I have to install MVC 3 dlls and Entity Framework CF to use the Compact Database.
This is the error you may get if you do not copy all the dlls.
[ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed.]
System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) +160
System.Data.Entity.Infrastructure.SqlCeConnectionFactory.CreateConnection(String nameOrConnectionString) +168
System.Data.Entity.Internal.LazyInternalConnection.Initialize() +158
System.Data.Entity.Internal.LazyInternalConnection.get_ConnectionHasModel() +10
System.Data.Entity.Internal.LazyInternalContext.InitializeContext() +265
System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +17
System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() +62
System.Data.Entity.Internal.Linq.InternalSet`1.GetEnumerator() +15
System.Data.Entity.Infrastructure.DbQuery`1.System.Collections.Generic.IEnumerable<TRes
Steps to fix the problem
You need System.Data.SqlServerCe.dll make sure in the properties you enable the local copy.
Add the provider to your web.config
<system.data> <DbProviderFactories> <remove invariant="System.Data.SqlServerCe.4.0" /> <add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /> </DbProviderFactories> </system.data>
Then you going to get this error, yet not to worry.
Unable to load the native components of SQL Server Compact corresponding to the ADO.NET provider of version 8482. Install the correct version of SQL Server Compact. Refer to KB article 974247 for more details.
Now you should reference the dll System.Data.SqlServerCe.Entity.dll located in a private directory
C:\Program Files (x86)\Microsoft SQL Server Compact Edition\v4.0\Private
Make sure you set the flag in the properties to copy it local, so gets deploy with all the dlls to the server that may not have that dll.
You may also get the error: Could not load file or assembly 'System.Data.SqlServerCe.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Still not having any success is running ASP.NET MVC 3 with Microsoft SQL Server Compact Edition
Cheers
Al
caab6518-2971-4090-bcba-eaba817f8f8d|0|.0