Thursday, December 27, 2007

Deploying WebParts in SharePoint 2007

Hi Folks,
Any SharePoint Development requires you to develop your Web Part and deploy it to sharePoint,in this post i will describe the steps required to deploy your web part to sharepoint 2007 site:

1) after creating your web part,you have to sign it with strong name.
To Do that : simply open the project properties and on the signing tab select new and then save the properties ad build your web Library.

2) add to the GAC on your sharePoint Server.
you can do that by using VS.Net Command tools or use .Net 2.0 configuration Tool from the control panel.

NOTE: after you add your DLL to GAC you can find it on C:\Windows\Assembly Folder.

Take Note : you have to store the Publick Key token of the signed DLL by right click on your DLL -> Properties and save the public key token on a notepafe file because it will be used later.

























3) To add this webpart to a sharepoint site,you have to make it "Safe Control " to be loaded and configured on your site.


To Do that : open the web.config file of your site,it resides on C:\IntePub\WWroot\WSS\Virtual Directories


then open the folder of your site,it takes by default the port number of your site.

Paste this code on the web.config : (i removed <> letters of the key)

SafeControl Assembly=”ArafaWebPart,
Version=1.0.0.0, Culture=neutral,
PublicKeyToken=2e128026f9c7d6df”
Namespace=”ArafaWebPart” TypeName=”*”

Safe and close your web.config.

4) open your sharepoint site->site settings->web parts->click on new and select your webpart and then click on Populate Gallery.














5) then click on any page and add your web part.













Hope this helps.




Regards,
Moustafa arafa

Monday, December 24, 2007

How to pass DateTime Timestamp to Sharepoint 2007

Hi Folks,

if you developing sharepoint application,you will face that the DateTime timestamp parameter on sharepoint is different than what you are used to pass in your .Net Application.

In SharePoint 2007,the TimeStamp has to passed as a string and this is the format of the string:

"YYYYMMDDTHHMMDDZ"

Take these Notes:

1) Date Part is followed by T Symbol.
2) Time Part is followed by Z Symbol.

and the the rest of the string is easy to get it in your application by using:

C#:
DateTime.Now.Date.ToShortDateString()
DateTime.Now.Date.ToShortTimeString()

By using any string concatenation "+" or use String Builder Class to give better performance.


Hope this helps................


Regards,
Moustafa arafa

Sunday, December 23, 2007

Deploying Features without using stsadmin command line tool

Hi Folks,

i'm using a visual tool which build our command you want to write in the stsadmin command line tool without.

Tool Name : Feature Manager

Download Link :
http://www.sharepointblogs.com/files/folders/tbaginski/entry2449.aspx

One Tip : After install and activate the feature dont forget to reset your IIS.

Don't forget to configure the tool before start by clicking on configuration menu item and put the paths of your installation because its by default its on C:\ Drive.

Hope this helps........

Regards,
Moustafa arafa

0x0020 in MOSS object Model

Hi Folks,

This post to inform that when you develop on sharepoint 2007 object model,and if you are manipulating with lists in sharepoint you might face in the item names or field names you will find that the spaces in sharepoint is converted to this hexidecimal code "0x0020".

Example:
if you have a column name in a list with name "Customer Name",when reading this column in your code you will find the column name is : "Customer_0x0020_Name".

Happy .netting with sharepoint...........

Regards,
Moustafa arafa

Sunday, December 16, 2007

How to enable Search on your MOSS 2007 Site

Hi Folks,

If you want to Enable Search facility on your sharepoint 2007 site,follow these steps:

Go to the Site Settings and under Site Administration Click on Seach Visibility Link.













Update the seetings as shown on the attached image.

even after you enable the search visibility on your site and if you start search for a keyword on your site pages it will not work until the Crawling process will be run.

What's the story of Search Crawling in MOSS 2007 ?

There is a Crawling Service running on all Sharepoint conent pages to index all content,if you start your search for a new added content before the crawling process start by including the new content on its schedule,you will not get your search results.

The Question is : How can i Configure My Crawling process on MOSS 2007 ?

Open your central administration site: click on Share Services link under Share Services Administration.

Click on Search Settings -> Content Sources and Crawl Schedules -> Edit the Content Source which is exist.















Update your crawling services as you want and as per your organization needs.

Hope this helps....


Regards,
Moustafa arafa

Wednesday, December 12, 2007

Variations Tip in MOSS 07

Hi All,

Locatiozation on MOSS 2007 is a piece of cake to start creating your site multi-lingual site.

to start creating multi-language site on sharepoint 2007,you have to use one of the new features on MOSS 2007 called Variations.

when you create variations on your site you might face this problem which mentioned below.

if you got this error message when you try to create heirarchies on your site in sharepoint 2007 :

"No Variation Root Web has been set - hierarchies cannot be created until a Variation Root is set."

simply this because you didn't specify the variation root of your site.

click on variations link and set / on the location to create the variation on your root or base on your select.

hope this helps.

Regards,
Moustafa arafa

Thursday, December 06, 2007

Which Master Page Shall I Use in Built-In Master Pages in MOSS 07 ?

Hi All,

In MOSS 2007,there's 9 Master Pages built-In on any create site in Sharepoint 2007.

The Question is : Which Master Pages shall I use for my Site ?

Case #1: Blue Vertical / Black Vertical
This is the best choice in case you are building an internet sites with good representations of the WCM related columns,No Top Navugation only Left Navigation which is most required on internet sites.

Case #2: Blue Tabs
Is the best alternative for default master page .The difference is the tabbed representations of the top navigation.


Case #3: Blue Band / balck Band / Blue Glass Band
Same as Default master page with both Top and Left navigation,the best selection for starting to customize the default master page.

Orange Sigle Level & Black Single Level : same as blue band master pages with different on Color Combinations.

Or you can still use the default master page with full control on the top and left navigation and customize it but it will take much work on your customizations.

The Good starter from my point for your customization is Blue Band Master page coz it contains the minimal that u want to put on your master page with site actions and navigation.


Hope this Tip help.


Regards,
Moustafa arafa

Wednesday, December 05, 2007

Create your first Content Page in MOSS 2007

Hi Folks,

MOSS 2007 is amazing product from MS,it contains Sharepoint as well as CMS features on one product,Sharepoint 2007 built on top of WSS 3.0 which has alot of features to built collaboration solution with great integraion with asp.net applications.

one of important features on MOSS 2007,the Content management which was separate product before the release MOSS 2007 and had name (CMS 2002 with SP2 latest release).

Now,CMS 2002 is incorporated on MOSS 2007,and the product team for content management on MOSS 2007 has name "ECM" Team : Enterprise Content management which is different than the sharepoint product team.

To start use and implement your first CMS Site on MOSS 2007,its different than CMS 2002,alot of terminologies and key features have been changed.

one of the most required question,HOW TO ? create my CMS or built my Content Site on MOSS with little bit customization.

The Guide URL below,is oyur start,believe me....start forward and showing you step by step how to create your first content page for editors in MOSS 2007.

http://msdn2.microsoft.com/en-us/library/aa830818.aspx

Part 1 is enough for this topic,and to dig more on ECM on MOSS 07,MUST READ 3 PARTS of this Article.

Life is easier with WCM in MOSS 2007.....Thanks Microsoft.

Hope this helps.



Regards,
Moustafa arafa

Tuesday, December 04, 2007

Forms Authentication on MOSS 07 Sites

Great Article shows with screen shots How To ? implement Forms authentication on your MOSS Site.

Excellent Article:

http://weblog.vb-tech.com/nick/archive/2006/06/14/1617.aspx


Another useful one :

http://www.developer.com/net/asp/article.php/10917_3622481_2


Hope this helps.

Regards,
Moustafa arafa

Monday, December 03, 2007

MOSS 2007 Problem : Cannot connect to the configuration database.

Hi Folks,

During my work with MOSS 2007,i had some performance issues regarding the SQL Server instance services which is running the configuration and Data for MOSS sites.

I had closed this service bymistake and when i'm trying to open the central administration site or any site i got this message in the IR:

"Cannot connect to the configuration database."

To resolve this : go to your services and start this service:
"SQL Server (OFFICESERVERS)"

This Tip is enough to continue your work with your MOSS sites.

Hope this helps.

Regards,
Moustafa arafa

Thursday, November 29, 2007

Recover your DB from Log Files in MS SQL DBMS

Hi Folks:

I got a call from one of my friends "Fady" regarding one of the guys dropped his tables without taking a backup of his DB.

This is my Support and answer to him.

"
Dear My Firend Fady,

Regarding your question yesterday, for that person who Dropped his tables, anyways this email has good news for him, as I told you he can recover the DB from its log file, simply pass these Urls to him, to recover your DB from Log File.

Urls:

http://sqlserver2000.databases.aspfaq.com/how-do-i-recover-data-from-sql-server-s-log-files.html

http://www.apexsql.com/sql_tools_log.asp

"

Hope this help you guys.......


Regards,
Moustafa arafa

November Rosario CTP now available

7 days after Visual Studio 2008 RTM’d, we have a preview of the next version of VSTS available. Get it while it’s hot.


http://blogs.msdn.com/jeffbe/archive/2007/11/28/november-rosario-ctp-now-available.aspx

I'm happy to announce that the next Community Technology Preview of Rosario (officially known as Microsoft® Visual Studio® Team System code name “Rosario” November 2007 CTP) is now available. Customers can immediately begin downloading the VPC images from our download page.

For this release we worked on a number of key scenarios that we'd like you to try out. To help facilitate your evaluation, we've included samples and walkthroughs within the VPC to demonstrate these new features. Here's a list of walkthroughs broken out by product:

