Skip to main content

Posts

Showing posts from January, 2008

MVC in ASP.NET

MVC - Model-View-Controller is a sort of design pattern used to develop applications in an uncoupled manner i.e. seperate the data (Model) from the User interface (View) and the business logic (Controller). I first came across this with MFC applications, it was well known design pattern when developing standalone applications now it appears to be the latest craze in ASP.NET 3.5 applications! In this post I'll try and find out why and what is the significance and benefits to us, developers. MVC (scott gu) Example Building a Simple Blog engine using MVC in ASP.NET (aspalliance.com)

WebServices

Webservices are exposed methods which can be accessed through a uri e.g.your code is contained in a .asmx file. The .asmx file contains webmethods (ordinary methods with the [WebMethod] attribute). You place your .asmx file inside your webserver somewhere and these can be consumed directly by browsing to the uri or by consuming the webservice by adding it as a reference to your application and then accessing that reference. Webservices can also be created with Codebehind meaning the code itself is in another file, this results in the .asmx file just containing a Directive to the class name containing the webmethod, to use this webservice the codebehind dll must be placed within the websites bin directory. The WebService works by the Client and Server sending SOAP XML (SOAP is just the root element, it's something that Internet Explorer knows how to parse) up and down over HTTP. Both sides need to know how to create this SOAP XML, on the Client side this is done by a Proxy class whi...

Active Directory

Active Directory is the windows method to access all distributed devices such as files, printers. In .NET the Active Directory is accessed from System.DirectoryServices namespace. .NET uses Windows Active Directory Service Interfaces (ADSI) to interact with the distributed devices, there are 5 of these ADSIs; Path Windows NT version 5.0, Windows 2000, or Windows XP WinNT://path, Lightweight Directory Access Protocol (LDAP) ldap://path/ , Novell NetWare Directory Service NDS://path, Novell Netware 3.x NWCOMPAT://path, Internet Information Services (IIS) IIS://. e.g. DirectoryEntry webentry = new DirectoryEntry(); String path = "IIS://localhost/W3SVC/1/ROOT"; DirectoryEntries webSiteChildren = webentry.Children; foreach (DirectoryEntry website in webSiteChildren) { //can access metadata of each website on iis here }