Al Pascual


Geo RSS
Geo Twitter Timeline

Blogs I read

<May 2008>
SunMonTueWedThuFriSat
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567
Lost every subscriber today!!

image

I left my feeds to Feed Burner as I was getting more people using my RSS feed lately to find out that after a few days FeedBurner started returning this error.

I removed Feed Burner, sorry to all subscribers that received this error, and thanks the ones that email me about it, I hope that you all come back. You can subscribe here

Cheers

Al

Posted: May 15 2008, 01:43 AM by albert | with no comments
Filed under:
Pascual version 3.0 got released today at 6:58 AM!

Ryan Michelle Pascual was born this morning at 6:58 AM after long ours. She surprised us all by weighing in at 5 pounds 3 ounces at 17 inches. Her cord was around her neck yet she's still breathing on her own. No NICU for Ryan as we thought as she was not getting bigger since week 33.

Thanks for all your support and emails.

Cheers

Pascual Family

Installing Visual Studio 2008 SP1 Beta.

Finally Scott Guthrie released the news, was waiting to post my review.

Friday night I installed Visual Studio 2008 SP1 (Beta) on my wife's computer and was pretty smooth. I looking to fix the issue on VS2008 and Vista that many of us is experiencing, the (Not Responding) label once in a while when you try to switch from code to designer.

A quick read into the feed roll you’ll find at least 20 posts linking ScottGu about the VS2008 SP1 Beta, however I don’t see many people installing it. Are people a little put off by the huge set of instructions to install the Service Pack? Are we waiting for others to let us know is ok?  

Downloads
VS 2008 SP1 : http://download.microsoft.com/download/7/3/8/7382EA08-4DD6-4134-9B92-8585A5B07973/VS90sp1-KB945140-ENU.exe 

Also 3.5 need a new service pack
.NET 3.5 SP1 : http://download.microsoft.com/download/8/f/c/8fc1fe13-55de-4bf5-b43e-375daf01452e/dotNetFx35setup.exe
Express 2008 with SP1:
http://download.microsoft.com/download/F/E/7/FE754BA4-140B-413C-933F-8D35FB150F12/vbsetup.exe
http://download.microsoft.com/download/F/E/7/FE754BA4-140B-413C-933F-8D35FB150F12/vcsetup.exe
http://download.microsoft.com/download/F/E/7/FE754BA4-140B-413C-933F-8D35FB150F12/vcssetup.exe
http://download.microsoft.com/download/F/E/7/FE754BA4-140B-413C-933F-8D35FB150F12/vnssetup.exe
TFS 2008 SP1: http://download.microsoft.com/download/a/e/2/ae2eb0ff-e687-4221-9c3e-9165a942bc1c/TFS90sp1-KB949786.exe

 

Some issues you may encounter on the way.

Make sure you install VS2008 SP1 before Framework 3.5 SP1.

Installation of Visual Studio 2008 SP1 Beta fails when .NET Framework 3.5 Client Beta 1 is already installed on the computer.

To resolve this issue:

  1. Open Add or Remove Programs.
  2. Uninstall "Microsoft .NET Framework 3.5 Client Beta 1".
  3. Uninstall "Microsoft .NET Framework 3.0 Client Beta 1".
  4. Uninstall "Microsoft .NET Framework 2.0 Client Beta".

 

Visual Studio 2008 SP1 cannot be installed when SilverLight Tools is installed on the computer.

Visual Studio 2008 SP1 Beta cannot be installed if Silverlight Tools is already installed. The following message will appear if you attempt to install:
Microsoft Visual Studio 2008 SP1 (Beta) does not apply, or is blocked by another condition on your system. Please click the link below for more details.
If you want to install Visual Studio 2008 SP1, you must first uninstall Silverlight Tools.

To resolve this issue:

For Vista or later:

  1. Open Add or Remove Programs.
  2. Uninstall Silverlight Tools Beta for Visual Studio 2008.
  3. Click 'View installed updates' in the task bar on the left.
  4. Remove KB949325 (listed under the version of Visual Studio 2008).

 

Astoria comes out with SP1

Pablo Castro released the news: The ADO.NET Data Services Framework (Astoria) and the ADO.NET Entity Framework will be shipping as part of .NET 3.5 SP1

 