Architecture Edition
• Visualizing Interaction Sequences between Service-Oriented applications
• Using the Distributed System Designers and the Web Service Software Factory to build WCF applications
• Designing and Visualizing Interactions between classes
Development Edition
• Simplify Code Analysis rule selection with Rule Sets
• Find and fix a bug using the historical debugger
• Identify the test impact of code changes
• Find a bug on a separate machine using the standalone debugger
Test Edition
• Planning a testing effort
• Executing manual test cases
Team Foundation Server
• Managing user stories with the Agile Process
• Managing features with the CMMI Process


Read more on Jeff Blog :

http://blogs.msdn.com/jeffbe/archive/2007/11/28/november-rosario-ctp-now-available.aspx


Regards,
Moustafa arafa

Monday, November 26, 2007

Part 2 : when ? where ? i have to use NotBot Ajax control

Hi Folks,

I got some questions regarding the using the NotBot Ajax control : Where we can use it ? when ? and some visitors requires the code to use this control.

The answer of when ? You have to plug NotBot Control on your business applications,if it uses Forms authentication then you can put it on Login Page,OW you can put it on your master page incase your site for anonymous users.

The answer of where ? You can drop it on your login page or your master page instead of putting it on each page of your applications or websites.

The code you have to put : (in C#)

protected void Page_Load(object sender, System.EventArgs e)
{
if (!NoBot1.IsValid())
{//trying to automate requests to the page....
// to do..............

}

Hope this helps.....

Regards,
Moustafa arafa

Part 2 : when ? where ? i have to use NotBot Ajax control

Hi Folks,

I got some questions regarding the using the NotBot Ajax control : Where we can use it ? when ? and some visitors requires the code to use this control.

The answer of when ? You have to plug NotBot Control on your business applications,if it uses Forms authentication then you can put it on Login Page,OW you can put it on your master page incase your site for anonymous users.

The answer of where ? You can drop it on your login page or your master page instead of putting it on each page of your applications or websites.

The code you have to put : (in C#)

protected void Page_Load(object sender, System.EventArgs e)
{
if (!NoBot1.IsValid())
{//trying to automate requests to the page....
// to do..............

}

Hope this helps.....

Regards,
Moustafa arafa

Wednesday, November 21, 2007

Secure your Website by using NoBot Control on asp.Net Ajax

Hi All,

Today i have used one of the important controls on ajax framework which secure my website/Application from automated attacks on your websites in away to hack your application without any human interaction.

NoBot is a control that attempts to provide CAPTCHA-like bot/spam prevention without requiring any user interaction. This approach is easier to bypass than an implementation that requires actual human intervention, but NoBot has the benefit of being completely invisible. NoBot is probably most relevant for low-traffic sites where blog/comment spam is a problem and 100% effectiveness is not required.


NoBot employs a few different anti-bot techniques:

1)Forcing the client's browser to perform a configurable JavaScript calculation and verifying the result as part of the postback.
2)Enforcing a configurable delay between when a form is requested and when it can be posted back.

NoBot can be tested by violating any of the above techniques: posting back quickly, posting back many times, or disabling JavaScript in the browser.


add it on your application and secure it by checking on NotBot status and add your custom behavior for catching website spams.

Read More :

http://en.wikipedia.org/wiki/Captcha

http://asp.net/learn/ajax-videos/video-141.aspx



Regards,
Moustafa arafa

Tuesday, November 20, 2007

CDO Error when creating Person Object

Dear All,

If you are using CDO DLL for Integration with Exchange server in your application,you might face problems when you are trying to initiate an object from CDO.dll Class Library.

i used to create contacts in exchange server,and my application was working fine with cdo.dll after migrating to vs 2005,the cdo stop working,after alot of investigation,i found that the dll wasn't registered on .net framework 2.0 and register on .net framework 1.1,this is one of my bad luck...and to see the related posts,kindly visit below links :

http://forums.asp.net/p/1002362/1996021.aspx#1996021

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=310987



ex.Message "Retrieving the COM class factory for component with CLSID {CD000107-8B95-11D1-82DB-00C04FB1625D} failed due to the following error: 80040154." String

to fix it,register the cdoex.dll on .net framework 2.0 :

regsvr32 cdoex.dll

This will fix the problem..........


Happy .Netting.



Regards,
Moustafa arafa

Wednesday, November 07, 2007

ASP.Net 2.0 Tip : CSS is not applied on my aspx page

Hi Folks,

You might face this problem on asp.net 2.0,if you create an aspx page and you reference the css file on the header of this page,you will face that the css classess are not applied on that page even if the css reference is right.

And css link is working on other pages but is not working on the new created page.

The workaround of this issues is to remove the below line of the html code :



!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"


this will instantly apply the css classes on your page.

Happy .Netting..... :)


Regards,
Moustafa arafa

Tuesday, November 06, 2007

Release of VS 2008 & .Net 3.5 by the end of november

Hi All,

For those who didn't go to TechEd 07 this year which is running nowadays,MS Announced the release date for VS 2008 and .Net 3.5 by the end of november this year.

It is amazing specially the release of .Net 3.5 which has alot of enhancement and new features which doesn't exist on .Net 3.0.

Read more on MS Press :

http://www.microsoft.com/presspass/press/2007/nov07/11-05TechEdDevelopersPR.mspx


Regards,
Moustafa arafa

Sunday, November 04, 2007

Next Event : TechNet & MSDN Road Show @ Gulf

Hi Folks,

Execlusive to my blog readers,the agenda of Gulf TechNet & MSDN Roadshow.

Next Event will be held on Gulf during november-Dec based on your location.

Register now :

https://profile.microsoft.com/RegSysProfileCenter/wizard.aspx?wizid=e1dcb941-a365-4d4b-8e0f-1c3a8946ecb1&lcid=1033

For Kuwait : its on 14th of November 07 - Movenpick
Read more on the event site .


Dates

City Venue Date
Kuwait Movenpick Hotel Wednesday Nov 14th
Oman Shangri la Hotel Saturday Nov 17th
Bahrain Sheraton Hotel Monday Nov 19th
Dubai Habtoor Grand Hotel Tue/Wed Dec 4 & 5
Qatar Intercon Hotel Sunday Dec 9th

Agenda


TechNet Track Speakers MSDN Track Speakers
Session 1 - UC
Session 2 - WS08 First Look at Visual Studio 2008 - Part I

First Look at Visual Studio 2008 - Part II


Lunch
Session 3 - System Center Configuration Manager
Exploring the Building of Software + Services Applications
Session 4 - Data Protection Manager Best Practices for Team-Based Software Development
Break
Session 5 - Virtual Machine Manager IIS7, Orcas & Team System
Session 6 - SQL Server Building Silverlight Applications Using .NET
Closing and Raffle Closing & Raffle




Regards,
Moustafa arafa

Sunday, September 30, 2007

Astoria

Hi Folks,

New tool has been shipped to expose your data on your applicaitons as Data Services,These data services can be used by Ajax web enabled applications.
This tool provdes the facility to expose your data over HTTP which is an added value for your application to easily consume the edata exposed by Astoria SDK.



Download Sept CTP :
http://www.microsoft.com/downloads/details.aspx?FamilyID=0FA1413C-CB55-4577-960E-0F3491847F58&displaylang=en

Regards,
Moustafa arafa

Thursday, September 27, 2007

VSTS Mind Map

Hi Folks,

You can check VSTS Mind Map which contains alot of resources,Guide,Blogs...etc and all related to VSTS.

Check it :

http://www.cshost.members.winisp.net/blog/vstsresources.html

Regards,
Moustafa arafa

Tuesday, September 25, 2007

Ajax Activity Loading Controls

Hi Folks,

if you want to get nice gif files you want to use in the progressBar control,simply check the below checks :

http://mentalized.net/activity-indicators/
http://www.ajaxload.info
http://www.napyfab.com/ajax-indicators/

Enjoy to use them all....its free.




Regards,
Moustafa arafa

Sunday, September 16, 2007

Free Blog Engine

Hi Folks,

I have found new and open source Blog Engine built on .Net with source code.

Download url:

http://www.codeplex.com/blogengine/Release/ProjectReleases.aspx?ReleaseId=4459


Regards,
Moustafa arafa

Friday, September 14, 2007

Groove vs. Sharepoint

Hi All,

Big confusion between 2 MS Products : MS Groove Server and MS Sharepoint Server.

There is a big difference between the 2 products,and since there are similarity on as a collaboration solution but still the projects size which are handled by both products are really different.


Read More about the difference:
http://www.microsoft.com/midsizebusiness/businessvalue/groove.mspx



Regards,
Moustafa arafa

Thursday, September 06, 2007

MSDN Gulf newsletter Issue 2

Hi Folks,

MSDN Gulf newsletter issue 2 has been released......subscribe.

http://www.microsoft.com/middleeast/msdn/newsletter/Aug2007.htm


Regards,
Moustafa arafa

Friday, August 31, 2007

WCF Developers,What's new on .Net 3.5 March CTP

Hi Folks,

One of the most important questions for all .net developers,since most of the developers are new on .net 3.0 and its technologies,and meanwhile they heard on .Net 3.5 Beta releases and CTP (now March CTP is availble),to know main changes and difference/fixes and new features on .Net 3.5,i will advice all of you to read Thom Robbins Blog Post for the details of the changes on .Net 3.5 :

http://blogs.msdn.com/trobbins/archive/2007/02/28/microsoft-pre-release-software-visual-studio-code-name-orcas-march-2007-community-technology-preview-ctp.aspx

Hope this helps... :)

Regards,
Moustafa arafa

Sunday, August 26, 2007

Problem when installing SQL 2000 Reporting services with .Net 2.0

HI Folks,

