Home > Ask the Microsoft .Net Development Experts > C# Development Questions & Answers > Getting data from a project to a class file and Windows service
Ask The Win Development Expert: Questions & Answers
EMAIL THIS

Getting data from a project to a class file and Windows service

Daniel Cazzulino EXPERT RESPONSE FROM: Daniel Cazzulino

Pose a Question
Other Win Development Categories
Meet all Win Development Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 18 March 2004
I have two separate projects. In the first project, I have a form. In the second, I have a class file and Windows service. Is it possible to get data of the form that is in the first project to that Windows Service? If this is not possible, please tell me how to get the value from that form to a class file.

>
Windows services can expose a remoting server object at a Uri, say tcp://localhost/MyService.rem. The Windows Form can create a new instance of this "remote" object and call a method on it, passing the form data. The method is executed on the service application, where you can do whatever you need. You can start at MSDN on how to expose the remote object, how to configure the "server" (the windows service) and client application (the "form"):

  • http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/hawkremoting.asp
  • http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/hawkremoting.asp

    Other interesting introductory articles are:

  • http://www.codeproject.com/csharp/DotNetRemotingBasicTutor.asp?target=remoting
  • http://www.codeproject.com/vb/net/RemotingTech.asp?target=remoting


  • Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



    RELATED CONTENT
    C# programming language
    Inside Visual Studio 2010
    Mono 2.0 moves .NET apps to Linux - includes migration analyzer
    LINQ beyond queries: Strong-typed refection
    Assembly versioning in the .NET Framework 2.0
    Book excerpt: Creating graphical output using the .NET Compact Framework
    Visual Studio 2008 Learning Guide: C# 3.0
    Simonyi firm to address divide between domain experts and developers
    On Extension Methods in C# and .NET Framework 3.5
    Generate RSA public and private keys, export to XML
    Book excerpt: Upgrading to Visual Studio 2005

    C# Development
    Top C# expert advice
    Using LoadRunner for testing in .NET
    Take care with InitializeComponent
    GroupBox inheritance
    Escape from mailto:
    Windows Forms: Overriding the OnClosing method
    Passing data between forms
    Can I run a .NET app without installing .NET runtime?
    Opening a link with parameters to a new window
    Is it possible to open a child form in modal type?

    C#
    Top C# expert advice
    Escape from mailto:
    Can I run a .NET app without installing .NET runtime?
    Opening a link with parameters to a new window
    Is it possible to open a child form in modal type?
    Painting in the non-client area
    Global cases to the entire application
    Validating the textbox entry for date format
    Book on network programming with C#
    Calling a secondary UserControl applet

    RELATED GLOSSARY TERMS
    Terms from Whatis.com − the technology online dictionary
    C#  (SearchWinDevelopment.com)
    GLib  (SearchWinDevelopment.com)

    RELATED RESOURCES
    2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
    Search Bitpipe.com for the latest white papers and business webcasts
    Whatis.com, the online computer dictionary



    Search and Browse the Expert Answer Center
    Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
    Browse our Expert Advice



    Windows Development - White Papers, News and Expert Advice
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Site Map




    All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts