Tuesday, May 26, 2009

How to return IEnumerable from XML web services

Hi ,

This post gives you an idea how to return IEnumerable object in your XML web services, the tip for this post is how to convert this IEnumerable object to something that can be serialized in your xml web serivces.

If you are using LINQ in your xml web serivces, below is an example for the signature of your xml web service:

[WebMethod]
public IEnumerable ListUser()
{
return logic.ListUser();
}


If you run this xml web service, you will get this error :

"Cannot serialize interface System.Collections.Generic.IEnumerable"

To solve this problem, simply convert the IEnumerable Object to Array using ToArray() extension method.

[WebMethod]
public TwitterUser[] ListUser()
{
return logic.ListUser().ToArray();
}


This will fix this problem and return the result as XML in your xml web service.


Hope this helps.

Regards,
Mostafa arafa

Sunday, May 24, 2009

Cloud Computing Presentation - Azure

Hi All,

Today, I have given a session about "Cloud Computing Platform" using Azure Services platform provided by Microsoft, it was an interesting session since it was targeted to Computer science students - Master's Students. the session was so interesting and the audience was so proactive regarding their questions and their thoughts about the future of Cloud computing.

In this session, I covered the main concepts behind Cloud computing environment, and the new trends for the Software evolution with cloud computing environments.

-- Since i was using Azure platform as an example of cloud computing environment, i have covered the main services in Azure services platform:
1) Windows Azure services.
2) SQL services Services.
3) .Net services.

I gave couple of demos for windows Azure serivces and Azure sql services.

You can get my presentation from below link:

http://cid-4bc94054914a6469.skydrive.live.com/self.aspx/Blog%20Code/Azure%20Services%20Platform%20Overview.pptx?ccr=8594


Hope this helps.


Regards,
Mostafa arafa

Friday, May 22, 2009

Visual Studio 2010 Beta 1 is available for public

Hi All .Net Developer,

Impressed news for all .Net Developers, VS 2010 Beta 1 is now available for download for all users ( Wednesday 20 May) , VS 2010 was available for MSDN subscribers earlier, VS 2010 is packaged with new features and new enhancments for what we are doing in VS 2008.

New Features in VS 2010 :

1) Enhanced User Experience.
2) Support for Parallel Programming.
3) More Features and support for ALM ( Application Life cycle Management).
4) Inspiring Developer Delight ( more support for office tools, understanding existing code).
5) New features for Web Development ( One Click Deployment, Full support for Silverlight).
6) Cloud Development.
7) More DB support for DB2 and Oracle DBs.

A lot of interesting features if you would like to read more, visit below link:


Download it and start developing with VS 2010.


Regards,
Mostafa arafa

Friday, May 15, 2009

How to open office files in FBA SharePoint Sites

Hi All,

New Hotfix for Office Client applications has been released to fully integrate uploaded documents in Forms based authentication (FBA) sharepoint sites using office client applications.

Before this hotfix, we couldn't open sharepoint office files using client office applications in FBA SharePoint sites because the client can't authenticate the user in FBA SharePoint Sites.

Now with this hotfix, the client will be prompted with a page to enter the username and password, then the request will be sent to the sharepoint site to authenticate the user and reply with a response contains the  requested document.

Other than this hotfix you have to go on the FBA SharePoint settings sites and set enable client integration check box.


Read More :


Hope this helps.

Regards,
Mostafa arafa

Friday, May 08, 2009

Simple Counter Web Application using Asp.Net MVC 1.0

Hi,

I have created a simple MVC Asp.Net Web Application, This Application contains a page with 2 buttons to increment or decrement a counter value (2 actions on the same view).

This sample is demonstrating how to understand the MVC pattern in Asp.net and how to pass data between the viewer (You page) and the actions in the controller class in your model.

Download Link   - C# Project , VS 2008 :

Hope this help.

Regards,
Mostafa arafa

Wednesday, May 06, 2009

First Look for Asp.Net MVC 1.0 Project structure

Hi All,

This post is for new developers who are interested to know the project structure for ASP.Net MVC  project in VS 2008.

If you don't have MVC project in your VS 2008, download it from this link :
http://www.asp.net/mvc/

