Category Archives: Dotnet

  • How to share objects (types) between multiple Web Services

    Posted on March 14, 2012 by in C#, Dotnet

    More than often you would consume services which share objects. Once you add them as “Web References” to your client project, it loses the context and you would end up having multiple copies of the same object under different namespace.

    Scenario

    1) Create a new ASP.NET WEB SERVICE APPLICATION.
    2) Create two web services Service1. asmx & Service2.asmx
    3) Create a shared class Department.
    4) Create a web method RetrieveDepartment in Service1. asmx
    5) Create another webmethod ModifyDepartment in Service2.asmx which uses the same department
    6) Create a simple ConsoleApplication and add web references to above 2 services.

    Post Tagged with ,
  • How to do custom username assertion in WSE 3.0.

    Posted on March 14, 2012 by in C#, Dotnet

    This article would describe how to write a custom username assertion in WSE 3.0. It is nothing but sending username/password from client to service and service authenticating the same before honoring the request. Article would also describe how to sign & encrypt the SOAP header/body without a fuss. We would extend one or more of the “TurnKey security assertions” provided WSE. Turnkey assertions are nothing but set of security operations packaged by WSE.
    Essentially there are four pipelines in WSE 3.0. We need to inject our custom policy assertions into these pipelines. As simple as that
    1) Sender’s Output Pipe Line :
    2) Sender’s Input Pipe Line :
    3) Receiver’s Input Pipe Line
    4) Receivers Output Pipe Line.

    Post Tagged with ,
  • How to convert a Microsoft word document to PDF in VB.NET

    Posted on March 13, 2012 by in Dotnet, VB.NET

    In enterprise environments, PDF is the common used format to share documents between employees. There are so many third party tools that would provide you a way to convert word documents to PDF. But there are no free tools that would provide this functionality.

    In some cases you might have do this conversion programmatically. For example, what if you want some authorized user to make modifications to a document stored in sharepoint and on save you want to distribute the document to people on the network where everyone who doesn’t have MS word on their machines can view?

    Post Tagged with , , ,
  • How to write custom ADO.NET APPENDER for LOG4NET

    Posted on March 12, 2012 by in C#, Dotnet

    Log4NET is the best thing out there to write data to variety of targets. It provides so many ways to leverage existing framework to customize to your needs. This article describes how to write a custom ADO.NET APPENDER for LOG4NET.

    Post Tagged with ,
  • Shallow Cloning and Deep Cloning of object in C#

    Posted on March 12, 2012 by in C#, Dotnet

    This article explains Shallow Cloning and Deep Cloning of object in C# with examples. Sometimes cloning an object sounds like a simple thing but you have to keep so many things in perspective. Consider this scenario. You have retrieved an object by calling an external web service which is a quite expensive call. That object […]

    Post Tagged with , , ,
Page 18 of 18« First...10...1415161718