ASP.NET MVC and SP1 Beta

Phil Haack explains how SP1 will affect the MVC preview 2, no affect if you are running Preview 3. In another words, if you can upgrade your MVC before installing SP1 Beta.  NET 3.5 SP1 Beta and Its Effect on MVC 

 

Related Links

Problems installing VS2008 Service Pack 1 with Silverlight

Brad Abrams Tutorial to install Service Pack 1

ScottGu's post about VS 2008 Service Pack 1

Visual Studio 2008 and .NET FX 3.5 SP1 Beta available now

VS2008 and .Net 3.5 SP1 Beta - Should You Fear This Release?

 

Cheers

Al

Follow me at GeoTwitter | Check Geo Twitter

Posted: May 12 2008, 04:07 PM by albert | with no comments
Filed under: ,
I got my invitation for Microsoft Mesh.

 

This is great, I love new technology as the next geek. I love when I receive invitations after being in the waiting list for a while on Beta web applications, they cannot harm your computer if they are web apps. So let’s sign for as many as we can. I feel like many applications they are still on beta, is Google still on beta testing?

So I accepted my invitation to the Mesh, as if you send it to me I’ll accept them all. I love the concept of mesh.com. You can set up all your devices to share a unique storage and make it easier to share it between all your computers and mobile devices.

I personally believe the application is great for families, or groups of people that need to share information. Storing it into the Mesh allows you to have a folder in sync in any computer you go to. So my mobile device, my work computer, home computer, wife’s computer and kids computer have a folder with all the data that we need every day.

After saying that, let’s check the beta application. I went ahead to install the desktop application in one of my computers. An error occurred and a dialog box appeared:

image 

So I cannot install in any of my Vista computers as I always run the user with an elevated administration. Great I won’t be able to use Mesh, so my dreams about being one instead of 5 is gone. I’ll have to keep sending all files back and forward by email still until Microsoft fixes the problem.

Cheers

Al

Posted from http://weblogs.asp.net/albertpascual

Posted: May 11 2008, 11:41 PM by albert | with no comments
Filed under: ,
GeoTwitter Alpha 0.2 release

I would like to say that if Google can call their mail Beta for 2 years I can start releasing Alpha software, correct? To follow with the GeoTwitter series, I have release Alpha 0.2.

Alpha 0.2 is a complete application with all bugs clean and tested, so you are safe to install it and play with it, now is when the fun begins to add all the feature, including the ones in the previous post, we identify a new ones. You can download the release and the source code at codeplex.

New Features

  • Add support for people to add their location without using a map, for other clients like twitter that don't have a map to click.
  • New iPhone support
  • Find people around you. 

These are the features that need to be added:

  • Load each persons image into the map ,right now is just to input your position.
  • Add the option to follow people like Twitter.
  • Add user profiles.
  • Change look and feel, right now looks just like MVC, as I borrowed that css and master page.
  • History per user on their geo location, so you can see their routes. Good for stalking? ;-)
  • Ping user, like twitter.
  • Reply to user, like Twitter
  • Mobile viewer for iPhone and other mobile users.
  • Desktop task bar application to track your changes and locations.
  • IP based location.
  • Mobile device GPS location to geotwitter.

To stayed up to date about GeoTwitter you can subscribe to my rss feed or follow me at twitter

Cheers

Al

Posted from http://weblogs.asp.net/albertpascual

Posted: May 11 2008, 02:31 PM by albert | with no comments
Filed under: , ,
Don't wait for your Page_Load to finish if you don't have to.

I spent many times answering this question at http://forums.asp.net , so I thought to put in a post the answer, so I can do a simple link.

How to spoon a thread on the Page_Load so you don't have to wait for the page load rendering controls.

Note: This is not for any control, this is for things like writing to a Log file or to a database. You won't be able to do anything where you need the server context.

Add the code on the Page_Load to fire the method LogSomething in the background:

protected void Page_Load(object sender, EventArgs e) 
    { 
        if (Page.IsPostBack == false) 
        { 
            MyDelegate myDelegate = new MyDelegate(LogSomething); 
            MyFireAndForget(myDelegate); 
        } 
    }

 

define the internal class with the delegate information:

