DCSIMG
.NET - Maor's Blog

Browse by Tags

WCF Load Test
Just published on CodePlex  -WCF Load Test tool. Project Description from the project home page on CodePlex: This tool takes a WCF trace file and a WCF client proxy, or a WCF interface contract, and generates a unit test that replays the same sequence...
VB.NET and C# Comparison
Sometimes we need a simple VB.NET & C# side by side comparison . This sheet doesn't include all features, but its great place to start with.
How to prevent SQL injections
Many applications include code that looks like: 1: string sqlStmt = "SELECT * FROM USERS WHERE UserName= '" + un + "' AND Password='" + pwd + "'" ; Admit it...it's ugly, but you constructed SQL statements like this one. The variables un,pwd are provided by the user. The problem with this SQL string is that the attacker can piggyback SQL statements in one of them. What if the attacker enters this: un = maor, pwd = 123456' OR 1=1 . The following...
C# Coding standards guideline
Scott Guthrie published another post in the link listing series . One of my favorites, is the link to the C# coding standards document , which was written by Juval Lowy from IDesign . As Scott wrote: Extremely useful if you are looking for a concise checklist of good suggestions to keep your codebase clean. Technorati Tags: Coding Standards , .NET , C#
Deployment .NET apps using ClickOnce
In my opinion, the most important part in software is deployment. What is the best way how to get the application into your users' hands? there are a lot of ways to do it, I'll introduce here ClickOnce technology. ClickOnce is a deployment technology that allows you to create self-updating Windows-based applications that can be installed and run with minimal user interaction. Read more about ClickOnce here . ClickOnce enables the user to install and run an application by just clicking a link in a...
ASP.NET 2.0 - Web Site vs Web Application project
This post was migrated. You can read it at http://blog.maordavid.com/2007/06/aspnet-20-web-site-vs-web-application-project/   A common question by asp.net developers is what project model should I use for asp.net application? Web Site project (which introduced with VS 2005) or Web Application project (which delivered as add-in for VS 2005 and built-in within VS 2005 SP1)? There is no thumb rule. Every project model has it's own advantages (and diss-advantages off course...). I hope this...
Secure your application
Worried about security? Microsoft has published patterns & practices Security Checklists Index for .NET framework 1.1 & 2.0. You can find there: Architecture and Design Review Checklists Code Review Checklists Deployment Review Checklists Take care...
C# attributes
I asked too much by .NET developers about attributes and their meaning. I hope that this post will help you to understand it better. Introduction: what are attributes? An attribute is a powerful .NET language feature that is attached to a target programming element (e.g., a class, method, assembly, interface, etc.) to customize behaviors or extract organizational information of the target at design, compile, or runtime. It is a clean approach to associate metadata with program elements and later...
Enterprise Library 3.1 Released
Enterprise Library 3.1 just Released: It is a maintenance release to fix a few bugs. It also includes an extension point in the Policy Injection Application Block that allows you to replace the injection mechanism. Changes per Tom Hollander : Policy Injection Application Block The default Remoting Policy Injector can now be replaced with alternative interception mechanisms via configuration without modifying the application block code Call Handler attributes are now honored correctly when placed...
Save datagrid changes in the database
Once you want edit a recore, add new or deleted a recored in your data grid you may want to save it in the database. How do we do it? Create UpdateCommand handler for the data grid Identify what DataGrid row was updated by getting the ItemIndex property of the row ( Item object) passed in the event object. Then use the index value to get the corresponding value out of the grid's DataKeys collection: string key = DataGrid1.DataKeys[e.Item.ItemIndex].ToString(); Get the changed values out of the DataGrid...
How to: Calling Web Services methods from Client Script in ASP.NET AJAX
My previos post explained the way to expose a web service to client script in Ajax. This post will introduce the "How to" call the web service's method from the client script. Our web service is: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 namespace MySamples.BL { [WebService(Namespace = "http://tempuri.org/" )] [ScriptService] public class MyWebService : System.Web.Services.WebService { [WebMethod] public string PrintString(String input) { return input; } [WebMethod] public string SayHello() {...
How to: Expose Web Services to Client Script in AJAX
AJAX enables you to call ASP.NET Web services by using client script. There are several steps to enable the web service exposing. 1. Qualify the Web service class with the ScriptServiceAttribute attribute: 1 2 3 4 5 6 7 8 9 [ScriptService] public class MyWebService : System.Web.Services.WebService { [WebMethod] public string PrintString(String input) { return input; } } 2. Configure the Web application to support calling Web services from script. Register the ScriptHandlerFactory HTTP handler in...
Interface vs Abstract Class
I frequently asked what is the difference between Interface and Abstract classes. The main difficulty is the choice of whether to design your functionality as an interface or an abstract class. Interface An interface is a reference type containing only abstract members. These can be events, indexers, methods or properties, but only the member declarations. A class implementing an interface must provide the implementation of the interface members. An interface cannot contain constants, constructors...

Search

Go

This Blog

News

    RSS

     

    Connect with Me

    Maor's Facebook profile  Follow Maor on Twitter  Maor's profile on Linkedin  Maor in FriendFeed 
           

Syndication