if you have .net 2.0 on your server and you want to install SQL 2000 Reporting services, the installation will show that ASP.NET 1.1 is not registered on your web server even if you run aspnet_regiis command for asp.net 1.1 on yor web server.

To resolve this problem :

1) Un Install asp.net 2.0 from your web server by running the command :
aspnet_regiis -u

2) Register asp.net 1.1 :
aspnet_regiis -i

3) Install your SQL 2000 Reporting Services.


4) install your asp.net 2.0 on your web server.
aspnet_regiis -i



Hope this helps.

Regards,
Moustafa arafa

Thursday, August 23, 2007

Loading Controls Dynamically problem on ASP.Net 2.0

Hi Folks,

If you load your controls dynamically on asp.net 2.0 web site,you will face a problem that all handlers of server side controls doesn't work and not fire on the server side.

Even you try to put a break point on your server side handler,it will not fire,this is not because of a problem on any of your user controls or your code has something wrong.

the problem is : if you try to write the same line of code on asp.net 1.1 web application this problem will not happen at all,and if you tru to load the same controls on asp.net 2.0 web site the problem will happen.

The solution and Tip for this problem,is to just give an ID for your user control which will be loaded dyamiccly,and the problem will not happen.

This the code which run on asp.net 1.1 perfectly and doesnt run on asp.net website :

C#:
PlaceHolderID.Controls.Clear();
Control c = Page.LoadControl(”UCPath”);
PlaceHolderID.Controls.Add(c);


The Solution :
C#
PlaceHolderID.Controls.Clear();
Control c = Page.LoadControl(”UCPat”);
c.ID = “IDForYourControl“;
PlaceHolderID.Controls.Add(c);


Hope this helps.

Read more on the problem and the solution on Scott Blog :
http://scottonwriting.net/sowblog/posts/3962.aspx







Regards,
Moustafa arafa

Sunday, August 19, 2007

Mount your ISO Images on Vista

Hi All,

I tried to mount ISO images and image files on windows vista,and i try all tools i used to mount images and it didnt work on vista.

i looked for a new tool,i found a free new tool to mount your images and ISO files on vista,easy to use...download it now :

http://www.howtogeek.com/howto/windows-vista/mount-an-iso-image-in-windows-vista/


Regards,
Moustafa arafa

Tuesday, August 14, 2007

WCF Security Limitations

Hi Folks,

i discovered some points which you have to take it in your consideration if you are working to deisgn a WCF solution,specially the security issues with WCF :

1) You can't apply Message Level security with WCF Streaming which is used to pass Large binary data between the service and WCF Clients.

2) In Case you want to apply WCF Streaming on your WCf Host,you have to change your security level from message to transport level.

3) Maximum received message size to a WCF service is 64 KB;if the message exceeds this limit size the WCF runtime will throw an exception.

Note : if you want to increase the Max. Message Size,on the Bindings properties you can change/increase the message size as per your request.


Hope this Tips helps WCF Architect and Developrs :)

Regards,
Moustafa arafa

ASP.Net 2.0 Data controls Tutrials

Hi all,

New Data Tutorials for asp.net 2.0 and VS 2005 has been published for free......Must Read them all...............

http://weblogs.asp.net/scottgu/archive/2007/08/08/great-new-asp-net-2-0-data-tutorials-published.aspx

Hope this helps.

Regards,
Moustafa arafa

Implementing a WCF Service with High Performance

Hi Folks,

WCF gives the developer the tools to provide high performance for your WCF Service,once of the key features to provide high performance WCF Service caled "Service Throttling";this concept simply provide you the values you want to set to manage the following:

1) Maximum Concurrent sessions.
2) Maximum Concurrent Calls.
3) Maximum Concurrent Instances.

These values should be set on the host app of the service,and the admin has to monitor the server which host WCF Services to monitor the perfomance of the running WCF services.

To Implement Service throttling on your service,you have to write this code before open the serviceHost Object :

// Required for the ServiceThrottlingBehavior class
using System.ServiceModel.Description;

ServiceHost host = new ServiceHost(…);
ServiceThrottlingBehavior throttleBehavior = new ServiceThrottlingBehavior();
throttleBehavior.MaxConcurrentCalls = 40;
throttleBehavior.MaxConcurrentInstances = 20;
throttleBehavior.MaxConcurrentSessions = 20;
host.Description.Behaviors.Add(throttleBehavior);
host.Open();


Note : that we set these values before open the servicehost object.

Take care of the following Tips :
1) Default Concurrent Instances is Int32.Max = 21474836467
2) Default Concurrent Calls is 16
3) Default Concurrent Calls is 10


Hope this helps for WCF developers :)




Regards,
Moustafa arafa

Sunday, August 12, 2007

Why Choose Team System ?

Hi All,

Alot of customer in the market still need to know the value of using Team System in your environment;Implementing TeamSystem in your organization is not just a developer tools,it manage the SDLC andincrease the productivity of your teams.

please read more on this,by reading the use cases of Team System on 1 central Place :

http://msdn2.microsoft.com/en-us/teamsystem/bb676820.aspx

Note : First CTP of Rosario (August CTP)- Next version of Team System is available here :

http://www.microsoft.com/downloads/details.aspx?FamilyId=8450EFF5-24AD-44C3-AB91-1ED88EF2F4F0&displaylang=en


Regards,
Moustafa arafa

Wednesday, August 08, 2007

Reliable Sessions on WCF

Hi folks,

WCF give a greate feature called Reliable Session,when you enable the reliable sessions on your service and your clients,you give your clients a very great advantage which is the client app can sends messages to the Service without waiting for the service reply.

One will ask ? what's the harm for the client app to wait for Service reply ? if the service is busy,and client will wait and blocked until getting the response fro mthe service.and if you put a timeout for your bindings,then excpetion will be thrown against your client.

another point,in cases like client wants to invoke the serivce and doesnt want to wait,you will use the OneWay operation attribute on your service but this will lead to the blocking of your client until getting the response.to avoid this just enable the reliable sessions property on your bindings on the service and the client.

Note : mark your serivce as ConcurrencyMode.Multiple attribute will not avoid the client blocking,but it will change the way of the serivce how it deals with the incoming messages since the default mode for all services is single threaded.


Hope this tips helps........... :)



Regards,
Moustafa arafa

Reliable Sessions on WCF

Hi folks,

WCF give a greate feature called Reliable Session,when you enable the reliable sessions on your service and your clients,you give your clients a very great advantage which is the client app can sends messages to the Service without waiting for the service reply.

One will ask ? what's the harm for the client app to wait for Service reply ? if the service is busy,and client will wait and blocked until getting the response fro mthe service.and if you put a timeout for your bindings,then excpetion will be thrown against your client.

another point,in cases like client wants to invoke the serivce and doesnt want to wait,you will use the OneWay operation attribute on your service but this will lead to the blocking of your client until getting the response.to avoid this just enable the reliable sessions property on your bindings on the service and the client.

Note : mark your serivce as ConcurrencyMode.Multiple attribute will not avoid the client blocking,but it will change the way of the serivce how it deals with the incoming messages since the default mode for all services is single threaded.


Hope this tips helps........... :)



Regards,
Moustafa arafa

OneWay Operation in WCF

Hi Folks,

This post is showing one of the key important features available on WCF as a unified Communication platform,as a .net developer you can read this post and understand the changes and theu pdates that have been done on the WCF.

Simply,WCF is to create WCF Services,these services can be consumed or used by client app.

if you are familiar with Web services,you can understand the idea of this post wich is the OneWay Operation in WCF.

simply Operation is your service or function in your service;since your service can have more than operation .

What does "OneWay operation WCF " ? it means when the client try to consuem oyur service,it doesnt need to wait to get the respornse of the service.

this is cool,this means that it gives the same behavior of the asynchronous call on Web Services;but since we have more than 1 way to implement Asynch Call in the WCF;this one of the options.

How to mark your operation as a OneWay Service

[OperationContract(IsOneWay = true)]
void MyOperation(string id);


Cons :

The OneWay Operation has to be Void and you cant return any value or even valyes by ref or out parameters.


Tip : in case you choose your operation as a oneway operation,dont forget to put the Receive and Ope Time out properties on the Binding Information of the WCF service.




Regards,
Moustafa arafa

Get Started with Team FoundationServer

HI,

if you are beginer or welling to learn all Ins/Out of TFS,simply download this guide from TFS Product team andread it.

This guide is enough without going to buy another resource as a start.

http://www.codeplex.com/TFSGuide


Regards,
Moustafa arafa

Wednesday, August 01, 2007

Great News : TS Web Access is available

Hi Folks,

MS has released Team System Web Access,now its available to download :

http://www.microsoft.com/downloads/details.aspx?familyid=2105C9EE-565E-47B9-A5AC-9A8FF8A07862&displaylang=en

Great Tool.............I will not use Team Explorer / Team Plain Any More :)



Regards,
Moustafa arafa

Tuesday, July 31, 2007

Managing your WCF Service Context & State

Hi Folks,

when you create a host for your service,this host manage the context of the service and its states,for this reason,you have to take care how can you configure your host to keep your service under control without any issues regarding the security or performance.

One point regarding the Service performance which is the Service Context:did u ask your self if 1000 Clients call your service ? how manay instances will be created from your service ?

To answer this question,you have to know which mode are your setting your service to work with.

1) Per Session Mode :

How to Implement : Mark your service class with this attribute

C# : [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession)]

Answer : 1000 sessions will be created.

2) Per Call Mode :

How to Implement : Mark your service class with this attribute

C# : [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]

Answer : Per call the host will create an instance for your service.
This mode give better performance incase the client still opened and not active rather than the prev. mode.

3) Single Mode :

How to Implement : Mark your service class with this attribute

C# : [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]