class Info 
        { 
            internal Info(Delegate d, object[] args) 
            { 
                Tar = d; 
                Args = args; 
            } 

            internal readonly Delegate Tar; 
            internal readonly object[] Args; 
        }

private static WaitCallback dynamicInvokeShim = new WaitCallback(DynamicInvokeShim); 

        public static void MyFireAndForget(Delegate d, params object[] args) 
        { 
            ThreadPool.QueueUserWorkItem(dynamicInvokeShim, new Info(d, args)); 
        } 

        static void DynamicInvokeShim(object o) 
        { 
            try 
            { 
                Info ti = (Info)o; 
                ti.Target.DynamicInvoke(ti.Args); 
            } 
            catch (Exception ex) 
            { 
                // Only use Trace as is Thread safe 
                System.Diagnostics.Trace.WriteLine(ex.ToString()); 
            } 
        }

That easy. Please follow me at Twitter or check GeoTwitter today.

Cheers

Al

Posted from http://weblogs.asp.net/albertpascual

Posted: May 07 2008, 11:31 PM by albert | with no comments
Filed under: , , ,
iPhone 3G is coming out in June for $199

You got your iPhone and now the iPhone 3G is coming out with a faster data plan. Would you wait again to get one? Took me 6 months after the release of the iPhone to get one, you can read why on the iPhone series. I had to break the contract with Verizon Wireless without having to pay the penalty. The iPhone is being very good to me. It’s like an army knife, you can use it for many things all embedded into one little device.

I have been missing the way to stream video from the iPhone or even record video, right now I can only do good quality pictures. The iPhone 3G will solve this problem I believe.

The iPhone 3G is coming to an Apple Store near you this summer, will it be only $199? News here

Robert Scoble will wait again on the overnight line? Would you join him?

Cheers

Al

GeoTwitter found a permanent home and got already feedback

Finally I found a permanent home for geoTwitter where you can check out the Alpha 0.1 and of course follow me at Twitter. To stay up to date with GeoTwitter news subscribe to the feed.

GeoTwitter is being hosted by Hostingfest, a extremely cheap yet good hoster. I can't believe they are still there.

GeoTwitter is open source and the project can be found here.

I have received already quite a lot of feedback, even bad feedback was actually good for me. Just to answer your questions:

  • The GeoRSS feed will allow you to use any map viewer, supporting GeoRSS to see where are your friends. You can use Google Maps and copy and paste the url provided by GeoTwitter
  • I added the What are you doing and where are you questions on the main screen.
  • Login may be slow when twitter login is slow. We just pipe into their login.
  • Look and feel is still horrible. I know and I'll get somebody to do a better job than me.
  • Hyperlinks on messages cannot be click. Thanks I'll fix that.
  • How can I attached it to SQL 2005? I'll upload the script to create the 2 tables need it. As we use twitters database we only store people's locations and a simple log.

I would recommend you to download the source code from CodePlex and improve it yourself, you can always check in the code.

Thanks for the feedback.

Cheers

Al

Posted from http://weblogs.asp.net/albertpascual

GeoTwitter.Net is alive as an open source project.

This post is part of a series about GeoTwitter and GeoRSS.

I was in my spare time developing a proof of concept called GeoTwitter, after gathering all requirements I decide it to make the project open source, this way other people can help me finishing it as well as other developers can benefit of the work I've done. I'm looking for a hoster right now to add the latest of GeoTwitter so if you go to the website http://geotwitter.net and does not work, means that I am between moving it again. Because is an open source I want to deploy it with SQL Express so the developer can move it into SQL 2005 or any other database. Not many hosters support SQL Express. As well I already spend my allowance this year in gadgets and a new computer. WAF (Wife approval factor) is very low right now on the household.

I added all source code at codeplex, if you like to help, please send me an email, comment, etc ... many ways to contact me. You can sign in at this link as well: GeoTwitter open source project

You can see the position of your friends using any viewer in GeoRSS

I believe to give to the community, an open source projects is a great way to share knowledge and learn from other developers. I have been involved with other open source projects where I've learned and improve the way I write code. Well, maybe GeoTwitter does not show any of the skills I've learned ;-) I was in a rush to get something working.

