Main Page | Photo Gallery | Turkish Blog | Delete Language Cookie  RSS 2.0 Atom 1.0 CDF  
Daron Yöndem
a developers draft...
 Wednesday, March 05, 2008

Just a rush! Again my Turkish blog is ruining the English one. I'm mostly spending all my time blogging in Turkish and yes, that's an excuse for all of you :( Actually I got some really cool content waiting for an urgent translation but for the moment I’m working hard on my ASP.NET 3.5 AJAX book. No, that’s not all, ordinary projects and development work is on a steady rush too.

Hey! Got some fresh news for you :)

I guess most of you already know about the INETA (Internation .NET Assocation). I was already contributing about 3 different INETA User Groups and leading one of them in Turkey. Now I’m the Turkey Lead of INETA. We did our first event in Cyprus, Easter Mediterranean University. From now on I will be more aggressive about .NET community events ;)

Wednesday, March 05, 2008 5:24:23 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]    | 
 Tuesday, March 04, 2008

I did present a lot of Silverlight training for Microsoft Turkey in the past 4 months. Those are all partner trainings. One of them was build on top of the Students2Business program. I had like 15 students selected by Microsoft from all over Turkey. The training was a pack of fun for me.

Today I have an incredible mail from one of my students; Ozgur Arman. He did a fascinating job and build a Silverlight 1.0 game! Not SL 1.1 or 2.0! Be carefull! I said 1.0, this means he did all the nasty work with JavaScript.

You can visit the web page and see the game online at the address below. Great work Ozgur!

http://www.ozgurarman.we.bs/SoloTest_4_0/index.html

Tuesday, March 04, 2008 5:32:28 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Silverlight  | 
 Saturday, February 16, 2008

I would like to introduce you a great open source project called Slide.Show. Slide.Show is an easy to use and “to install” tool providing very rich slideshow and photo gallery features. You can download the Silverlight 1.0 project source files from the address below and dig into it.

http://www.codeplex.com/SlideShow

I just downloaded my copy, made some very little modifications and here I got my photo gallery in my blog :) A long time dream comes true ;) Hope I will have more free time to add some of my custom “non-IT” shots as well.

Saturday, February 16, 2008 5:13:10 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Silverlight  | 
 Saturday, January 26, 2008

For the last three days we were in total “light” :) I hosted a 3 days Silverlight Training for Microsoft Turkey, Students 2 Bussiness Program. The audience was full of .NET developers including many MSPs from Turkey. One of the most passionate MSPs, the MSP Lead Murat Duman caught me in a break with an anonymous cameraman :) Click here to watch the spare shot ;)

Saturday, January 26, 2008 6:55:43 PM (GMT Standard Time, UTC+00:00)  #    Comments [5]   Expression Blend | Silverlight  | 
 Saturday, December 29, 2007

Following a successful Silverlight Seminar at Eastern Mediterranean University in Cyprus yesterday I hosted an Expression Studio seminar with full of WPF demos. The code-behind coding logic, 3D animations were some of the most attractive parts of the seminar. Again I had a great time answering imaginative questions :) about WPF and memory management. Thanks to all the attendees.

You can download the presentation slides below.

Expression Studio Seminar Slides - 28122007_2.pdf (2,72 MB)

Again I would like to thank to Arif Görkem Güngör from EMU ACM group and all the ACM members for their great effort in organizing the event and handling all the logistic support. Here is another shot of a happy ending.

Eastern Mediterranean University Expression Studio Seminar
Eastern Mediterranean University Expression Studio Seminar

Saturday, December 29, 2007 10:13:34 AM (GMT Standard Time, UTC+00:00)  #    Comments [2]   Expression Blend | Expression Design | Expression Encoder | Expression Studio | Seminar | Expression Web | Expression Media  | 
 Friday, December 28, 2007

Yesterday we had an amazing day at Eastern Mediterranean University in Northern Cyprus. I hosted a 3 hours Silverlight seminer with lots of real-life examples including manufactured products in Turkey. The reactions were really very cool and indeed right; “So we don’t need to learn ActionScript? This is great!”. Oh yeah it’s really great! In addition, Silverlight 2.0 demos with Visual Studio 2008 integration really rocks! I love to host such successful technologies.

You can download the slides below.