Answer : 1 instance and all clients can share data between them.

Hope this helps.


Regards,
Moustafa arafa

Sunday, July 29, 2007

Breaking and Non-Breaking change on WCF service

Hi Folks,

In this post i want to mention and differentiate between 2 types of changes on any WCF service.

when you are developing a wcf servive,the changes might occur,and before any change you have to test and examine does this change will affect the service clients ?

The changes you have done on a WCF Service,it will affect the client anyway,but the type of the change it might break the client which yield to the client will not work OR it might yield to the client can continues working in a healthy way.

NON Breaking Changes:
Implicit or Explict security checks,change on the logic of the function,add extra binding configuration...etc

Breaking Changes:
Change Method paramaters , Add new paramaeters,change return types,delete methods.

Any Change which will break the client,you have to inform the client owner with the change you have done,to keep the client working.

Hope this helps.


Regards,
Moustafa arafa

Wednesday, July 25, 2007

Monitor your WCF Services

Hi Folks,

if you are a WCF Developer / Analyst,and you want to trace all messages between your WCF Services and theri clients,MS Provide a tool to monitor and trace all SOAP Messages between the services and its clients called "Service Trace Viewer"

TO Open Service Trace Viewer Tool :

C:\Program Files\Microsoft SDKs\Windows\v6.0\Bin), and then type SvcTraceViewer.exe.

Files Supported by this tool :
**WCF Tracing File (.svcLog) -> this will be used for tracing purposes on your WCF Apps.

**Event Tracing File (.etl)
**Crimson Tracing File


Read more on Service Trace Viewer :
http://msdn2.microsoft.com/en-us/library/ms732023.aspx


Regards,
Moustafa arafa

Thursday, July 19, 2007

New SDKs : WSS 3.0 SDK & MOSS 2007 SDK

Hi Folks,

New SDKs has been released for SBS 2007 and for WSS 3.0.

Download link :

SBS 2007 SDK :
http://www.microsoft.com/downloads/details.aspx?FamilyID=6d94e307-67d9-41ac-b2d6-0074d6286fa9&displaylang=en

WSS 3.0 SDK :
http://www.microsoft.com/downloads/details.aspx?FamilyID=05e0dd12-8394-402b-8936-a07fe8afaffd&displaylang=en

Enjoy!


Regards,
Moustafa arafa

Tuesday, July 17, 2007

Top 10 Gems in SQL 2005

Hi All,

Excellent article which highlight some features on SQL 2005 which weren't get the spot on the webcasts,articles and SQL Demos.

http://www.microsoft.com/technet/prodtechnol/sql/bestpractice/gems-top-10.mspx

Thanks my Friend ali Riza for his useful post.
http://www.dotnetking.com/TechnicalComments.aspx?LogID=299

Hope this helps.......... :)

Regards,
Moustafa arafa

Monday, July 16, 2007

Bug on VS 2005 on installing the default installer

Hi Folks,

if you create your windows service,and u add the project deployment package and you try to install it from the VS.Net by right click on the deployment packge and install,this will not show the service in the services list on windows,even the installer says the service has been successfully installed.

the only thing u can do to install your service in the services in windows,run this command :

installutil YOUR_SERVICE_NAME_PATH.

this will show the service on the services list.

Hope this help.

service
Regards,
Moustafa arafa

Deploy a windows service in VS 2005

Hi Folks,

Below article show how to develop/Debug and deploy a windows service.

http://aspalliance.com/1316_Working_with_Windows_Service_Using_Visual_Studio_2005#Page2


Hope this helps.


Regards,
Moustafa arafa

Mid function in VB.net for C# Guys

Hi C# Devs,

I want to convert one of the vb.net code functions to a c# solution for some requirments ,i found on the code the usage of Mid function as one of the important functions on the string manipulation for vb.net developers; as a C# guy,i need an equivelant to it,simply replace the mid function with the following :

VB.Net :
str2= Mid(str1, 1, Len(str1) - 1)
C# :
str2=str1.substring(1);


substring function is the equivelant to Left,Right,Mid functions for VB.Net developers.

VIVA C#.................. :)


Regards,
Moustafa arafa

Tuesday, July 10, 2007

Recover SQL 2005 DB passwords

Hi Folks,

I got an urgent request of one of my friends asking for a solution to recover SQL 2005 DB passwords,the situation was as follows:

He took a backup of SQL 2005 DB and set the password option on SQL 2005,and when he tried to restore the DB,SQL 2005 request the password which he forgot it.

My First question was: did he protect the bak file from SQL 2005 or not ? after i got that he protect the DB from SQL 2005,i started to search for third party solution to fix this problem since this DB contains very sensitive information.

I found a third party to recover the SQL 2005 user accounts passwords ,try it now :
http://www.safe-install.com/programs/sql-password.html

The security hole which i discovered that this program can't recover the SQL server passwords if the SQL Engine was configured to use only Windows Authentication Mode; and this is considered as an important security point when we use MS Products with Windows Authentication mode ONLY.

From this post,you have to take care of your SQL installation which mode is an appropriate to your organization.
Hope this helps.

In case you put the password on the bak file,then no way to do any kind of restore to this DB;see more on this article : http://mssqltips.com/tip.asp?tip=1108


Regards,
Moustafa arafa

Sunday, July 08, 2007

Protecting your WCF Service

Hi Folks,

.Net Framework built a robust framework for building distributed application by providing different security means to protect your WCF Service.

you can protect your WCF Service by 3 different ways which is most requested for all different kind of applications :

1) Windows Role Token group based on Active Directory Group.
2) SQL Role Provider: user roles stroed in a DB.
3) Authorization Role Provider : using MS Authorization manager tool.
** This tool let you store the roles in the AD or XML file.

Happy .netting.



Regards,
Moustafa arafa

Monday, July 02, 2007

.Net 3.0 & .Net 2.0 Design Tips














On the above figure it shows the following:

1) New Technologies coming with .net 3.0 Framework (CF,WF,PF,CardSpace).

2) The Base of .Net Framework 3.0 working on the .Net Framework 2.0,this means any application on 2.0 will not have any interoperability issues or problem to work on .net 3.0 unlike the shift between .net 1.0 to 2.0.

3) Move from Web services to WCF :
-System.ServiceModel is the namespace which provides the whole funcaitonality of WCF.
-Implementing the interface and the implementaiton clsses to implement a WCF service.
(Service Contract,Operation Contract,DataContract)
- Binding information on the web.config,Transport protocol,Endpoints information.

- using svcUtil tool to create proxy classes and clients to your service.

-Integration with COM+,WS,MSMQ,.Net Remoting....etc with WCF







Thursday, June 28, 2007

4 Tenets of Service Orientation

Hi Folks,

This post is to show and describe the 4 tenets of SOA and how is it implemented in WCF Technology in a way,how can WCF to avoid the wellknown pitfalls of using current technologies such as (WSE):

1) Boundaries are explicit :
Applications is communicating to each other by sending and receiving messages to each other.

2) Services are autonomous: you can't control any service out of your organization boundaries.
Your solution should be loosly coupled ,so it can tolerate these changes and continue running if one or more services are un available.


3) Services share schema,contracts not classes or types: simply each service publish the schema of the data which will be exchanged between the service and clients and how can be binded to the clients,these information is used by clients to consume the published services.


4)Compatability is based on policy:Schemas and contracts exposed by the service is define the "Shape" of the service.

if you familiar with WS Enhancements,it has its specification on WS-Security,WS-Interoperability....etc which has been encapsulted into the WCF unified platform.


From Introducing WCF- MS Press

Regards,
Moustafa arafa

Tuesday, June 26, 2007

Deploy WSS 3.0 Web Part

Hi Folks,

This post i will explain how can you dpeloy a wss 3.0 webpart to your shareporint server.

the steps as follows:

1) on your class library,open project properties.
2) select signing tab.
3) check sign assembly check box and select new,and give your snk file a proper name , Close and save.

You will notice that a new snk file has been added to your solution which is used to sign your assembly and give it a strong name.

4) Dont forget to build the dll to be signed with the created strong file name.
5) add your strong name assemly to the GAC using VS command line

GacUtil -i MyAssembly.dll

You can check that the file assemly has been imported to GAC y navigating to :
C:\Windows\assembly

you will find your dll,this means that your string name dll has been imported successfully to GAC (Global Assembly Cache)

6) Right click on your srong name assembly and select properties,and copy the public token.

7) Create a manafiset file in your project "Manifest.xml"

8) Paste the public token you have saved to the PublickKeyToken attribute under safeControls element in Manifest.xml file.

9) Manifest.xml file should be Content file on the build action property on VS.

on the above steps,your web part is ready to be packaged up to the shareporint server,to create the cab file of this webpart do the following:

10) add a new project, Cab Project.
11) add the primary output / content files to the Cab Project.
12) Build the CaB Project.
13) after building the CAB Project,Rename it to wsp (SharePoint solution file).
14) Take this file (wsp) and insert it using SBS admin tools :
stsadmin -c addsolution -filename MyWebPartCab.wsp

15) On Solution Management on SharePoint Central administration site, you will see the imported solution file which oyu have did on the previous step.

16) Select the solution and click on Deploy Button.


Now you have finished deploying your webpart and you can add it to any web application in your WSS Sites.

Add our webpart to your site on any webpart page,if you didnt find it,add it by clicking on new button on the web parts gallery list.


Hope this helps and descriptive.

Regards,
Moustafa arafa

Monday, June 25, 2007

Gulf MVP Summit @ 21 June

Hi All,

This is a photo to me with Charbel Fakhoury (MS Gulf GM) during giving us our give aways on Closing session of Gulf MVP summit.

Thanks AMR (my MVP Lead) for this excellent photo.