These are the features that need to be added:

  • Load each persons image into the map ,right now is just to input your position.
  • Add the option to follow people like Twitter.
  • Add user profiles.
  • Change look and feel, right now looks just like MVC, as I borrowed that css and master page.
  • History per user on their geo location, so you can see their routes. Good for stalking? ;-)
  • Ping user, like twitter.
  • Reply to user, like Twitter
  • Mobile viewer for iPhone and other mobile users.
  • Desktop task bar application to track your changes and locations.
  • IP based location.
  • Mobile device GPS location to geotwitter.

To stayed up to date about GeoTwitter you can subscribe to my rss feed or follow me at twitter

Other related links.

Adding GeoRSS to GeoTwitter

GeoTwitter look and feel.

Getting GeoTwitter into shape

Cheers

Al

Posted from http://weblogs.asp.net/albertpascual

Why there is still a limitation in LINQ to SQL?

LINQ to SQL was going to be the solution that all developers have been asking for to be able to use databases. Now developers would be able to interact with a database using C# and SQL language together and get intellisense to their tables. This for a second how bad was to create your store procedures and then call them outside from C# to see if they were working. Separating the business layer and the database layer was a long job at every project.

DataAdapters are here!

Along came the dataAdapters to give you a hand and providing a way to generate code from your database. I do believe that dataAdapters were the right direction and the the beginning of Dynamic Data (LINQ to SQL) At .NET 2.0 many people started using dataAdapters and creating their own queries. Problem at the time that many people left as feedback to Microsoft, was the problem in being disconnected from the database after dropping the fields on the dataAdapter.

The new generation comes to life.

Last year a “ScottGu” blog releases the news and the main features of the project ASP.NET Dynamic Data and LINQ to SQL, a new object relation mapper that will support transactions, views and stored procedures. With all the features we were expecting an automatic refresh against the schema of the database. As databases changes happen more often that we would like to, should be a way to refresh the entry to the LINQ to SQL object map. I have wrongly assumed that feature to be included.

When I read back in March 2007 the MSDN article about LINQ to SQL "Your application is free to manipulate the objects while LINQ to SQL stays in the background tracking your changes automatically" I thought that LINQ to SQL will sync the changes for me. I misunderstood that statement. I believe now that was talking about transactions with the LINQ method SubmitChanges();

LINQ to SQL will track the changes to the dataset and then you can apply only the deltas back to the database.

But wait, there is more.

LINQ to SQL also provides Take() like SQL TOP x and Skip() to be able to skip rows on the selection as well as many methods in .NET that can be applied back to the database.

What other solutions are there?

To get a synchronized data layer now we need to start looking outside the solution provided by Microsoft. There are other solutions out there like LINQ to SQL with refresh? 

 

Related Posts

LINQ to SQL series

Scott Guthrie LINQ to SQL series

MSDN LINQ to SQL

Cheers

Al

Adding GeoRSS to GeoTwitter

As many of you know, at least the 2 people that read my blog. I am writing a new web application called geotwitter for fun. Link to the series

In a few words, provides a geo location to you updates in twitter. There are many features that are not implemented in GeoTwitter that other applications have.

Tonight I implemented GeoRSS, for more information you can read about my GeoRSS posts here. GeoRSS will allow you to export all the people and analyze them with any map viewer.

For the people that asked me when is GeoTwitter opening, I may add that is far from finished. I may next week put the alpha version at http://geotwitter.net for people to submit feedback and request features.

image

GeoRSS looks like RSS with geospatial information.

image

You can look at the location of any twitter.

image

Cheers

Al

Posted from http://weblogs.asp.net/albertpascual

Using LINQ to SQL makes life easier. An introduction of LINQ to SQL.

LINQ to SQL came out with 3.5 and I am still amazed that many people accomplished to stay away from that simple technology. When you ask them, they've heard about but they are not sure how everything works together. Instead of looking it up to learn to see if there is something that may improve their development, they just ignore it.

If you work in software, its your job to keep yourself on the loop for new technologies and languages coming out. Don't need to download everything from Codeplex and play with it, but you should include in your technical book reading a blog/news reading. Of course I keep broadcasting to everybody that hasn't turn me off by now, to subscribe to Community Blogs in ASP.NET and of course ScottGu's blog.