Silverlight Seminar Slides - 27122007_2.pdf (1,3 MB)

Finally, here is a photo taken at the end of the seminar. Thanks to you folks, I had a great time. Especially thanks to Arif Görkem Güngör from EMU ACM group. He did a wonderful job in organizing the event.

Eastern Mediterranean University Silverlight Seminar
Eastern Mediterranean University Silverlight Seminar

Friday, December 28, 2007 10:08:01 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Expression Blend | Expression Design | Expression Studio | Seminar | Silverlight  | 
 Saturday, December 22, 2007

Below you will see the link of a greetings card :) Really very nice video for Silverlight minded geeks like me :D

http://mason-zimbler.com/festivegreetings/

Saturday, December 22, 2007 6:32:17 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Silverlight  | 
 Friday, December 21, 2007

I didn't have the time to blog for a while but I did some good job on "spreading the word Silverlight" :) I talked in 3different academic seminars at Istanbul University, Istanbul Technical University and Galatasaray University in Istanbul. Of course the subject was “Silverlight” :)

The audience was pretty big and interested in RIA development. Students were mostly shocked and had a hard time to believe that Silverlight works on any kind of server operating system, basically it works on client side so it doesn’t matter what you have on server. Thanks to all the people attended my talks and here are some photos from the events.

Istanbul Technical University Silverlight Seminar
Istanbul Technical University Silverlight Seminar

Istanbul University Silverlight Seminar
Istanbul University Silverlight Seminar

Friday, December 21, 2007 9:30:13 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Seminar | Silverlight  | 
 Thursday, December 20, 2007

With the launch of Visual Studio 2008 RTM version we are all experiencing the Multi-Targeting feature of the new IDE. The little problem on the ASP.NET development side is that AJAX Extensions are integrated to ASP.NET 3.5 and we don’t have such a choice for ASP.NET 2.0 which we already had in Visual Studio 2005 with AJAX Extension 1.0. Actually there is no problem developing further an ASP.NET 2.0 AJAX Extension 1.0 application on Visual Studio 2008 which is build with Visual Studio 2005 but what if you want to create new ASP.NET 2.0 AJAX Enabled Web Sites?

Here goes the solution: Microsoft ASP.NET 2.0 AJAX Templates for Visual Studio 2008

http://www.microsoft.com/downloads/details.aspx?FamilyID=5c7df430-1c34-40d2-b6ec-81353b5fcf2e&displaylang=en

Download the package from the address above and after having it installed on your PC you will get your “File / New Web Site” menu targeted to .NET Framework 2.0 having a new choice named “AJAX 1.0 Enabled ASP.NET 2.0 Web Site”.

AJAX 1.0 Enabled ASP.NET 2.0 Web Site Project Template in Visual Studio 2008
AJAX 1.0 Enabled ASP.NET 2.0 Web Site Project Template in Visual Studio 2008

Hope it helps.

Thursday, December 20, 2007 9:45:50 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   AJAX | Visual Studio 2008  | 
 Tuesday, November 27, 2007

For the last 4 days I was in Cairo, Egypt for a special Expression Studio training at Microsoft Egypt served to Egyptian Department of Education. We had a total of 24 hours of training, however when the subject is Expression Studio it’s never enough :) Like in all the Expression trainings the attendees were shocked when they saw how easy it is to animate 3D objects in WPF with Expression Blend. We had a lot of web designers in the audience. So they appreciated all the work done over FrontPage and the nice integration of Expression Web with ASP.NET

Expression Studio Training in Cairo, Egypt
Expression Studio Training in Cairo, Egypt

Unfortunately I didn’t have the time to travel around and visit some touristic places during the day. But I was able to attend a lightshow on the pyramids at my second night after the training. So here I'm sharing with you what I got with my pocket camera :)

The Pyramids, Cairo, Egypt
The Pyramids, Cairo, Egypt

The Sphinx, Cairo, Egypt
The Sphinx, Cairo, Egypt

Thanks to all the attendees for their interest in Expression Studio and special thanks to Mohamed Wahby from Microsoft Egypt and all the Microsoft stuff :) They did a good job and took care of me :) Finally I would like to thank to my friends from New Horizon, Cairo. They really helped me a lot with their support.