I like this photo alot,and to see more,visit my personal space:
http://marafacs.spaces.live.com/






Sunday, June 24, 2007

Gulf MSDN Flash Newsletter Issue 1

Hi All,

Gulf MSDN Flash newsletter has been published issue #1,

http://www.microsoft.com/middleeast/msdn/newsletter/June%202007.htm

Check it and subscribe on it,and check my articles there.

Under MVPs section you will find my articles.

Regards,
Moustafa arafa

new community has been launched in Riyadh

Hi folks,

New Community has been launched in Riyadh called Mobarmij,for those who doesnt know what does "Mobarmij" means? it means Programmer and its an arabic word which is equivelant to Programmer in english.

I have introduced this community in Gulf MVP Summit in Dubai 21 June 07 In one of the summit sessions called "Coming soon with MVPs", and hope all success for its board members.

http://www.mobarmij.net/




Regards,
Moustafa arafa

Tuesday, June 19, 2007

Get Latest Version while Check Out on VS 2005

Hi Folks,

This post is to highlight one of the important thing you have to take care when you upgrade your Source Control System from VSS to TFS,one of the major changes between both products is Checkout action is different than its behavior on VSS.

On VSS,Check out action get Silent Get latest action on the same action.

On TFS,Check out doesnt get latest of your files.

This feature is not available on V1 of TFS & VS 2005 and this will be availble on Orcas.

As a Temporarily solution,you can download an add-In to do that for you,Get Latest while checkout your files in TFS........

AddIn Download Link :

http://www.codeplex.com/TfsAddInCheckOut


Hope this helps.














Regards,
Moustafa arafa

Monday, June 18, 2007

Project Server 2007 VSTS Connector

Hi Folks,

New Connector is available for TFS with Project Server 2007..... Try It now.

http://www.codeplex.com/pstfsconnector


Regards,
Moustafa arafa

Sunday, June 17, 2007

New AJAX Control ToolKit has been released

Hi Folks,

New Tool kit has been released with alot of enhancements and new controls as well,read more :

http://weblogs.asp.net/scottgu/archive/2007/06/08/new-asp-net-ajax-control-toolkit-release.aspx

Enjoy with AJAX :!

Regards,
Moustafa arafa

Wednesday, June 13, 2007

WSS sites Customization in TFS

Hi All,
If you want to customize the created portal over WSS installation,read this post on MSDN forums,its very useful to give your sites the same Look & Feel on your process documents template site.

read this post on MSDN Forums :
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1726035&SiteID=1&mode=1

Hope This Helps.

Regards,
Moustafa arafa

Saturday, June 09, 2007

DataContract Vs. Service Contract

Hi All,
In WCF,Some new terminolgies are come up for .Net Developers,but not for COM,DCOM developers,Since the developers who are familiar with developing Dist. Application used to divide their code to interface and implementations.

The same concept is exist on WCF Tech.,Since the devleopers should divide his servce to :
1- Data 2- Operations.

**Data represented by creating DataContract which expose the data which will be transefered /consumend from the serive to its clients.

**Operations which is the functions provided by this service.

To write an operation on WCF,you have to write it as an interface,This interface contains the "Signature" of the methods tagged by ServiceContract attribute,and all methods signature will be impelemtned on this interface tagged with OperationContract attribute.

and to implement these serivce contract you have to create a class which implement the interface and the actual implementation will be on that class.


Code Below show How to create a Service Contract:

[ServiceContract]
Public Interface IEmpOperations
{
[OperationContract]
Decimal Get EmpSal(int EmpId);

}

Class MyEmp: IEmpOperations
{
Decimal Get EmpSal()
{
// Implementation of this method.
}
}

Hope now you can differentiate between Data Contract,Service Contract and OperationContract.


Regards,
Moustafa arafa

DataContract attribute in WCF

Hi Folks,
This is the First post of WCF in my blog,i was little busy with Team System Blogging :),anyway,let's assure one of the first important aspects of WCF programming which is "Contract First" Approach,This approach let the developer or Architect to design his service before starting developing it.
First thing you will do when you create a WCF is creating the Data Contract,which is the Contract that specifies the data will be exchanged between the service and it clients,suppose we need to create a WCF serice which expose Employee Data,The Data Contract will be as follows:

namespace Emp
{

[DataContract]
Class Employee
{
[DataMember]
int EmpId;

[DataMember]
string EmpName;

[DataMember]
string DeptName;
}
}

DataMember attribute you have to put it on each data member in the class in case you want to serialize and deserialize this member which is used on passing or retireving data from this data contract.

DataContract Attribute can be applied on :
1) Classes.
2) Enumerations.
3) Structures.


Hope This helps.

Regards,
Moustafa arafa

Wednesday, June 06, 2007

TFS Migration and Synchronization Toolkit

The purpose of the TFS Migration and Synchronization Toolkit is to enable customers of Team Foundation Server to build custom tools that enable migration and synchronization from competitor version control (VC) and work-item tracking (WIT) systems. By enabling this migration and synchronization we will be enabling the adoption of TFS to a broader audience.

Download it now :

http://www.codeplex.com/MigrationSyncToolkit/Release/ProjectReleases.aspx?ReleaseId=3540

Regards,
Moustafa arafa

Scrum for Team System

Hi All,

I found newly that you can download Scrum Process Guidance for Team System,and use it plus the existing process guidance MSF & CMMI in TS.

Read more on Scrum Process Guidance,below link:
http://scrumforteamsystem.com/ProcessGuidance/ProcessGuidance.html


Regards,
Moustafa arafa

TF42042: Failed to connect to the drop location

Hi Folks,


This post to show a Trick when you try to Start build in the TFS and you get this error when you try to start your build in TFS.


Make sure of the following :

1) the network path is created and shared.

2) not network connectivity problem.


And this trick is : this folder should be shared and give full previliges not to you even you are an administrator on the drop location,you have to give full access to the tfsSerivce account to that shared folder.










Regards,
Moustafa arafa

SilverLight Learning Guide

Hi All,

Get Started with SilverLight by using this learning Guide :

http://searchvb.techtarget.com/generic/0,295582,sid8_gci1256287,00.html?track=NL-462&ad=591788&asrc=EM_NLN_1537243&uid=3143005

Hope it helps.

Regards,
Moustafa arafa

Tuesday, June 05, 2007

The Evolution Of LINQ And Its Impact On The Design Of C#

The Evolution Of LINQ And Its Impact On The Design Of C#: "LINQ gives allows developers to take advantage of the power of queries. Find out how it came to be."

using Asp.Net Admin Tool on production

Hi Folks,

i found a very interesting article for using asp.net admin configuraion tool with out using VS.Net 2005,This post is show how can you configure your server to use asp.net admin tool on your production server and how to configure it as well without building asp.net membership interface on each application......its really cool Trick.....

http://blogs.msdn.com/joestagner/archive/2007/05/25/asp-net-membership-admin-without-visual-studio.aspx

Thanks Jeo for this Trick..................

Regards,
Moustafa arafa

Wednesday, May 30, 2007

MS Process Editor Bug !!

Hi All,

This post i will show a bug in MS Process Editor, When you try to customize the Process (Workitems Types,Iteration,.....etc) when you try to create a new project with it,you will get an error,this error will be customized based on the customized portion in yur process:
1) Iteration Error or
2)Tasks Error or
3)Work Type Error.

if you want to produce this error ,Do the following:


1) Open Your process.


2) Delete and modify the existing iterations.


3) Upload your Modified Process.


4) Try to create a project using this Process Template,and you will get this error :


Click on the Log File,The first exception is :


---begin Exception entry---Time: 2007-05-30 11:50:22ZModule: Work Item TrackingEvent Description: TF26214: Cannot save the work item. Fields with errors: Iteration Path,IterationIDException Type: Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationExceptionException Message: TF26202: Validation failed. Field 'Iteration Path' not supported.Stack Trace: at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem.PreValidate() at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem.PreBatchSave() at Microsoft.TeamFoundation.WorkItemTracking.Client.BatchSaveHelper.BatchSave(WorkItem[] items)--- end Exception entry ---





The Fix for this problem, The Editor doesn't change the other files which use the old values and when the TFS try to create the project it searchs for the old values which is not exist on the updated xml file.

This error usually happens on the "workitems.xml" which conatains a default tasks for each project,if you see the below work item :



Iteration 0"/>







Iteration value is wrong which makes this problem happen when you create new project in the TFS.


You might face the problem with Other customized items on the TFS.


Hope this helps.


Regards,
Moustafa arafa

Tuesday, May 29, 2007

Deploy AJAX ASP.NET Application

Hi Folks,



when you try to deply AJAX ASP.Net application make sure ofthe following :



1) on IIS,the web site select asp.net 2.0.

2) on IIS,Make sure the Execute Permssion under Home Directory tab is Scripts Only.

3) AJAX Runtime should be installed on the production since it doesn't contains the extedability dlls used by ajax such as System.Web.Extensions.dll.



see the below error if you didnt install the AJAX Runtime on the production.

























Regards,
Moustafa arafa

Enable ATLAS/AJAX on your ASP.Net 2.0 Application

Hi Folks,

In This post i want to change the type of my posts by submitting ASP.NET post instead of long period of TS posts ;),I will describe the steps you need to enable AJAX on an Existing ASP.Net 2.0 application not a new ASP.NET AJAX Enable Application.

In Case you want to enable AJAX on your existing asp.net 2.0 application,first you have to install ajax 1.0 extensions from asp.net website,the download link:
http://ajax.asp.net/default.aspx?tabid=47

Then after install it,do the following steps :

1) Add reference to ajax control kit DLL file to your project "AjaxControlToolkit.dll",you can find it once you install the Toolkit on the Sample Website on the installation path.

