Huthaifa's Blog Role

Huthaifa's Blog @PalDev.NET UG


Bring ScottGu to TechEd ME 2010

For the first time, Microsoft will run TechEd Conference the premier technical education event that takes place across select locations globally in Dubai for the Middle East Communities. And it will be appreciated to help bringing Scott Guthrie the brilliant Microsoft Guru to the conference by signing your name into this petition: http://scottgutome.com/

For more information about TechEd MEA check the following site: http://www.teched.ae/

(read more)

Microsoft TechDays in Palestine
PalestineTechDays-banner

For the first time in Palestine , Microsoft in cooperation with PalDev community will present 3 TechDays in Hebron, Ramallah and Nablus from 1st November till 3rd November. The main activity in the event will be the Official Launch of Windows 7 and Imagine Cup 2010. Other topics in the event will be as the following :

  • IE 8
  • WebsiteSpark
  • Visual Studio 2008 and 2010 Sneak Peak
  • SharePoint 2007
  • Windows Server 2008 R2
  • BizSaprk Program
  • Imagine Cup (Launch)
  • MSPs Program
  • .Net clubs
  • DreamSpark

Thanks Microsoft Feed

I will deliver the VS2010/2008 presentation and I hope to show as much new features as the time allows me. There is a plenty of new stuff there and 25 min will be very short :)

I will be tweeting directly from there so stay tuned.

(read more)

Huthaifa.com!!

I bought huthaifa.com domain one year ago – nearly. And I keep on telling myself that I will setup a unique, user friendly, personal … etc website. And as usual I didn’t have the time ooops .. I didn’t set a time for this task so as its being postponed day after day for a long time. Today morning I have some issue which forced me to have my own personal area on the Internet space. So I ran to my godaddy account and setup a free express hosting plan. It’s good enough although its contains godaddy ads in the top bar. In the mean time this was more than enough for me. 9-29-2009 11-53-34 AM

Then I make a quick google search for Ajax based RSS reader and I ran into Steve’s rss reader – thanks Steve :) - at codeproject. So I copied the project as is in a hurry and modified the code, markup, added my tow RSS feeds to the reader and uploaded the mixture to my site.

After a quick first look I noticed that the CSS layout is broken and its a pretty ugly look. I will invest more time in UI and add those features I was dreaming for a long time. Until that time you need to excuse me for this crappy site.

(read more)

No more spam for PalDev

One of the most annoying things about using Community Server that its not come with anit-spam forms. Blogs,media, registration forms and other public forms are exposed to spam bots.

captchaCommunity server have a spam scoring utility to mark spam posts regarding several factors such as the number of links in the post, the number of posts from certain IP address… and many others. In my opinion and from my experince with PalDev site –whihc uses community server 2008.5 express- this sucks and does not work well.

The most simple, common, and trusted way to prevent webform spam is using Captcha. Captcha is a pattern and the majority of the Internet sites nowadays is using captcha challenges to prevent spam bots fro flooding sites with endless submits.

CAPTCHA, stands for (C)ompletely (A)utomated (P)ublic (T)uring test to tell (C)omputers and (H)umans (A)part.

Anyway from day one when I setup PalDev site I said that I really need to implement Captcha and as usual – for lazy busy people- this task is delayed day after day. PalDev site have a many spam users registered, many spam comments on the blogs and too many spam comments in the media gallery. Then my email account receive tons of comment auditing alerts notifying that new comments arrived to my poor blog so I decided to stop complaining about and get the work done.

Don’t underestimate captcha its a great invention. Google acquires reCaptcha for 500$-700$ million deal last week.

I picked my favorite captcha control implemented by Jeff Atwood –you can find it here at codeproject- and makes some tiny tweaks. Then I started modifying the community server forms: the registration from, the media gallery post from, and I ended up modifying all the 16 blogs posting forms … ooof the community server ships with 16 blog theme.

Finally I can say PalDev is spam free – almost i still need to delete all those spam comments,users.