Tuesday, November 27, 2007 8:13:41 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Expression Studio | Trainings  | 
 Monday, November 19, 2007

OMG :) Visual Studio 2008 and .net Framework 3.5 RELEASED. Go ahead and grap your Express Edition as soon as possible. Here is the link;

http://www.microsoft.com/express/

If you are looking for other versions of Visual Studio 2008 like the Team Edition you can navigate to the address below and download the 90-day trials.

http://msdn2.microsoft.com/en-us/vstudio/products/aa700831.aspx

This will be a lot of fun before Christmas :) (See what I'm comparing?:))

Monday, November 19, 2007 6:57:46 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Visual Studio 2008  | 
 Sunday, November 18, 2007

After our first “Silverlight and Expression Studio” training at Microsoft Turkey I just completed another Silverlight training with Koç Allianz, Turkey. At the end of many enjoyable moments with full of Beta and Alpha software challenges we did manage to build a deployable Silverlight 1.0 demo. You can visit the the web page at the address below.

http://daron.yondem.com/samples/kocallianz/default.htm

Of course the video sharing application above has many features missing. Actually it’s what we were able to finish in a short period of time at the end of the training. The application itself is getting video file data from SQL 2005 with ASP.NET AJAX PageMethods and populating the needed menu and tooltips. We divided our class to two separated groups of “designers” and “coders”. While designers used Expression Design and Blend 2, coders were writing the data layers of AJAX application and JavaScript files in Visual Studio 2005 and 2008. Finally as the “lead developer” (equals to trainer) I did the dirty work and put them all together. Below you can download the source code.

Silverlight Video Sharing Application Source Code - 18112007_2.rar (404,13 KB)

P.S.: Sorry for all the Turkish variable names. It’s the demo source code written in classroom.

Sunday, November 18, 2007 12:05:20 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Expression Studio | Silverlight  | 
 Saturday, November 17, 2007

Each day and hour we are getting closer to Visual Studio 2008 RTM and here is another proof; the Visual Basic 2008 and Visual C# 2008 keybinding posters are ready. You can download them from the addresses below. Maybe they don’t have very decorative designs, neither is the purpose. Just get them on your wall and discover a fresh time-saver shortcut each day :)

Visual Basic 2008 Keybinding Reference Poster
Visual C# 2008 Keybinding Reference Poster

Saturday, November 17, 2007 11:47:31 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Visual Studio 2008  | 
 Wednesday, November 07, 2007

Today I represented a webcast hosted by Microsoft Turkey about “Silverlight and ASP.NET AJAX Applications Development”. I did not announce it on my English blog because the webcast was in Turkish. However I guess the source code of the webcast demo can be really useful to people struggling with Silverlight and asynchronous data interaction. Below you can download the Silverlight 1.0 demo application hosted inside an ASP.NET AJAX Web site and the appropriate MSSQL 2005 database creation script files used in the demo.

WebCast Demo Source Code - 07112007_1.zip (118.48 KB)

Good luck ;)

Wednesday, November 07, 2007 10:09:22 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   AJAX | Silverlight  | 
 Thursday, November 01, 2007

Hopefully I was on the way to write some insider article about the Silverlight Streaming Services, however Microsoft staff is kind of faster than me :) They just announced the Silverlight Streaming Publishing Plug-In for Expression Encoder! You can’t image how easy it is to publish videos with Silverlight players on the internet now on.

Let’s go ahead and download / install the plug-in from the address below first;

http://www.microsoft.com/downloads/details.aspx?FamilyID=382a3306-b212-4df3-af86-5d48be550b94&displaylang=en

Now, see what’s been changed inside Expression Encoder. On the Output tab we have a new part named “Publish”. We can choose a publishing point “publish to Silverlight Streaming” (where there is no other choice for the moment) and go on by setting up our Silverlight Streaming Services Account ID and Key.

Silverlight Streaming Services Account Management Page
Silverlight Streaming Services Account Management Page

This is where you can find your ID and Key after logging to the Silverlight Streaming Services web site. You need to write them down and copy to Expression Encoder in order to let the Encoder interact with the Silverlight Streaming Services and your account.

Big changes in Expression Encoder
Big changes in Expression Encoder