2) Very Important : Change your web.config since your project will not work,copy & paste the sections from the existing web.config file.

you can get a sample web.config by creating new ASP.NET AJAX Enabled WebSite.

With above 2 steps,your project will run without any errors,proceed to the following to drag & Drop AJAX Controls visually.

3) On Toolbox window,add new tab,name it AJAX Control.

4) Open the created tab and right click on the tab,and select Choose Items from the context menu.

5) Borwse to the location of "AjaxControlToolkit.dll".

Now,you have all AJAX Controls on the toolbox on VS 2005........... ENJOY !!!!!!!!!!!!!!


NOTE : Script manager should be added on the Top of each page you are using AJAX Controls or you can put it once on Master Page.


Enjoy with building Rich Internet Application RIA :)


This steps is valid only on AJAX v1.0 with VS 2005 ONLY,and doesnt consider using Orcas since it has AJAX as a built in features.


Regards,
Moustafa arafa

Sunday, May 27, 2007

TS Team Development Guide

Hi Folks,

MS Best practises Team has released new Guide for Team Development on TFS.....

Very Useful BDF File,Download it from CodePlex Now :

http://www.codeplex.com/TFSGuide



Regards,
Moustafa arafa

SnagIt- New Tool for TFS - Capturing Bugs on the Screen

Hi Folks,
New Tool has been released for TFS Called "SnagIt";SnagIt’s output for Team System lets you add screen captures to new or existing bugs with a single click. Stop trying to describe problems with tons of text – just show them. Plus, eliminate the hassle of attaching images!

COOOooool Tool download it now :
http://www.techsmith.com/snagit/accessories/teamsystem.asp



Regards,
Moustafa arafa

WI Creator 1.3

Hi Folks,
New tool has been released this month on 20 May ,This Tool allow you to create a new workitems on hierarchial way.

Download it ,

http://www.codeplex.com/wicreator/Release/ProjectReleases.aspx?ReleaseId=4378




Regards,
Moustafa arafa

Friday, May 25, 2007

New Tools for Developers & DBAs

Hi Folks,

New Tools has been released for Developers & DBAs.

SQL Server Migration Assistant for Access
http://go.microsoft.com/?linkid=6852361
Automates database migration from Access to SQL Server 2005.

SQL Server Migration Assistant for Sybase ASE
<http://go.microsoft.com/?linkid=6852362>
Automates database migration from Sybase ASE to SQL Server 2005.


Regards,
Moustafa arafa

Monday, May 21, 2007

change email address for TFS email alerts

Hi Folks,
TO change the email address for email alerts in TFS,do the following:
1) Go to IIS Manager on TFS Server.
2) Expand TFS website,Right Click on Services virtual directory.
3) on ASP.NEt Configuration you will find email notification key "emailnotificationfromaddress".











Hope this helps.

Regards,
Moustafa arafa

Max Attachement Size in TFS

Hi Folks,

In TFS the maximum attachement file size is 4,096 kilobytes by default,if you want to increase the file size, open your browser and put this URL :

:8080/WorkItemTracking/v1.0/ConfigurationSettingsService.asmx?op=SetMaxAttachmentSize">http://<>:8080/WorkItemTracking/v1.0/ConfigurationSettingsService.asmx?op=SetMaxAttachmentSize

you will find a webservie you can put the max. file size and click on invoke.......

Cool Tip in TFS :)

Regards,
Moustafa arafa

Sunday, May 20, 2007

TFS Security In Deep 1

Hi Folks,
This Post is to identify Security Tips in TFS best Practices :

1) Implicit & Explicit Permission in TFS:
When you try to manage Group Permission on TFS Server (Server Level or Project Level) you have 2 check boxes to allow/deny the permission.
when you check either allow/deny this is called you explicitly set the permission set.
when you leave the checkboxes un check this called your Implicitly Deny this Permission to the selected group.

2) Inheritence in TFS Security Permission Set:
In TFS,if the user belongs to 2 Groups and one Group has a permission to Create New Project and other doesnt have,The user will inherit this permission from one of those groups.
Note also that the permission on WSS or Reporting Services is not inherited in TFS.






















3) Manage The project Lead Permissions to on SQL Reporting Services:
Navigate to this URL :
http:// application-tier /Reports/Pages/Folder.aspx
Select Properties,Click on New Role Assignement,Put the Username (User Account Username) of the Project Lead and select Content Manager then OK

4) Manage Project Lead Permissions on WSS :
From Team Explorer Window,Select Project Portal, Site Settings,Manage Users, Add the username then select either Administrator Role then click add.



Hope This Tips helps :)


Regards,
Moustafa arafa

Wednesday, May 16, 2007

Enable Process Template Editor in TFS

Hi All,

To work in Process Customization in TFS you have to install TFS Powet Tool then you can use TFS Process Template Editor.

you can download TFS Template Editor from here :

http://www.microsoft.com/downloads/details.aspx?familyid=7324C3DB-658D-441B-8522-689C557D0A79&displaylang=en

Process Template Editor is one of the most important features added to your TFS installation,plus some very useful commnads.







Regards,
Moustafa arafa

TFS Power Tool

Hi All,

Microsfot has relased TFS Power Tools,this tool contasin alot of features and command line tools which is not available in the default TFS Installation of TFS Dvd.

Read more about the features and tools provided on it :

http://www.microsoft.com/downloads/details.aspx?familyid=7324C3DB-658D-441B-8522-689C557D0A79&displaylang=en

Enjoy with TS.

Regards,
Moustafa arafa

Tuesday, May 15, 2007

MS Project 2007 Bug with TS

Hi Folks,

THere's a bug when you try to update your workitems in the MS Project 2007 which are exported from Team System.

If you try to update the work item type with out clicking (attached image), you will get an error on you try to publish your work items.

Invalid work item type...








Regards,
Moustafa arafa

Monday, May 14, 2007

Tester window in Team System

Hi Folks,

This post for QA (Quality Assurance) / Testers and developers,coz it highlights some important windows available in VS Team Edition for Tester / Team Suite.

Tester has new windows to deal with Unit Tests,Load Tests,Manual Test..etc :

1) Test Manager to mange all your tests in the Test Proj.

2) Test View to view ordered list of all test.

3) Test Results to view if the test has been failed or not.




Regards,
Moustafa arafa

Sunday, May 13, 2007

TFS Proxy Tips

Hi Folks,
This post is to highlight some Tips & Tricks in TFS Proxy server in Installation and administration :

1)TFS proxy server should be installed for every remote office for oyur development team.

2)TFS Proxy installation is different than TFS installation and you can found it in the Proxy folder in the installation DVD.

3)Use Proxy Web Service to know the # of hits/files in cache and alot of other information which helps all development team members to monitor Proxy Cache.

4)Proxy server can read from multiple application tiers and you can configure that on the Proxy.Config File under Server Node.

5) CacheLimit Size Equation :
CacheLimit = (Availble Space + Cache Size)* Percent

Assuming the cache Limit pecent =50 %
The Equation is : CacheLimit = (Availble Space + Cahce Size)* 50/100

6)Cache Cleanup will start to run and free space in the TFS Proxy when :

Available Space is qual to Cache Limit



These are some Tips in TFS Proxy server :)


Regards,
Moustafa arafa

Saturday, May 12, 2007

IE Developer Toolbar

Hi Folks,
New tool has been released for all Web Developers,the tool name is "IE Developer Toolbar" :

These features enable you to:
-Explore and modify the document object model (DOM) of a Web page.
-Locate and select specific elements on a Web page through a variety of techniques.
-Selectively disable Internet Explorer settings.
-View HTML object class names, ID's, and details such as link paths, tab index values, and access keys.
-Outline tables, table cells, images, or selected tags.
-Validate HTML, CSS, WAI, and RSS web feed links.
-Display image dimensions, file sizes, path information, and alternate (ALT) text.
-Immediately resize the browser window to a new resolution.
-Selectively clear the browser cache and saved cookies. Choose from all objects or those associated with a given domain.
-Display a fully featured design ruler to help accurately align and measure objects on your pages.
-Find the style rules used to set specific style values on an element.
-View the formatted and syntax colored source of HTML and CSS.

download link :

http://www.microsoft.com/downloads/details.aspx?familyid=E59C3964-672D-4511-BB3E-2D5E1DB91038&mg_id=10120&displaylang=en



Regards,
Moustafa arafa

JOBS @ DotNet Boom Forums

3 DotNet Developers vacancy is available on DotNet Boom Forums,if you are interested , read more :

http://www.dotnetboombeta.net/portal/Support/Forums/tabid/63/forumid/3/threadid/4/scope/posts/Default.aspx



Regards,
Moustafa arafa

Thursday, May 10, 2007

Patterns & Practices Guidance Explorer

Hi Folks,

Download This Guidance from MS Patterns & Practices team ,it contains alot of articles,Tips and Tricks in alot of .Net Topics : .Net 1.1,2.0 ADO.Net , ASP.Net 1,2 and more.........

downlaod this windows application and navigate to your interested articles and topics :

http://www.codeplex.com/guidanceExplorer



Regards,
Moustafa arafa

Wednesday, May 09, 2007

Delete Project from TFS

Hi Folks,

This post is to how can you delete a project from TFS ?

1) Open C:\Program Files\Microsoft Visual Studio 8\Common7\IDE Folder
2) Open command line and open this path .
3) on the command line write the following command :

TFSDeleteProject /server:YOUR_TFS_SERVER Project_Name

Note :
You must be connected to Team Foundation Server before using TFSDeleteProject.

Use TFSDeleteProject to delete a team project from Team System when the project is no longer needed on the Team Foundation Server.