Once you create MVC project you will find a new project structure different than the usual website or web application structure that we used to work with.

First look for your ASP.Net MVC project shows that you have 6 top level directories:

1) App_Data: Contains your data source files DBs or XML files to read/write.
2) Content: any css files or images.
3) Controllers: contains all controller classes.
4) Models:  contains business model classes or entity framework edm files as business models.
5) Scripts: Contains js files on your project.
6) Views: UI template files.

Bold Directories : MVC specific implementations (New Directories).

Understanding the purpose of each directory is very important since it is part of your understanding of MVC design pattern implementation in ASP.Net.

Hope this helps.

Regards,
Mostafa arafa

Friday, May 01, 2009

SharePoint Service Pack 2 is available

Hi all,

SharePoint 2007 and WSS 3.0 SP2 is available to download, to know the installation steps and enhancements and improvements for this new release, read more on below link:


http://blogs.msdn.com/sharepoint/archive/2009/04/28/announcing-service-pack-2-for-office-sharepoint-server-2007-and-windows-sharepoint-services-3-0.aspx


Hope this helps.

Regards,
Mostafa arafa

Friday, April 24, 2009

WCF REST Starter kit is available

Hi all,

A WCF REST starter kit is available to download, this kit contains a set of .Net framework classes which help to build WCF REST-Style Services.

Download link:

http://www.asp.net/downloads/starter-kits/wcf-rest/

Hope this helps.

Regards,
Mostafa arafa

Monday, April 20, 2009

Asp.Net 4.0 AJAX Deep dive with jQuery webcast

Hi Folks,

New webcast on 22 April @ 20:00-21:30 Kuwai/Riyadh Time.

AJAX 4.0 deep dive with jQuery samples and new components.
 
Session outline:
 
  • jQuery and the VS 2010
  • Using ASP.NET AJAX 4.0 Client Templates
  • Using the DataView control
  • Conditional attributes
 
 
Speakers:
 
Ahmed Shokr (SafatES – Developers Team Leader)
Amr El Garhy (Microsoft Gulf – Developer Evangelist)
 
-+-----+-----+-----+-----+-----+-----+-----+-----+-
Amr El Garhy has invited you to attend an online meeting.
Make sure the Office Live Meeting client is installed before the meeting:
Meeting Url: 
Subject: ASP.NET AJAX 4.0 deep dive with jQuery samples and new components.
When: 22/Apr/2009 20:00-21:30 (GMT+03:00) Kuwait, Riyadh.
Where: Live Meeting 

See you all there. 


Regards,
Mostafa arafa

Saturday, April 18, 2009

SharePoint Best practices

Hi folks,

Excellent resource for SharePoint Guidance contains the best practices for Architecture designs,development,test,deploy,internet and intranet applications.

http://msdn.microsoft.com/en-us/library/dd203468.aspx

Regards,
Mostafa arafa

Friday, April 17, 2009

Important Announcement: SharePoint 2007 SP2

Hi Folks,

SharePoint Product manager announced that a new service pack 2 will be available for sharepoint 2007 and WSS 3.0, and this service pack will be available to be download on 28th April 09.

This service pack has a lot of improvements for new IE 8.0 and firefox 2.0 & 3.0.

It's good to plan for this installation on your existing solutions :).


Regards,
Mostafa arafa

Tuesday, April 14, 2009

Silverlight development in sharepoint 2007

Hi All,

Excellent resource for developing Silverlight 2.0 in sharepoint 2007, the book covers a lot of important aspects for sharepoint development using silverlight 2.0.

http://www.amazon.com/Professional-Microsoft-SharePoint-Development-Silverlight/dp/0470434007


Regards,
Mostafa arafa

Thursday, April 02, 2009

SharePoint Designer 2007 is Free

Hi Folks,

Now Microsoft has released SharePoint 2007 for Free from MS site.

As you know, sharepoint designer was a licensed product before this announcement from Microsoft.

Download url :

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=baa3ad86-bfc1-4bd4-9812-d9e710d44f42



Regards,
Mostafa arafa

Tuesday, March 24, 2009

Extension Methods in C#

Hi all,