Before publishing your video either you can set up a specific Application Name for your next upload or just let the Expression Encoder to build a random name. In the “Code” part you can get your IFRAME HTML code which you can directly copy to any web site and start publishing your Silverlight Streaming content. Finally on the Applications List you can find out all of your published applications and delete a selected one if needed.

The upload process goes on...
The upload process goes on...

After you complete all the settings above you can encode the project by selecting a Silverlight template and then you can click the “Publish” button to upload all the content to the Silverlight Streaming Services.

That’s so cool :) Now we don’t need to struggle with the manifest.xml anymore (if you have no idea what it is, drop it :)).

Good luck ;)

Thursday, November 01, 2007 2:56:15 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Silverlight | Expression Encoder  | 
 Tuesday, October 23, 2007

Expression Design

If you ever experienced some wrong XAML output from Expression Design here is your solution; Service Pack 1 for Expression Design. The service pack solves some XAML output problems which are crucial in the mean of Silverlight and WPF application development.

http://www.microsoft.com/downloads/details.aspx?FamilyID=937adf32-0fea-4bb7-b727-cbfbdf3fe032&displaylang=en

Tuesday, October 23, 2007 6:05:37 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Expression Design  | 
 Friday, October 12, 2007

I'm back with a fresh video training. This time we have Expression Encoder on screen and we will see how we can encode different video formats to WMV VC-1 in order to publish them with Silverlight. Expression Encoder is part of Expression Studio. You can easily download the trial setup over http://www.microsoft.com/expression. I will stop here writing all the features of Expression Encoder which I already explained in the video :)

Click here to watch the video, and double click on the Silverlight video player to get it full screen.

Friday, October 12, 2007 11:35:16 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Expression Studio | Training Video  | 
 Tuesday, October 09, 2007

The easiest thing to do with Silverlight is to publish your WMV video files on the internet. You can either use Expression Encoder to encode and automatically publish your videos or use Expression Blend 2 to create your own player templates. However, simply you can do nothing if you don't own any of those software.

Here is the solution. Check the web site I made :) http://silvervideo.daron.yondem.com I know the name is kind of too long, I just didn't want to buy a new domain. What is this web site doing? You type in your WMV video file name and choose a Silverlight player template. If you need you can set up video markers with time (sec) and description fields. After all just click the Download button and get your Silverlight player. Finally combine your WMV video file with the files you downloaded from silvervideo and upload them to your web site. Readly to publish! No code written, nothing hard!

Spread out the word: Silverlight! :)

Update:I had some feedback about the long name of the URL above :) Just left out my lazy idea and bought a domain. Check it out on http://www.silverlightgenerator.com

Tuesday, October 09, 2007 8:38:17 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Silverlight  | 
 Friday, October 05, 2007

One of my habits is to visit www.microsoft.com one a week, and here it is...

This should be a very successful advertisement. Kind of humorous, simple and very effective idea. Who can come out against the success of Bill Gates? So if you want to be successful, start here :) Get your Visual Basic Express :) and follow my blog…

Friday, October 05, 2007 7:41:58 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   General  | 
 Saturday, September 22, 2007

With lots of (I mean LOTS OF :)) bug fixes the new version of AJAX Control Toolkit is released. I strongly suggest to upgrade your current projects and production environment to the new version asap. You can download the control package following the link below;

http://www.codeplex.com/AtlasControlToolkit/Release/ProjectReleases.aspx?ReleaseId=4941

Saturday, September 22, 2007 10:28:48 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   AJAX  | 
 Saturday, September 08, 2007

Welcome to my first training video in English :) Actually I’m very happy being able to find some time to prepare this video today. The video is about WPF windows applications. How we can share information and .NET objects between different windows within the same application? The answer is waiting for you in this video :) (And yes that is my sound :P)

I decided to put my English videos on soapbox, hope you enjoy it ;)

Update:I changed my idea and decided to host my videos on my own blog with Silverlight :) Click here to enjoy! (Double click on the video to get full screen.)

Saturday, September 08, 2007 4:56:25 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Training Video | WPF  | 
 Friday, September 07, 2007

"Again he is away from his blog!" Oh yes, I’m. But I’m not sleeping anyway :) Actually those days I’m kind of busy with my Turkish blog and don’t have time to translate my articles. So what I’m doing or did?