When you run TFSDeleteProject, the system places the source control data in a deleted state in the operational store. It does not actually remove the data from the database, nor does it reclaim the disk space. Also, the system does not remove the warehouse data originating from the team project.


Hope this helps.

Regards,
Moustafa arafa

Tuesday, May 08, 2007

Upgrade your TFS from Evaluation version to Licensed Version

Hi folks,

this post is to inform you that the steps you need to upgrade your TFS from Evaluation to Licensed one,its really easy steps :

1) Purchase/Got the License Key from Microsoft.
2) from Add Remove Programs,Just click on Remove / Change and select the upgrade option then put your licesed key......

Last step doesn't take more than 2 minutes.

Thanks MS for this feature.


Regards,
Moustafa arafa

Monday, May 07, 2007

VSS Converter

Hi Team System Guys,

This post is to point that there is a cool tool called "VSS Converter GUI" which gives you a graphical representation of VSS Converter Command Tool which is used on your migration from VSS to TFS.

Download this tool :

http://www.codeplex.com/VssConverterGui/Wiki/View.aspx

Don't forget to put the exe in the same folder of VSS Converter.exe file on your mahcine O.W. you will get an error meesage File.IO file not found exception.

Hope this helps...............:)


Regards,
Moustafa arafa

Extend your TFS Trial Version

Hi Folks,

Alot of people is asking for How Can they know when their TFS installation is being expired ? simply use this tool,to know when your version will be expired and how to extend it as well :)

A dialog will appear and you need to press the "Check" button. If you are within 10 days of expiration of a trial of TFS, and "Extend Trial..." button will appear in the lower left hand corner. Press that and your expiration date should be extended to 30 days from "today" (today being the day you run you click the Extend Trial button).


download the tool :

http://blogs.msdn.com/bharry/archive/2006/10/04/Last-word-on-TFS-Expirations-_2800_I-hope_2900_.aspx



COOL TOOL :)


Regards,
Moustafa arafa

Sunday, May 06, 2007

VS 2005 Team System for DB Prof.

Hi Folks,

This post is to inform you that VS 2005 Team System for DB Professional has been released on 1 Dec 2006,and ready to sell on 1 Jan 2007,This product was released by microsfot separately from the VS Team System Release.

if you want to download its add-ins simply visit the below link to download it :

http://msdn2.microsoft.com/en-us/teamsystem/aa718764.aspx

Take Care that this add-in is working only if you have VSTS Team Suite Edition ONLY.

Comparing schemas,monitoring DB activities and changes are the most important features for DB Professioanl Edition of TS.




Regards,
Moustafa arafa

Saturday, May 05, 2007

Disable Dynamic Port in ASP.NET 2

Hi Folks,

i got some iquiries about how developers can select specific port when they open asp.net website using FileSystem;this is simply be done by disable dynamic port in aspnet project.

open your aso.net website and on the project properties :

Use Dynamic Ports -> set it to False.

and specify the ports No if you want.









Enjoy with Asp.net 2.0.

Regards,
Moustafa arafa

Wednesday, May 02, 2007

Architect Terms in Visual Studio 2005

Hi Folks;
This post is for the architect who is working using VS 2005 for Architect Edition or Team Suite Edition.

On of the Important Tools for Software / Infrastructure Architect is to use Logical Data Center in your solution to design your project as per your environment.

When you create a new logical datacenter;you will find new controls in your toolbox,here is an verview for all of them :

1) Zones : you will find a description for it in DNB Portal :

http://www.dotnetboombeta.net/portal/Support/MicrosoftNetGlossary/tabid/75/ctl/Link/mid/416/ItemID/4/Default.aspx

2) End Points : when you add a zone in your design; you need to add for each Zone atleast 1 Inbound End Point to give any server inside this zone to accept inouts from external zones,and each zone may need an outbound zone to communicate with external systems.

End Points Types : Inbound ; OutBound ; BiDirectional.

You can add contraints to your End Point sunch as block some port #.


Regards,
Moustafa arafa

Customzing Process Templete in TFS

Hi Folks,

one of the most important features on Team System is the ability to customize the existing methodologies (Agile & CMMI) and add your own methodology.

To customize the process document; do the following :

1) Download any of the Existing process documents methodologies.
2) Add or delete any docuemtns you dont want;for example (Project Management folder;Requirements folder).

Before uploading your new methodology there's small Tricks :

1) You have to give your methodology a uniques name;O.W. you will get this message "Do you want to overwrite Agile Software Development Methodology" if you download it;this is because this name is taken from ProcessDocument.xml.
You have to edit node in this xml file to your methodology name.

2) Any Documents you will add or remove under Sharepoint services folder, you have to update corresponding xml file "wssTasks.xml" and remove the XML nodes o add your own with the same format on that XML.

HOPE THIS HELPS.

FEEL FREE TO CONTACT ME FOR ANY Team System CONSULTATIONS.




Regards,
Moustafa arafa

Monday, April 30, 2007

BUG in VS 2003 with MSSCCI 1.2 Provider in TFS

Dear All,

I'd like to share with you a problem on VS 2003 ONLY and not in VS 2005.

The bug as follows; if you install MSSCCI 1.2 Provider for TFS in VS 2003,you can't switch to VSS as a source control.

This problem will affect you because you can't open any project binded to VSS as a source control;it takes TFS as a default source control even if you change it from the TOOL-> Source Control Menu in VS 2003.

NOTE : This problem ONLY exist in VS 2003 and i tried in VS 2005 and its working fine.

I submitted this to VS Product Team as a bug;for now;to solve the problem;you have these options :

1) Either to change in the registry of your machine (I DONT RECOMMEND THAT).
2) Use Third party tools "SCP Selector" , here is the download url :
http://weblog.kilic.net/tools/SCPSelector/

Hope this is useful :)


Regards,
Moustafa arafa

Saturday, April 28, 2007

MIC Openings in Kuwait




Dear All,

This is an article for Vimal Sethi - DPE Group Manager in MS Gulf,talking about MS efforts during last year which yield to the opening of MIC in Kuwait,and the competitive advantgaes for kuwait in the gulf market which push MS to open MIC in kuwait.

Enjoy with the article,the article was publsihed in Al-watan newspaper on 28th april 07. url : http://www.alwatan.com.kw



Regards,
Moustafa arafa

Wednesday, April 25, 2007

Download Team Explorer for VS 2003

Hi Folks,

If you have VS 2003 and you want to integrate with Team Foundation Server (TFS),simply download "Visual Studio Team Foundation Server MSSCCI Provider.msi" provider if you have one of those development environment :

Instructions
Download and run Visual Studio Team Foundation Server MSSCCI Provider.msi on a computer with one of the following products:

Visual Studio .NET 2003
Visual C++ 6 SP6
Visual Visual Basic 6 SP6
Visual FoxPro 9 SP1
Microsoft Access 2003 SP2
SQL Server Management Studio
Sparx Systems Enterprise Architect 6.1
Sybase PowerBuilder 10.5
Toad for SQL Server 2.0

after you install this,don't expect to see the Team Expolorer window in VS 2003,but you will be capable to do the source control features available in TFS Sorce Control ,you can add the project to TFS,you can you any feature available in Source Control in TFS as well.

To Configure The TFS in VS 2003, open Tools->Options -> under Source Control ->SCC Provider.

you will notice also in the File Menu under source control you will see TFS Provider is added as a Source Control.

If you have any feedback,post it on this forum :
http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=478&SiteID=1

or send feedback by email to :
TFMSSCCI (at) Microsoft.com

Download Link :

http://www.microsoft.com/downloads/details.aspx?familyid=87E1FFBD-A484-4C3A-8776-D560AB1E6198&displaylang=en


Regards,
Moustafa arafa

All About Team System

Hi Folks,

This post is all about the Visual Studio Team System,i want to inform all of you if you dont know that the new release of Team system "Rosario" will have alot of tools and fetures which make the developers more happy with the integrated tools available out of the box.

I want also to share with you a learning guide to Team System :
"Learning Guide : Get Started with Team System" :

http://searchvb.techtarget.com/generic/0,295582,sid8_gci1140199,00.html


if you like to learn such product from a book a recommend this book for you :

"Working with Microsoft Visual Studio 2005 Team System"
it's direct to the point and full of practical experience.




Regards,
Moustafa arafa

Sunday, April 22, 2007

Ten Cool Features of Orcas

Hi folks,

as mentioned on my earlier post,Beta 1 is availbe for Orcas and for who don't know about the features available in orcas,read the following article to tell you in brief what's the new in Orcas which will be released by the end of this year :)

Part 1 :
http://searchvb.techtarget.com/infoCenter/originalContent/0,294292,sid8_gci1249446_iid2657,00.html?track=NL-150&ad=585950&asrc=EM_USC_1298947&uid=1096037

Part 2 :
http://searchvb.techtarget.com/infoCenter/originalContent/0,294292,sid8_gci1249657_iid2657,00.html?track=NL-150&ad=585950&asrc=EM_USC_1298948&uid=1096037

Enjoy with Orcas :)

Regards,
Moustafa arafa

Orcas Beta 1 Now is available

Good morning Folks,

Now Orcas Beta 1 is available to download,ISO images and VPC is availble.

Visual Studio Code Name “Orcas” Beta 1

Visual Studio code name "Orcas" is the next generation development tool for Windows Vista, the 2007 Office system, and the Web. Beta 1 consists of multiple releases including, Visual Studio Professional Edition, Visual Studio Team Suite and Visual Studio Team Foundation Server, which are available as installation media ISO images you can use to install the products. Alternatively, you can download VPC images with the software pre-installed. In addition, you can download prerelease versions of Visual Basic Express, Visual C++ Express, Visual C# Express, and Visual Web Developer.

