Archive for October, 2008
Microsoft Health COMMON USER INTERFACE
Introduction
The Microsoft Health Common User Interface (CUI) provides a toolkit with controls which addresses wide range of patient safety concerns for Health Care Organizations all over the world. This tool kit allows the developers to build a new generation of Health Care Applications.
With Microsoft CUI you can
- Quickly and easily develop a Health Care Application
- Design guidance for developing the applications
- Develop applications in Visual Studio Environment
Microsoft developing all these controls using Windows Presentation Foundation and Silver light 2.0 technology.
Microsoft Demonstrated the Features of this controls by developing a patient journey application in NHS 2008 summit.
The following are some of the screen shots of the Application
- Dynamic Search and Results slider
Related Posts:
No commentsOverview on SharePoint 2007 Features
Introduction
This post explains the SharePoint 2007 features which helps the end users to understand the benefits of MOSS.
Document Library One of the most used features of SharePoint is the document library. It allows the users to manage documents by uploading them to libraries and manage rows and columns of information which is similar to spreadsheet.
Lists another interesting feature in SharePoint 2007(MOSS) which composed of rows and columns much like spreadsheet. Different types of lists in SharePoint are Announcements, Contacts, Discussion Board, Links, Calendar, Tasks, Project Tasks, Survey and Custom Lists.
Related Posts:
No commentsBusiness Needs for SharePoint 2007
A number of organizational needs made the adoption of SharePoint technologies. Some of the common business needs to use SharePoint 2007.
- Document Management Includes document versioning, check-out and check-in features, adding metadata to documents and a better control of document access.
- Collaboration between users To allow the users to interact efficiently with each other to share information. Integration of office applications is a key component in SharePoint.
Related Posts:
No commentsWCF vs ASP.NET Web services
Introduction
In this post I will explain the Difference between ASP.NET web service and programming WCF services like ASP.NET web services. It also discusses how we use the both technologies for developing the web services.
The development of web service with ASP.NET relies on defining data and relies on the XmlSerializer to transform data to or from a service.
Key issues with XmlSerializer to serialize .NET types to XML
- Only Public fields or Properties of .NET types can be translated into XML.
- Only the classes which implement IEnumerable interface.
- Classes that implement the IDictionary interface, such as Hash table can not be serialized.
The WCF uses the DataContractAttribute and DataMemeberAttribute to translate .NET FW types in to XML.
[DataContract]
public class Item
{
[DataMember]
public string ItemID;
[DataMember]
public decimal ItemQuantity;
[DataMember]
public decimal ItemPrice;}
The DataContractAttribute can be applied to the class or a strcture. DataMemberAttribute can be applied to field or a property and theses fields or properties can be either public or private.
Important difference between DataContractSerializer and XMLSerializer.
- A practical benefit of the design of the DataContractSerializer is better performance over XMLserialization.
- XMLSerialization does not indicate the which fields or properties of the type are serialized into XML where as DataCotratSerializer Explicitly shows the which fields or properties are serialized into XML.
- The DataContractSerializer can translate the HashTable into XML.
Developing Service
To develop a service using ASP.NET we must add the WebService attribute to the class and WebMethodAttribute to any of the class methods.
Example
[WebService]
public class Service : System.Web.Services.WebService
{
[WebMethod]
public string Test(string strMsg)
{
return strMsg;
}
}
To develop a service in WCF we will write the following code
[ServiceContract]
public interface ITest
{
[OperationContract]
string ShowMessage(string strMsg);
}
public class Service : ITest
{
public string ShowMessage(string strMsg)
{
return strMsg;
}
}
The ServiceContractAttribute specifies that a interface defines a WCF service contract, OperationContract Attribute indicates which of the methods of the interface defines the operations of the service contract.
A class that implements the service contract is referred to as a service type in WCF.
Hosting the Service
ASP.NET web services are compiled into a class library assembly and a service file with an extension .asmx will have the code for the service. The service file is copied into the root of the ASP.NET application and Assembly will be copied to the bin directory. The application is accessible using url of the service file.
WCF Service can be hosted within IIS or WindowsActivationService.
- Compile the service type into a class library
- Copy the service file with an extension .SVC into a virtual directory and assembly into bin sub directory of the virtual directory.
- Copy the web.config file into the virtual directory.
Client Development
Clients for the ASP.NET Web services are generated using the command-line tool WSDL.EXE.
WCF uses the ServiceMetadata tool(svcutil.exe) to generate the client for the service.
Message Representation
The Header of the SOAP Message can be customized in ASP.NET Web service.
WCF provides attributes MessageContractAttribute , MessageHeaderAttribute and MessageBodyMemberAttribute to describe the structure of the SOAP Message.
Service Description
Issuing a HTTP GET Request with query WSDL causes ASP.NET to generate WSDL to describe the service. It returns the WSDL as response to the request.
The generated WSDL can be customized by deriving the class of ServiceDescriptionFormatExtension.
Issuing a Request with the query WSDL for the .svc file generates the WSDL. The WSDL that generated by WCF can customized by using ServiceMetadataBehavior class.
Exception Handling
In ASP.NET Web services, Unhandled exceptions are returned to the client as SOAP faults.
In WCF Services, unhandled exceptions are not returned to clients as SOAP faults. A configuration setting is provided to have the unhandled exceptions returned to clients for the purpose of debugging.
Related Posts:
45 commentsMicrosoft Web Application Installer(Beta)
Introduction
The Microsoft Web Application Installer (Web AI) allows you to install Web applications for IIS from other sources. Web AI identifies available applications and the originating Web sites, and asks you to select the application that you want to install.
What does it do?
Web AI downloads the applications that you selected directly from the originating web sites and configures according to your instructions.
Web AI is the easiest way to install the freely available PHP and ASP.NET applications on the IIS Web server.
- Web AI provides support for popular ASP.NET and PHP Web Applications including Graffiti, DotNetNuke, WordPress, Drupal, OSCommerce and more.
Related Posts:
No commentsHost the WCF Service in IIS
Introduction
This post explains hosting the WcfEmployee Service on IIS that we previously hosted with in .NET Executable. Hosting the WCF service in IIS provides a robust, efficient and secure features to WCF service.
1. Create a virtual directory that pointing to the Employee Service project in IIS
2. Configuring the service in IIS is identical to the configuration used for hosting the service in .NET Executable. The configuration file looks like in the following window
3. Confirm the Availability of the service by browsing the .svc file in browser.
4. Run the client application to consume the service.
Related Posts:
No commentsHosting the WCF Service in .NET Executable
Introduction
This post explains how to host a WCF service that we defined in the previous article WCF sample in VS 2008. Specifically we host the WCF service in .NET console application.
1. Add the Console application project called, Host, to the solution
2. Add System.ServiceModel .NET, System.Configuration Assemblies to the
Host Project.
3. Add the WCF Service project to the Host project
4. Write the following code which needed to provide a host for the WCFEmployee service
5. The above code retrieves the base addresses from the configuration file and the addresses of WCF endpoints are relative to the base addresses.
6. Add the application configuration file named app.config to the Host project
Modify the content as follows
appSettings section provides the address for the HTTP and TCP protocols.
System.serviceModel section for configuring the WCF endpoints. Here we add the address, binding and contract which constitutes an endpoint.
7. Run the Host Project it shows the following window
8. You can test the host service by clicking the http://localhost:8000/EmployeeService/ and you will see the following window
Related Posts:
1 commentMicrosoft Next Operating System Windows 7
Microsoft announced that the successor to Windows Vista will be called Windows 7. Microsoft has set 2010 as release target for Windows 7.
Mike Nash, corporate vice president of Windows Product Management, explained:
"Over the years, we have taken different approaches to naming Windows. We’ve used version numbers like Windows 3.11, or dates like Windows 98, or "aspirational" monikers like Windows XP or Windows Vista. And since we do not ship new versions of Windows every year, using a date did not make sense. Likewise, coming up with an all-new "aspirational" name does not do justice to what we are trying to achieve, which is to stay firmly rooted in our aspirations for Windows Vista, while evolving and refining the substantial investments in platform technology in Windows Vista into the next generation of Windows."
Ultimately, Windows 7 is the seventh release of the operating system, "so therefore ‘Windows 7′ just makes sense," Nash writes.
Related Posts:
1 commentCalculating the size of the File in C#
Introduction
This code snippet explains how to calculate the size of the file and display in a label control. For example I am taking PDF file to find the size. It Displays the size of the file in Bytes, Kilobytes and Megabytes.
//Calculate size of the PDF file
if (PdfFilePath.EndsWith("pdf"))
{
FileInfo info = new FileInfo(PdfFilePath);
long fileSize = info.Length;
string strFileSize = FormatFileSize(fileSize);
lblFileSize.Text = strFileSize;
}
Related Posts:
4 commentsCRUD operations using the List View Web Server Control
Introduction
Using the ASP.NET ListView Control we can insert,edit, or delete records without writing any code. This post explains how to display and update data using the ListView control. We will use SqlDataSource control to retrieve results from the data source and act as the data source for the ListView control.
1. Create a web site in visual studio 2008 by selecting the File menu, click new
web site option the following dialogue box will appear
2. Enter the name for the web site and say ok.
3. To display and modify the data in listview control add the database file to the
App_Data folder. Here i am adding the Department table of AdventureWorks
database.
4. Open the design view of the default.aspx file and add the Listview control
from the datasection in the toolbox.
![Recommend [kalyanms1]](http://s3.amazonaws.com/arkayne-media/img/badge/logo-recommend-badge-medium.png)