First of all, I attended the "Train the Trainer" (MCT) training of Microsoft Turkey. You can’t imagine how useful and enjoyable the training was. I dare say that was the best training I had in my life. Further on I started writing articles for yazgelistir.com which is the official developer community web site of Microsoft Turkey. In addition I jumped into the video world :) and started to publish some video training on a Turkish community web site; nedirTV.com. Now I’m the VB.NET editor of nedirTV.com and we will be opening Silverlight category with my leadership soon :)

"What’s in it for me?" unfortunately If you don’t know Turkish those are all just news from my life. I will try to prepare some videos in English asap and publish them on soapbox. If you somehow know any community web site specialized on IT training videos, I would like to hear them.

Friday, September 07, 2007 9:06:11 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   General  | 
 Wednesday, August 15, 2007

Windows Movie Maker cannot start because your video card does not support the required level of hardware accelaration or hardware acceleration is not available.

If this is the error you get when you try to launch Windows Movie Maker on vista it seems your display driver is not Vista capable. The solution is downloadable below :)

http://www.microsoft.com/downloads/details.aspx?FamilyID=d6ba5972-328e-4df7-8f9d-068fc0f80cfc&DisplayLang=en

Wednesday, August 15, 2007 5:42:37 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Vista  | 
 Friday, August 03, 2007

Crystal Tech, one of my favorite hosting providers, announced the new ASP.NET 3.5 Beta Hosting Plan. You can easily get hands on experience on a real-life hosting with full LINQ and AJAX support. The downside is that the servers are running on Server 2003 for the moment. Hope they upgrade to Server 2008 as soon as possible.

Friday, August 03, 2007 12:34:53 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   AJAX | ASP.NET 3.5  | 
 Tuesday, July 10, 2007

Did you ever need to log on your clients PC and assist them? There are tons of desktop sharing applications around, some commercial and some are free, however if you knew how easy it is, to build a desktop sharing application working on Vista, you would never give a chance to other solutions.

Windows Vista comes with a brand-new desktop sharing software named Meeting Space which replaces the old Netmeeting. In our sample we will build our own Client (Viewer) and Server (Hoster) applications using Windows Desktop Sharing API (RdpEncom.dll). The Windows Meeting Space and Remote Assistance are using the same API.

There are two main components to use;

RDPSRAPISharingSession – COM object to share current desktop.
IRDPSRAPIViewer – ActiveX Viewer

Host Application

Let’s start with our Server (Host) application. Below is the form design of my server application. The three buttons are Button1, Button2 and Button3 in the same order. I will use the textbox to show the invitation connectionstring later on.

Before switching to the code view we need to add the RDPComapi DLL reference to our project.

Now we can start with our VB code. First of all import the RDPCOMAPILib to the form and define a global RDPSession.

Imports RDPCOMAPILib
 
Public Class Form1
    Dim x As New RDPSession

End Class

In order to specify the clients rights when they connect, we will need an event handler for our sessions OnAttendeeConnected event.

    Private Sub Incoming(ByVal Guest As Object)
        Dim MyGuest As IRDPSRAPIAttendee = Guest
        MyGuest.ControlLevel = CTRL_LEVEL.CTRL_LEVEL_INTERACTIVE
    End Sub

In the code above, current incoming user will be passed as a parameter to the event. We assign it to our own variable and set the ControlLevel to CTRL_LEVEL.CTRL_LEVEL_INTERACTIVE. There are many ControlLevel choices. You can choose the one that fits to your solution. Now is the time to attach our event handler and run the host.

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        AddHandler x.OnAttendeeConnected, AddressOf Incoming
        x.Open()
    End Sub

Client and Host connection in Windows Desktop Sharing API is build through connectionstrings. The host will create a connectionstring and you will need to pass it to the client with an e-mail, msn etc. Now we will create an invitation ticket in order to use it with our client application.

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim Invitation As IRDPSRAPIInvitation = x.Invitations.CreateInvitation("Trial", "MyGroup", "", 10)
        TextBox1.Text = Invitation.ConnectionString
    End Sub

After the creation of a ticket I just show the connectionstring in a TextBox. You can copy and paste it to the client application. It would be a better solution to save the connectionstring into an independent invitation file.

Finally, here is the total solution with the shut down code as well.

