Welcome to the Dot Net Tech Community

Experience The Freedom To Share...

Thursday, June 24, 2010

Components of WCF

1. WCF?
WCF is a technology buit to develop distributed applications. let us discuss the mail components of WCF.
1.1. Contracts.
1.1.1 Service Contract
1.1.2 Operation Contract
1.1.3 Data Contract
1.1.4 Message Contract
1.1.5 Fault Contract
1.2. EndPoints.
1.2.1 Address
1.2.2 Binding
1.2.3 Contract


2. So.. What points that WCF Addresses..?
2.1. Web Services
2.2. Communiucation with in .Net applications
2.3. Distributed transactions
2.4. Support for WS* Specifications
2.5. MSMQ

So by now we got to know some of the fundamentals for WCF.
Now let me ask a question. How would you implement all the concepts which are listed in point 2nd point. Your answer would be
"I will develop three different applications
1. Web Services and WS*, "
2. Communiucation with in .Net applications
3. MSMQ
We all are pretty much confident that all these concepts are technically feseable to implement in .Net 2.0, but what if I tell you you can implement all these concepts with in a single application, and access all these concepts parlally....?
Impressive right.. YES.. WCF is the answer for all these technologies with a single pice of code, just by configuring different end points in the WCF you can implement your code for all the technologies listed above.
With this I conclude, please post your queries.. and I'll try to address all of them.

Monday, June 21, 2010

Embeding Images in Custom Control

Steps to embed images in a custom control (.dll)
1. Adding Images to the solution.
Add images to the soution.
Right click the image and set the Build action to "Embeded Resource".
2. Declaring the image to be a web resource
Add the following line to the assemblyinfo.cs
[assembly: WebResource(".[folder].", "image/gif")]
3. Access the file in the code
Page.ClientScript.GetWebResourceUrl(this.GetType(), ".[folder].");
Done... you can now embed the images, .js files or .css files to the dlls.
This article also appears on Experts Exchange Embeded Resources in dlls