I have submitted a new article in C# Corner website "Extension methods in C#" since i see this is one of most important C# 3.0  language enhancements.

read more about it :



Regards,
Mostafa arafa

Tuesday, March 17, 2009

ASP.Net web development server stop working in VS 2008

Hi folks,

One of my friends told me that he had a problem in the last couple of days, when he is trying to run asp.net web application; he was getting this error message is showing in his browser:
"Internet Explorer cannot display the webpage"

He uninstalled and installed VS 08 since he taught that this will fix the problem.

If you are facing this problem, simply do the following to fix it :

1) open the following file: "c:\windows\system32\drivers\etc\hosts"

2) Add the following entry in this file:

127.0.0.1        local host


Save the file and then try to run your asp.net application the development server will work perfect :).

Hope this helps.

Reference:

Regards,
Mostafa arafa

Saturday, March 14, 2009

Difference between clear and remove in web.config

Hi all,

I had a discussion with one of my friends about the difference between clear and remove keys in web.config, and I would like to share it with you.
Remove in web.config is to remove a specific key from the web.config, for example:
Note: <> have been replaced by {} because it is not allowed to be posted in http request.

{appSettings}
{add key="MyName" value="Mostafa1"/}
{add key="MyName" value="Mostafa2"/}
{add key="MyName1" value="Mostafa3"/}
{remove key="MyName1"/}
{/appSettings}
Remove is removing the key MyName1.
Clear is used to remove all key mentioned above it, for example:
{appSettings}
{add key="MyName" value="Mostafa1"/}
{add key="MyName" value="Mostafa2"/}
{add key="MyName1" value="Mostafa3"/}
{clear/}
{/appSettings}
I don’t recommend to use clear key in the web.config because it will cause a disaster in your application.
Hope this tip helps.

Thursday, March 12, 2009

Free ASP.Net MVC tutorial

Hi folks,

New ebook for ASP.Net MVC is now available for free to download and start practicing ASP.Net MVC framework:

"There has been a lot of excitement in the community about the new ASP.NET MVC framework that is about to ship (literally any day now – announcement coming soon). As with anything new, people are also asking for more tutorials/samples/documentation that cover how to get started and build applications with it." -- ScottGu

download link :
http://aspnetmvcbook.s3.amazonaws.com/aspnetmvc-nerdinner_v1.pdf

Read more from Scott Gu's Blog:
http://weblogs.asp.net/scottgu/archive/2009/03/10/free-asp-net-mvc-ebook-tutorial.aspx?CommentPosted=true#commentmessage

Happy .Netting.

Regards,
Mostafa arafa

Sunday, March 08, 2009

Export office system files to PDF

Hi all,

Office System 2007 save as PDF add-in now is available without 3rd party tools/add-ins.

Download link:

http://www.microsoft.com/downloads/details.aspx?familyid=4D951911-3E7E-4AE6-B059-A2E79ED87041&displaylang=en

This add-in work with all office 2007 applications such as: Word,Excel,PowerPoint,Access,Visio,InfoPath and OneNote.


Regards,
Mostafa arafa

Wednesday, March 04, 2009

24 Hour Virtual Event - TechEd 2009 Developers !!!

Hi folks,

Do you have a problem of different time zones for online trainings and workshops ? If Yes, here is a good news from microsoft :

Defy all challenges of different time zones, Now you can attend Virtual Tech Ed Event for Developers on 1st April 2009 after your registration. No matter which time zone you belongs to.

Event contains 5 tracks:
1) Windows Development.
2) Windows Mobile Development.
3) Office & Sharepoint development.
4) Developer tools , Languages and tools.
5) Web Development & User Experience.

Read more on below link:

https://www.msfttechdays.com/public/home.aspx

Happy .Netting !!!

Regards,
Mostafa arafa

Tuesday, February 24, 2009

Content Deployment Best practices in SharePoint

Hi all,

Excellent post for content deployment in sharepoint best practices by Stefan Gobner - Escalation Engineer for SharePoint.

Article link:

http://blogs.technet.com/stefan_gossner/pages/content-deployment-best-practices.aspx

Hope this helps.

Regards,
Mostafa arafa