Imports RDPCOMAPILib
 
Public Class Form1
    Dim x As New RDPSession
 
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        AddHandler x.OnAttendeeConnected, AddressOf Incoming
        x.Open()
    End Sub
 
    Private Sub Incoming(ByVal Guest As Object)
        Dim MyGuest As IRDPSRAPIAttendee = Guest
        MyGuest.ControlLevel = CTRL_LEVEL.CTRL_LEVEL_INTERACTIVE
    End Sub
 
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim Invitation As IRDPSRAPIInvitation = x.Invitations.CreateInvitation("Trial", "MyGroup", "", 10)
        TextBox1.Text = Invitation.ConnectionString
    End Sub
 
    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        x.Close()
        x = Nothing
    End Sub
 
End Class

Client Application

In our client application we will use the IRDPSRAPIViewer ActiveX object. You will need to add it to your toolbox.

Now you can just drag’n’drop an RDPViewer to your form. I arranged some TableLayoutPanels so my RDPViewer will resize when the form gets resized.

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim Invitation = InputBox("Insert Invitation ConnectionString", "Attention")
        AxRDPViewer1.Connect(Invitation, "User1", "")
    End Sub

Simply we get the connection string with an inputbox from the user and transfer it to our Viewer. In our host we didn’t specifiy any password, so we leave it blank here too. The complete client application code is below.

Public Class Form1
 
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim Invitation = InputBox("Insert Invitation ConnectionString", "Attention")
        AxRDPViewer1.Connect(Invitation, "User1", "")
    End Sub
 
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        AxRDPViewer1.Disconnect()
    End Sub
 
End Class

Conclusion

It’s really very easy to build desktop sharing application with Vista. All the user interaction etc. is totally handled by the API. You can integrate this system into any windows client project on which you are working. When your customers need assistance about any software you prepared, they just build an invitation from your applications “help” menu and send you. No need to struggle any other program.

You can download the sample source code below.

Desktop Sharing (Host and Client) - 10072007_1.rar (280.89 KB)
Tuesday, July 10, 2007 9:36:12 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   VB.NET  | 
 Wednesday, June 13, 2007

Long time I didn’t have the chance to blog, however I have an excuse :) My first book has been published in Turkey -The book is in Turkish as well- with a title of “ASP.NET AJAX”. A total of 516 pages full of ASP.NET and AJAX experiences, including the brand-new AJAX Extension features, both client and server side programming. I’m very happy to be a newbie writer and hope I will go further on soon with new ideas.

Wednesday, June 13, 2007 4:31:03 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   AJAX | ASP.NET 2.0 | VB.NET  | 
 Tuesday, May 01, 2007

This is cool. My third article is published on ASP.NET Official Web Site and for the moment there are two articles from me on the main page. Again I got the screeny :)

Tuesday, May 01, 2007 10:14:33 AM (GMT Standard Time, UTC+00:00)  #    Comments [1]   ASP.NET 2.0  | 

Sometimes while searching for a solution, we don’t see the easy alternative which is in front of our eyes. It seems that happened to me on the article How to embed UpdatePanel in a Repeater. Jeffrey Zhao has a very easy solution replacing my article with a traditional asp.net way. I’m glad my article published on asp.net official site, so Jeffrey Zhao could contribute, or correct me and all of the codeproject.com readers who actually used my solutions while being equally blind (like me) to not see the traditional, easy solution:)

Tuesday, May 01, 2007 10:02:40 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   ASP.NET 2.0 | VB.NET  | 
 Saturday, April 28, 2007

Writing articles in order to help people is a good start-up, however if nobody reads them, it is pointless. Therefore I posted some of my articles to ASP.NET Official Web Site for evaluation :) It seems they did. My article titled "How to embed UpdatePanel in a Repeater" is on their main page at the moment. Now more people can read it and benefit. The article will be archived soon on "More Articles" section.

Here is a screenshot to make it an everlasting memory :) Unfortunately I couldn't give them the link of my blog site, because one of their new rules is not to accept blog posts.

The article must be an independent online publication. A weblog entry or a code snippet will not be accepted.

Even though the content is totally the same in my blog post and CodeProject.com article, I was obliged to send the CodeProject.com link. Besides, I see many articles published in the last month breaking the above rule :) Anyway, thanks to the people working behind asp.net web site ;)