I've included in my interviews to ask a simple question, if you are applying for a ASP.NET job. Do you know who is Scott Guthrie? You'll be amazed how many "ASP.NET developers" don't even know the name. Shocking!

Wanted to show you how to select something from a database and insert a row. For the exercise will use a simple table with a latitude, longitude and ID. If you have used previously dataAdapters aka DataSets in ASP.NET 2.0 you'll find LINQ to SQL familiar. Create a new Item and select LINQ to SQL, drag and drop all the tables you want.

Note: If you modify the table, the LINQ to SQL won't refresh, you'll have to delete and drag and drop again.

image

Select statement you'll find that LINQ provides you with from, where and select out of the box, so you can interrogate the table.

image

Select statement returning strong type. You'll find the => new in 3.5 for LINQ.

image

Insert a new row, make sure you got a primary key in each table you are trying to update. The syntax is familiar if you have been using DataSets/DataTable/DataRow

image

This is as simple as it goes to Select and Insert into a table using LINQ. I would recommend to run this very simple exercise for yourself. Grab an existing database, create a ASP.NET app and generate the LINQ to SQL for the database. Then try to select and insert using this simple example.

We learned by doing things and practicing. After that you'll need to figure it how to update in LINQ to SQL. I bet that after you do that, you'll start writing all your projects with a Database layer using LINQ to SQL.

Cheers

Al

Posted from http://weblogs.asp.net/albertpascual
How to fix Sys.WebForms.PageRequestManagerParserErrorException in AJAX 1.0

Last year I wrote a fix for AJAX 1.0 on my old blog, looks like many people found it helpful, I wanted to make sure people understood that issue only happened with ASP.NET AJAX 1.0. I cannot reproduce the same problem with AJAX 3.5.

You will encounter this issue when mixing callbacks and postbacks, as callbacks do not use Response.Write and there is not complete Requests to the server.

This is a bug on the MS ASP.NET 2.0 AJAX 1.0, is not that you are doing something wrong, the framework cannot handle the request validation and the exception is thrown. I found that you can catch the exception using the Script manager; information about it here: http://alpascual.com/blog/al/archive/2007/03/26/Code-Snip-_2200_Customizing-ScriptManager_2200_-to-detect-errors.aspx

Or better yet, you can disable the error by disabling the request validation. On top of the webform add: enableEventValidation="false"

UPDATE: setting enableEventValidation does not fix the problem in all the cases. The problem can be cause with a timer in your application as well.

Cheers

Al

Read it here

NTM: How to send email using Exchange in ASP.NET

I always forget how to send emails using exchange, so I thought to put it on a post for me to find it when I need it.

<system.net>

<mailSettings>

<smtp>

<network host="exchangeServer" username=userName@mydomain.com password="password" />

</smtp> </mailSettings>

</system.net>

Cheers

Al

How to create an Http Handle to re write the URL

This question keeps coming back to the ASP.NET forums, people wanting to write an Http Handler to re write the url. This is a common use in blogs and forums, when people wants to redirect from URL /blog/1093/post.aspx to /blog/post.aspx?id=1093 however keep the previous displayed for better url usage.

  • Create a class on the project and inherit from IHttpHandler

public class MyHandler : IHttpHandler

  • Right click the IHttpHander and select "Implement Interface" to create the method ProcessRequest and the property IsReusable.

#region IHttpHandler Members

public bool IsReusable
{
     get { return true; }
}

public void ProcessRequest(HttpContext context)
{
}

#endregion

The property will tell if can be reuse or create a complete new instance per request. By default is false to create a new instance per request.

PrecessRequest is where the guts are.

Server.Transfer("post.aspx?id=" + context.Request.Url.Segments[2]);

The last step is to register the HttpHandler on the web.config

<httpHandlers>
            <add verb="GET" path="post.aspx" type="yourNamespace.app_code.myhandler"/>

</httpHandlers>

Now all requests to post.aspx page will be handled by the httphadler, you'll still need to create a page that receives the parameters id or any other you need or a class instead of a page to handler your request. Remember to pass the http context.

Hopefully now I can answer with this post the Http Handler 101 question.

Cheers

Al

Posted from http://weblogs.asp.net/albertpascual

Posted: Apr 22 2008, 06:25 AM by albert | with 1 comment(s)
Filed under: , , ,
More Posts Next page »