Download it now :

http://msdn2.microsoft.com/en-au/teamsystem/aa700831.aspx

Regards,
Moustafa arafa

Wednesday, April 18, 2007

Arabic Problem when Export Data to Excel

Hi Folks,

I faced a problem when you are trying to export arabic data binded in a datagrid or gridview in asp.net 1.x or 2.0 in VS.Net.

The problem is the arabic data is exported as a un-recognized letters "@@@???#######",since my system is arabic enabled and i can write arabic in my machine.

I checked my code for export to excel,the data is being streamed in a right format but when its appearing in excel it shows as un-recognized letters.

NOTE : YOU HAVE TO CHECK THAT YOUR OFFICE IS SUPPORTING ARABIC BY Open :
START MENU-> OFFICE->OFFICE TOOLS-> LANGUAGE SETTINGS.

The problem exists in office 2003 or even in office 2007.

If you want to see export data to excel in C#,refer to my earlier post :
http://moustafa-arafa.blogspot.com/2007/04/export-more-than-1-grid-in-excel-file.html

The problem wasn't in to put the character set of the response to UTF-8 or Windows-1256,the problem was when Response.End() is called it throw an exception because the thread has been aborted,simply what you have to do is just replace Response.End()
line by below line :

HttpContext.Current.ApplicationInstance.CompleteRequest();

/* FULL CODE TO EXPORT TO SUPPORT ARABIC *************//////

Response.Clear();
Response.Buffer= true;
Response.ContentType = "application/vnd.ms-excel";
Response.Charset = "";//You can set UTF-8 or windows-1256 but this will not solve
this.EnableViewState = false;
StringWriter oStringWriter = new StringWriter();
HtmlTextWriter oHtmlTextWriter = new HtmlTextWriter(oStringWriter);

MyDGrid.RenderControl(oHtmlTextWriter);

Response.Write(oStringWriter.ToString());

Response.Flush();
HttpContext.Current.ApplicationInstance.CompleteRequest();

/********************************END OF THE CODE ****************************/


Enjoy .Netting :)



Regards,
Moustafa arafa

Tuesday, April 17, 2007

C# Free sample chapters

Hi Folks,

below link is a redirecting to a free sample chapters from C# 2005 step by step book, download them and read it and enjoy with C#


http://www.microsoft.com/learning/vs2005/digdeep/default.mspx#SAMPLES



Regards,
Moustafa arafa

Lotus Domino to Active Directory

Hi Folks,

New tool has been released to migrate from Lotus Domino to Active Directory ,Exchange Server 2007 and WSS 3.0

have a look on this tool :

Microsoft Transporter Suite for Lotus Domino
http://go.microsoft.com/?linkid=6604764

Microsoft Transporter Suite for Lotus Domino is used for interoperability and migration from Lotus Domino to Active Directory, Exchange Server 2007, and Windows SharePoint Services 3.0.


Regards,
Moustafa arafa

Migrate from Oracle to MS SQL

Hi Folks,

Microsoft has released a new tool to migrate from Oracle to MS SQL,this is a cool tool ,download it now and use it :)

"SQL Server Migration Assistant for Oracle V3.0 "
http://go.microsoft.com/?linkid=6604763

This download is a complete suite of tools that cuts the effort, cost, and risk of migrating from Oracle to SQL Server.

Enjoy with SQL-ING :)

Regards,
Moustafa arafa

Thursday, April 12, 2007

System.Data.OracleClient Requires Oracle Client version 8.1.7 or greater

Hi Geeks,

If you developed .Net Applications with Oracle Backend,you may face this problem if you installed Oracle Client Version 9.1.x or greater,when you try to connect to Oracle DB you will get this error :
"System.Data.OracleClient Requires Oracle Client version 8.1.7 or greater"

simply it is not a code problem,it is a securtiy issue,to fix it simply do the following :

1- Go to the Oracle Client folder.
2- Right Click on the folder.
3- On security Tab, Add "Aithenticated Users" and give this account Read & Execute permission.

4- Apply these security for all folders,Subfolders and Files (IMPORTANT).

5- DON't Forget to REBOOT your Machine,if you forgot to do this you will still face the same problem unless you restart your machine.

Happy .Netting with Oracle.



Regards,
Moustafa arafa

Monday, April 09, 2007

Format Your Code by manoli

Hi all,

one of the good practices is to format your code while your development,its good for all development staff to put their guidelines and standards on their code policy.

i found a good tool to format all your code C#,VB.Net and even T-SQL...

it's a cool tool,try it now :

http://www.manoli.net/csharpformat/


Regards,
Moustafa arafa

Sunday, April 08, 2007

Migrate your portal from Non DNN to DNN 4.x version

Hi Folks,

I tried to migrate a non dotnet nuke portal to dotnet nuke portal version 4.x,the first problem you will face is that you want to migrate your existing users to the new portal ? this post will show you how to do it in easy steps :

1) Export your users into an excel file.
2) create a script to that call 2 stored procedures in DotNet Nuke DB :
aspnet_Membership_CreateUser
dnn_AddUser (in some versions its called Add_User)

You can create a script for all users exported in excel file using new feature in Office 2007 called Field Merge,simply open new word file and u will find it under mailing ribbon.

you want to know how to create a field merge in word 2007,simply i will invite you to watch my friend's webcast to how to create/use field merge in word 07.

http://dotnetking.com/HowTo.aspx - > WOW....... it's free.


After creating this script in word file,execute the script in any query analyzer on the remote or production server,and u will see all your users has been migrated successfully.

Enjoy ! with Field merge :) thanks Microsoft for this great feature.


Regards,
Moustafa arafa

Wednesday, April 04, 2007

Export more than 1 Grid in Excel File

Hi Folks,

This Post is to tell you how to export more than 1 grid in 1 excel file.
this is a tricky post since we all know that its easy to export any complex data controls in asp.net 1.x or asp.net 2.0 to excel,but we will show how to export more than 1 complex data control into 1 excel file.

Here's the code in C# :

DataGrid1.DataSource=ds.Tables[0];
DataGrid1.DataBind();

DataGrid2.DataSource=ds.Tables[1];
DataGrid2.DataBind();

//export to excel
Response.Clear();
Response.Buffer= true;
Response.ContentType = "application/vnd.ms-excel";
Response.Charset = "";
this.EnableViewState = false;

System.IO.StringWriter oStringWriter = new System.IO.StringWriter();

System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);

System.Web.UI.HtmlTextWriter oHtmlTextWriter2 = new System.Web.UI.HtmlTextWriter(oStringWriter);

oHtmlTextWriter.RenderBeginTag(HtmlTextWriterTag.Br);
DataGrid1.RenderControl(oHtmlTextWriter);
oHtmlTextWriter.RenderEndTag();

oHtmlTextWriter2.RenderBeginTag(HtmlTextWriterTag.Br);
DataGrid2.RenderControl(oHtmlTextWriter2);

Response.Write(oStringWriter.ToString());
Response.Flush();
Response.End();

/***************************************************************/

in the previous code i have 2 datagrids and i export both of them in excel file using htmlTextWriter object ,and one string writer for both of them.


Regards,
Moustafa arafa

Monday, April 02, 2007

Paint.Net

Hi Folks,

Paint.NET is image and photo manipulation software designed to be used on computers that run Windows. It supports layers, unlimited undo, special effects, and a wide variety of useful and powerful tools. It started development as an undergraduate college senior design project mentored by Microsoft, and is currently being maintained by some of the alumni that originally worked on it.
Originally intended as a free replacement for the MS Paint software that comes with Windows, it has grown into a powerful yet simple tool for photo and image editing.

The programming language used to create Paint.NET is C#, with a small amount of C++ for installation and shell-integration related functionality.

download it now :

http://fileforum.betanews.com/detail/PaintNET/1096481993/1



Regards,
Moustafa arafa

Sunday, April 01, 2007

TOP N doesn't exist in Oracle ??????

Hi Folks,

I have shocked when i tried to integrate with Oracle DB in one of my projects,and i found that TOP keyword doesnt exist in oracle,and you have to change it and the workaround also depends on backend DB version !!!.

if you used to write this query in sql 2000 db:

select top 5 * from Customers where customerId=110

if you want to do the same with Oracle DB (8i or later),write it like this :

select * from Customers where customerId=110 and rownum<6

rownum<6,do the same of Top 5 and return TOP 5 records

if you have Oracle DB earlier than 8i you have to write the following :

SELECT *
FROM Customers a
WHERE 5 >= (SELECT COUNT(DISTINCT Revenue)
FROM Customers b
WHERE b.Revenue>= a.Revenue)



This is Today Tip,Enjoy .Netting :)



Regards,
Moustafa arafa

Thursday, March 29, 2007

Export Data List to Excel

Hi Folks,

This post is very tricky because it shows a trick about exporting datalist data to excel.

if you have a dtagrid and you want to export its data to excel,by few lines of code you can export its data to an excel file....here is the code :

/******************* BEGIN CODE ***********************************************/
Response.Clear();
Response.Buffer= true;
Response.ContentType = "application/vnd.ms-excel";
Response.Charset = "";
this.EnableViewState = false;
System.IO.StringWriter oStringWriter = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);
this.ClearControls(DataGridView);
DataGridView.RenderControl(oHtmlTextWriter);
Response.Write(oStringWriter.ToString());
Response.Flush();
Response.End();

/*****************************************************************************/

the important thing here,is to export a datalist which contains a composite controls like a datagrid inside a datalist this code will not work,
simply to solve the problem,comment this line of code in export function :

//this.ClearControls(DataGridView);

then simply all child controls in the datalist will be export to Excel.........


Happy .Netting :)

Regards,
Moustafa arafa