Saturday, April 28, 2007 12:14:13 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   General  | 
 Wednesday, April 25, 2007

For the CD of my upcoming AJAX book I needed to launch web applications from a CD with Cassini Web Server. The user of the CD would most probably have Visual Web Developer Express installed, if not the interface will ask him/her to install. First, I tried to use the executable file from Cassini Launcher Tool of J. Ambrose Little. However, I had a strange problem.

The tool launches Cassini Web Server with a target folder inside the CD and then navigates to the appropriate URL to open the web site. Nevertheless the URL gets opened before the Cassini Web Server is ready to stream content. This situation causes a 404 File Not Found error on the browser. The main problem is that the web site files are slower to access from CD, which causes Cassini to get ready a little late. When the user refreshes the web page after about five second, it gets opened. In order to solve this problem I needed to build my own Cassini Web Launcher Tool which waits five second for Cassini Server to load before opening the URL.

In this article I will introduce you the source code of the above mentioned tool with some extra feature. First of all, the tool will sleep for five second after launching Cassini. You can delete the Sleep code if you will use this tool on local machine.

       System.Threading.Thread.Sleep(5000)

Secondly, I added some code to kill recent Cassini instances before launching new ones. In my situation, the CD interface will contain many ASP.NET projects which will be launched with Cassini through different buttons. If the user launches many projects, all Cassini instances will be held in memory, or in notification area in Windows. Therefore it is needed to check previous instances and kill them.

        Dim AllProcesses As Process() = Process.GetProcesses
        For i As Integer = 0 To AllProcesses.Length - 1
            If Strings.UCase(AllProcesses(i).ProcessName) = Strings.UCase("WebDev.WebServer") Then
                AllProcesses(i).Kill()
            End If
        Next

The above code gets a list of all running processes and checks if there are processes named “WebDev.WebServer” which is the actual process name of Cassini Web Server. If there is such a process we kill it before launching another one. The complete source code of the console application is below;

Imports System.IO
Imports System.Runtime.InteropServices
Imports System.Windows.Forms
 
Module OpenWeb
    <STAThread()> _
    Public Sub Main(ByVal args As String())
        Dim AllProcesses As Process() = Process.GetProcesses
        For i As Integer = 0 To AllProcesses.Length - 1
            If Strings.UCase(AllProcesses(i).ProcessName) = Strings.UCase("WebDev.WebServer") Then
                AllProcesses(i).Kill()
            End If
        Next
        Dim Cassini As String = Path.Combine(RuntimeEnvironment.GetRuntimeDirectory, "WebDev.WebServer.exe")
        Dim Arguments As String = String.Empty
        Dim RandomPort As New Random
        Dim RandomPortNumber As String = RandomPort.Next(&H400, &H2328).ToString
        If (args.Length = 1) Then
            Dim Folder As String = args(0)
            Dim ArgBuilder As New System.Text.StringBuilder
            ArgBuilder.Append(" /path:")
            ArgBuilder.Append(Chr(34))
            ArgBuilder.Append(Folder)
            ArgBuilder.Append(Chr(34))
            ArgBuilder.Append(" /port:")
            ArgBuilder.Append(RandomPortNumber)
            Arguments = ArgBuilder.ToString
            Dim WebServer As New ProcessStartInfo
            WebServer.Arguments = Arguments
            WebServer.CreateNoWindow = True
            WebServer.FileName = Cassini
            WebServer.UseShellExecute = False
            WebServer.WorkingDirectory = Cassini.Substring(0, Cassini.LastIndexOf("\"c))
            Process.Start(WebServer)
            System.Threading.Thread.Sleep(5000)
            Using parent As Control = New Control
                Help.ShowHelp(parent, ("http://localhost:" & RandomPortNumber & "/"))
            End Using
        End If
    End Sub
End Module

In order to use the single threaded apartment model in our application we set the STAThread attribute. STA is a good solution when we need to use COM objects like System.Runtime.InteropServices.RuntimeEnvironment (mscorlib.dll). This class will return us the .NET Framework Runtime path.

Hope this helps.

Tuesday, April 24, 2007 11:05:55 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   ASP.NET 2.0 |