I will publish all the captcha enabled forms, the captcha modified source hope it helps somebody.

(read more)

In Hebron “Introduction to VS2008 & ASP.NET” session

As part of PalDev activities I was in Hebron this Saturday to deliver a “Introduction to VS2008 & ASP.NET” session for the PPU –Palestine Polytechnic University – CS and IT students. The workshop was held in Friends of Fawzi Kawash IT Center of Excellence (FFKITCE). We stopped the event registration process after 65 person was registered regarding the room limitation and we also emailed the latest 25 person that the priority will be given for those who registered earlier and we will re-hold a similar event for those who could not attend.

Anyway I went to Hebron using public transportation and it was like using “Crazy Taxi”!! it was really a mad drive I reached with no harm and headed to the FFKITCE center. The presentation started after 12:00 pm and continued to 4:00 pm nearly. It was really a very quick 3 hours full with Microsoft Buzz.

The audience was excited –I think- and I was very pleased to see those motivated students which really encouraged me myself to pursue latest tech’s further and further. The audience was interested with the powerful features the .NET and VS2008 provides which ease the application development process and save time and efforts. On the side of the presentation I introduced the express editions Microsoft offers, Microsoft Dream Spark and MSP programs.

In general the presentation run smoothly except that I could not figure out what happened in the second demo when my VS 2008 refused to connect to adventure works sample database. Although I checked the sample scenario early that morning and it was running fine but this is the demo’s hell I really tested –many times probably- !! Anyway we was already exceeded the given time so I skipped the rest of demo and finished the presentation. I am looking forward seeing more interaction from the students with PalDev and I really think that the time when such events are being held by the students themselves is very near.

A several suggestions came along with the presentation: some folks asked for advanced topics and this is very eligible and PalDev already has plans to do a bunch of advanced sessions for advanced users. Another asked for HOL’s but this is very limited due the limitation of available well equipped  labs.

Hope that helps anyone
Huthaifa

(read more)

The Gu is Back!! with new Multilingual version!!

Yesterday I checked my RSS feed and found that Scott Guthrie announced that he is starting a new series of posts. That was a great news to hear. Scott is one of the most popular Microsoft managers. He is one of those who played a core role developing Microsoft web platform even the whole .NET framework. He leads core .NET libraries,WPF, ASP.NET, ASP.NET MCV, Sliverlight and IIS teams.

Anyway I decided that I will resume translating his posts in the Scott Guthrie in Arabic blog at asp.net blogs. I started doing this early in the last year but after translating some posts I stopped. Something in my brain told me: Stop its not worthy .. you are typing your own posts in English!! Even your blog@PalDev   Why to make Arabic clone of another one’s blog!! This was totally a wrong decision. No doubt that the language of the world now is English. But this is not a reason for people not to support their own local content presence on the Internet. This will help their people who has not the abilities to use English or even does not like to read foreign content.

So I made this decision: form so on I will not translate just translate Scott’s posts but I will even translate my own posts.

This will be fair enough. I know that will be tough but I hope that I can cope with this challenge. Its better to stop chatter and start work - Th Gu made another new post!! He is very active blogger!-

