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

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

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

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

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

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

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