Browse by Tags

Webclient downloading content/files from an Https (SSL)
Monday, October 05, 2009 2:09 AM
i was using the webclient object to download files from a website and my application worked fine. my client decided to add an SSL certeficate to the website and has required me to change my code to request the file through https instead of http all i had to do was change the URL to have https:// instead of http:// but when i first tried the code. i got this exception... Read More...
by amir.magdy | 1 comment(s)
Filed under: ,
Change Web Service test page [wsdlHelpGenerator]
Tuesday, May 26, 2009 4:24 AM
the default web service page is a page that reveals a lot of the internal information of the application, this is something that you want to hide. Warning this does not really secure your web service. may be you should read something like this < configuration > < system.web > < webServices > < wsdlHelpGenerator href = "yourEmptyPage... Read More...
by amir.magdy | with no comments
Filed under: , ,
Windows Debugging tools Quick tutorial [WinDbg]
Sunday, May 17, 2009 11:42 PM
last week end we have faced memory leaks, we had no idea what was the cause of the problem. we were directed by microsoft to use the debugging tools. this is a quickest possible startup tutorial for that tool. [Warning] using this tool affects the performance of your applications dramatically please make sure you don’t run it on a production server unless there... Read More...
by amir.magdy | 1 comment(s)
Filed under: , ,
Fastest way for Creating a memory Dump of your application [DebugDiag]
Sunday, May 17, 2009 11:37 PM
First you need to download the tool here is the link now just install the tool and run it then ignore the wizard and go to the third tab in the application UI right click your process and select create a full dump, the dump is going to be created now if you need to configure where these dumps are created go to tools –> options and configure the dumps folder... Read More...
by amir.magdy | 2 comment(s)
Filed under: , ,
Delegates to LINQ [passing logic as a parameter] (part I)
Friday, February 08, 2008 9:03 AM
it's normal to pass data to a function just thow in a parameter of the type of data you want to pass and ur set public int add ( int i, int u ){ return i+u; } now think in a different way, u now want to build a set of operations that the user can choose from now what you need is to build a function that would take the user's input and the operation as... Read More...
by amir.magdy | 3 comment(s)
Filed under: ,
Have u ever needed to extend a string? [Extension Methods]
Thursday, December 27, 2007 6:34 AM
well it's not inheritable by default so you can not extend it. that used to be the case before c# 3.0 now you can specify all the functionality that you need in an Extension Method. problem lies in that the extension method needs to access the instance of the object you are extending well, it goes like this 1- first you declare a static class with ur static... Read More...
by amir.magdy | 8 comment(s)
Filed under: ,
Object and Collection Initializers
Wednesday, December 26, 2007 5:03 AM
well also one of the nicest features in c# 3.0 is the object initializers well we used to do this 1: Employee emp = new Employee(); 2: emp.FirstName= "Amir" ; 3: emp.LastName= "Magdy" ; 4: emp.Title = "Mr." ; i actually hated writing this previous snippet now in c# 3.0 we do this 1: var emp = new Employee {FirstName= "Amir"... Read More...
by amir.magdy | 3 comment(s)
Filed under: ,
Auto Implemented Properties
Monday, December 24, 2007 2:23 AM
C# 3 comes with a very nice feature (not undermining the power of lambda expressions and Linq), just this one shows how nice the language has evolved into 1: class Employee 2: { 3: public string firstName { get; set; } 4: } you see the previous code will act as a full blown property that maintains its instance value internally the compiler creates a member and... Read More...
by amir.magdy | 1 comment(s)
Filed under: ,
Happy Holidays
Sunday, December 23, 2007 8:29 AM
VB9 song 1: Module VB 2: Dim myvar As Integer ?() = {3 * 3} 3: Sub Main() 4: For Each i In myvar 5: Console.Write( "Hello VB" ) 6: With i 7: Console.Write(.Value) 8: End With REM a language so true 9: If i IsNot Nothing Then 10: Console.WriteLine() 11: End If REM 12: Console.Write(<some>xml</some>) 13: Next 14: End Sub 15: End Module Read More...
by amir.magdy | with no comments
Filed under: ,
Free E-books
Sunday, December 23, 2007 3:09 AM
Microsoft has opened 3 MS Press books completely FREE for public. The books are: · Introducing Microsoft LINQ by Paolo Pialorsi and Marco Russo (ISBN: 9780735623910) This practical guide covers Language Integrated Query (LINQ) syntax fundamentals, LINQ to ADO.NET, and LINQ to XML. The e-book includes the entire contents of this printed book! · Introducing Microsoft... Read More...
Enumerate Embedded Resources
Tuesday, December 04, 2007 3:11 AM
sometimes you just need to include an image or an XML file with your package but you don't want to allow users to access these files and modify them, all you have to do is to embed these files in your assembly if this assembly is a DLL or an EXE. just add the files to your project and from the file properties select the build action to be "Embed Resource"... Read More...
by amir.magdy | 1 comment(s)
Filed under: ,
Ajax.net cancel a request
Monday, November 12, 2007 12:06 PM
well this is one of my old blog posts i'll be resposting them by time ammong new ones here we go this is very important if i have a request that i have issued using asp.net ajax client library this is how to cancel it 1: serviceHandler = new ServiceName().methodName(param1, param2, completeHendler ,errorHandler ); 2: // just keep the serviceHandler variable... Read More...
by amir.magdy | 1 comment(s)
Filed under: , , ,