To check the new posts check:

  • Clean Web.Config Files (Posted Aug 25, 2009)
  • Starter Project Templates (Posted August 26, 2009)

    See you very soon.

  • (read more)

    Yahoo! acquires Maktoob

    Its confirmed ! the 1st historical and biggest deal in the Arab Tech market. Yahoo! Acquires Maktoob form more than 100$ million USD. Form more details check this link at ArabCrunch

    (read more)

    Hosting Multiple websites/applications on IIS – Part 1

    IIS is the lonely web server –rather than web development server - in the Microsoft stack and the most recent one IIS7 add more flexibility, control and ease of use to IIS. There is a bunch of concepts need to be clear in mind when it comes to host information and pages on IIS to allow sharing then over the Internet, an intranet or an extranet. To host data you on IIS you will use websites, application and virtual directories. Those concepts was hanging around from previous versions.

    Sites, virtual directories, and applications

    Those three concepts is the building blocks you will use to host you websites, web applications, web pages and any other resources. In this post we will discuss the concept of website.

     

    So what is Website?

    A website (or web site) is a collection of related web pages, images, videos or other digital assets that are addressed with a common domain name or IP address in an Internet Protocol-based network. A web site is hosted on at least one web server, accessible via the Internet or a private local area network. – wiki-

    In IIS a A site is the top-level logical container that specifies how HTTP requests are received and processed - it defines a group of bindings that determine how the site listens for incoming requests, and contains the definitions of applications/virtual directories that partition the site's URL namespace for the purposes of structuring your application content. :) Thanks mike

    Ok this is what website means … oops! then it must map to physical folder, physical files, and resources ...etc? yes that’s right.

    IIS Default website Web servers works on a client server technology. In the simplest case this means that the client – usually web browser- requests a certain resources webpage, images ..etc from the web server e.g. IIS  using an http request. The web server picks up the request and maps it the appropriate website. In IIS there is a default website called Default Website which maps to C:\inetpub\wwwroot folder –inetpub is the default installation folder of IIS- We can add as many as websites we need but the main issue we need to address is that those websites should to be uniquely identified within the IIS server. Otherwise the web server -IIS- will no be able to redirect the incoming http requests to the correct website.

    Site Binding

    To uniquely identify website you will use site binding to configure Http.sys to listen on IP addresses and ports. Site binding includes two main attributes which is the binding protocol and the binding information. Okay so lets have a look to the DeafultWebsite site binding. Choose the default website> Edit Binding from DefaultSite context menu. As we can see: the binding protocol is http this means that the communication between the client and the server will occur over the http protocol. And we can see the binding information which consists of: IP address, Port and host header.

    Multipl host headers on website3

    What this means? this means that when a client requests your web server lets say that we have an intranet server called alpha by typing http://alpha in his browser the web server will pick up the request and maps its to the DefaultWebsite over the http protocol using any available IP address on port 80 which is the default port for http protocol.

    Ok,what if we need to have multiple website rather than the DefaultWebsite?

    As we stated above IIS is designed to host multiple websites by default each of them must be uniquely identified so to carry out we need to play with binding information parts:

    • IP address
    • TCP Port
    • Host Header

    The decision to which way you need to follow is determined in respect of your needs and available resources. Ok lets create additional three website to be host on our machine each to clarify this issue.

    Using IP address

    In IIS you can configure websites to listen to incoming http requests on all available IP address -unassigned- or on individual IP address. And by this you need to configure your website with certain IP address. Ok IIS> Sites> Add Web site and we need to fill the Site Name, Path, and in the binding information are type your certain website. Keep the other option as the same.

    This will add addional site in the IIS. The site configuration appears like this in the applicationHost.config file

    <site name="SiteBindingUsingIP" id="3">
                   
    <application path="/" applicationPool="SiteBindingUsingIP">
                       
    <virtualDirectory path="/" physicalPath="C:\SiteBindingUsingIP" />
                    </
    application>
                   
    <bindings>
                       
    <binding protocol="http" bindingInformation="172.20.2.193:80:" />
                    </
    bindings>
    </site>

    IPSite

    One disadvantage of this approach is that IP address is not always free to use. So assigning an IP address to every website may be a non eligible choice.

    Using Custom TCP Port

    We can change allow website to learn to a non-default TCP port rather than port 80 which is the default port of http protocol. What you need to do to accomplish this is the same of the previous step but you need to provide a unique and avail be TCP port. In the attached image the new site WebSite2 is using the same IP address of WebSite1 but on different port which 8080. 

    When users request the site they need to provide the TCP port after the name of the server or the IP address like this: http://sitename:PortNumber/ or http://IpAddress:PortNumber/. E.g. http://websit2:8080 or http://172.20.2.192:8080

    TCPPortSite

    The main disadvantage of this method is that the users need to know on which port the website is working and append the TCP port to the website address and this not eligible on all case.

    Using Host Headers

    HTTP Host: headers are a feature of the HTTP v1.1 specification that allows a web server to host multiple web sites on a single IP address and TCP port, while simultaneously allowing HTTP v1.1 clients to specify the web site they wish to connect to. The process requires that the client send a Host: HTTP header as part of the HTTP request specifying a web site it wishes to access, and the web server having a web site configured with a corresponding HTTP Host: header value.

    Follow the same previous steps to define the website and fill the host header you need at the Host name field. You can change the TCP port but this will make no sense since host headers is enough to distinguish between websites on the same IP address.

    HostHeader

    One website can have multiple hosting headers you can add more host headers by adding more bindings with different host names. To edit the site bindings Choose the desired site > Edit Binding and you can add/edit/and remove bindings. Multipl host headers on website3

    Clients could not be able to connect to the web server using host headers unless you those host headers are defined in the appropriate DNS Server or Host File. IIS is not a name resolution server its a web server so the mechanism how the users can contact your web server with the names you choose –host headers- is not the responsibility of the IIS server.

    Host Headers and SSL

    To use host headers with https a certain configuration should took a place. Until Windows 2003 SP1 IIS6 could not handle host headers over SSL. This is because that the host headers themselves are encrypted within the entire encrypted http request so when the http request is being received on the IIS it could not figure out to which website it should be redirected. After the SP1 IIS6 or by using IIS7 you can use wildcard certificates to handle host headers over https –we will  not go throw this process in this post-

     

    Hope this helps. In the next post we will have a look to Application Pool concept.

    Share |
    (read more)

    Microsoft Virtual Tech Days – India August 19 -21, 2009

    Microsoft India is holding a 3 virtual days for developers, designers, IT Pros and system architects. The registration is free and you need Windows Live Meeting to join. Interesting topics will be addressed so after registration and filling your track choices I received this quick summary about the which session tracks available:

    13 tracks and 52 insightful technical sessions. This edition of Microsoft Virtual TechDays provides you a rare opportunity to deep dive into latest Microsoft Products & Technologies.

    Tracks for Developers

    • Windows 7 Client
    • Software + Services
    • RIA - Rich Web
    • Cloud Platform

    Tracks for IT Professionals
    • Expression Blend 3
    • SQL Server
    • Windows 7
    • Windows Server 2008 R2

    The majority of the speakers are from Microsoft India and I am wondering how there English accent could be! but I am sure there will be no problem and this is not an issue at all – I hope.

    Visit the website http://www.virtualtechdays.com/ to see the detailed sessions list, time line and the speakers list. The slogan is very nice “Because there is always more to learn” and this is very very true. A last you should manage a fast Internet connection so you can have good live meeting session experience.

    Hope this helps,thanks Vikram Lakhotia

    (read more)

    Google.ps is alive

    googlePS Google.ps is alive and when you request http://google.com it redirects you to http://www.google.ps. Hope we see that very soon in Bing!

    (read more)

    Hosting multiple websites/applications on IIS

    Microsoft provides us with IIS -stands for Internet Information Services- as its only, robust and well packaged web server. IIS is the second popular web server on the internet after Apache HTTP Server the open source web server. You can use IIS to host different type of websites so you can host websites which use ASP, PHP, Perl, JSP, ROR .. etc. and for sure those who uses ASP.NET.

    welcome In most cases you will use one web server to host multiple websites. There is a many issues should be addressed and take in our considerations. In this series I will address some of these issues providing guidelines and collection o0f practices to handle them.

    Ok, see you very soon I hope.

    (read more)

    ASP.NET MVC 2 Preview 1 is released!

     

    ASP.NET MVC 2 first preview is released to public now and you can download it from Microsoft download site. Here is short overview of technical requirements and main new features of ASP.NET MVC 2 Preview 1.

    System requirements
    • Windows 7, Windows Vista, Windows Server 2003 or Windows Server 2008,
    • .Net Framework SP 1,
    • Visual Studio 2008, Visual Studio 2008 SP1, or Visual Web Developers 2008 SP1
    New features
    • areas support – allows to group and partition functionality in large ASP.NET MVC applications,
    • DataAnnotation validation support – ASP.NET MVC 2 is able to use same data annotation mechanism as ASP.NET Dynamic Data and .NET RIA Services do,
    • strongly typed UI helpers – let you use strong-typed lambda expressions when referencing the view template’s model object,
    • UI Helper templating support – new methods to bind custom editors and displays to model properties,
    • other cool features – find out by yourself :)

    References:

     

    Thanks Gunnar Peipman .. its just a quick copy and paste

    Hope that helps

    (read more)

    ASP.NET Globalization hint

    As one of the most powerful features came with the ASP.NET 2.0 is the out of the box globalization and localization features. Today websites and web applications is usually became a multilingual ones and ASP.NET provides us with a flexible, easy to use and time saving  localization mechanism. I ran into a silly issue about localizing a project I am working with and after losing my mind and finished tearing up my hair I said “opps .. I missed something .. the fallback file”

    Ok .. to localize your application you need to make use resources files which ends with the *.resx extension local resources or global resource there is no difference. Anyway in the most simple case if you have a Default.aspx form to localize it you must have a related .resx files. One file per culture using this naming convention Default.aspx.[culture].resx … So if you you application supports 3 languages say: English, Arabic, French you must have one resource file for each language. This means we need to have:

    • Default.aspx.en-US.resx for the English page with USA specifications
    • Default.aspx.ar-SA.resx for the Arabic page with Saudi Arabia specifications
    • Default.aspx.fr-CA.resx for the French page with Canada specifications

    You may use neutral cultures which related to language rather than a specific region culture e.g en, ar and fr … anyway after doing this you think you are fine but when you run the application you will discover that your pages does not read any values form those files and you still have those you filled when developing the form.

    This occurs because in all circumstances you need to provide a default resource file which called “Fallback” resource file –will look like this Default.aspx.resx- which CLR will use when the users culture does not have its own resources file. e.g say that we have a visitor with the Chinese culture on his browser then the fallback resources will be used to get the required resources to serve his request.

    What make me forget about the fallback resources file in my case is the truth that I am forcing users to choose between en-US and ar-SA –which is the default- culture. I thought: who need this file while the users will have a default culture and can only switch to another predefined one. Plus the resource mechanism works by searching for the users specific culture first –which in my case is forced by code to use ar-SA - in the cultures hierarchy and then move to the parent culture and so on!!

    Hint

    You need to make sure that you ever never forget about providing Default or Fallback resource file in your application. I will make another detailed post about how CLR handle resources. Hope that helps

    (read more)

    Bing …!!

    Microsoft launches its new search engine called Bing codename Kumo. regarding Microsoft engineers its not a normal search engine where you type a word and have thousands of search results its a decision engine. Its in the preview interval now and will be fully launched by June 3. The news seems to be very promising and Microsoft is warming for war with by launch a 100 million dollars marketing campaign.

    For a good overview about what Bing is? and what the capabilities available visit Discover Bing there you will find a useful resources and even you will be behind the scenes 

    I am waiting for my preview code so until that time have more information about Bing user experience by following this link: Microsoft Bing: Much better than expected

    (read more)

    Windows 7 Resources for you .. only for you

    After installing Windows7 I received a few comments from friends  asking me about some information regarding the Windows 7 user experience, installation requirements, drivers ..etc. So I decide to collect some resource here about those issues may it help someone. Here we goes:

    For end users:

    For IT pros:

    Windows7: Simply is great

    I am Windows 7 PC :)

    (read more)





    Thanks Steve for RSS reader
    2009