use/reuse of intranet business dlls by asp.net apps

Discussion in 'ASP .Net' started by =?Utf-8?B?bnV1dHV1ZG5ldA==?=, Sep 10, 2007.

  1. We want to use allready written C sharp programs for our asp.net
    applications. The idea is that we write a program ONCE and use this same
    EXACT logic for our internet apps. Everything will run on the same server but
    we will have two types of clients 1. web based, 2. intranet based. Is this
    possible? If so, what is it called in Microsoft speak? How to links would be
    appreciated.
    --
    cheers,
    nuutuudnet
    =?Utf-8?B?bnV1dHV1ZG5ldA==?=, Sep 10, 2007
    #1
    1. Advertising

  2. On Sep 10, 2:20 pm, nuutuudnet <> wrote:
    > We want to use allready written C sharp programs for our asp.net
    > applications. The idea is that we write a program ONCE and use this same
    > EXACT logic for our internet apps. Everything will run on the same server but
    > we will have two types of clients 1. web based, 2. intranet based. Is this
    > possible? If so, what is it called in Microsoft speak? How to links would be
    > appreciated.


    You can identify the type of user by IP address, for example, if an
    address starting with 10.*, it's an internal network IP.

    if (Request.ServerVariables ["REMOTE_ADDR"].indexOf("10.") == 0) {
    .....
    Alexey Smirnov, Sep 10, 2007
    #2
    1. Advertising

  3. =?Utf-8?B?bnV1dHV1ZG5ldA==?=

    Aidy Guest

    Look into "remoting" or "web services" as two possible solutions. Maybe web
    services would be the better solution. You expose your code via web methods
    and both the website and applications use the web service.

    "nuutuudnet" <> wrote in message
    news:...
    > We want to use allready written C sharp programs for our asp.net
    > applications. The idea is that we write a program ONCE and use this same
    > EXACT logic for our internet apps. Everything will run on the same server
    > but
    > we will have two types of clients 1. web based, 2. intranet based. Is this
    > possible? If so, what is it called in Microsoft speak? How to links would
    > be
    > appreciated.
    > --
    > cheers,
    > nuutuudnet
    Aidy, Sep 10, 2007
    #3
  4. I do not want to reprogram. I want to use existing C#
    Objekts/methods/programs in my internet app.
    --
    cheers,
    nuutuudnet


    "Alexey Smirnov" wrote:

    > On Sep 10, 2:20 pm, nuutuudnet <> wrote:
    > > We want to use allready written C sharp programs for our asp.net
    > > applications. The idea is that we write a program ONCE and use this same
    > > EXACT logic for our internet apps. Everything will run on the same server but
    > > we will have two types of clients 1. web based, 2. intranet based. Is this
    > > possible? If so, what is it called in Microsoft speak? How to links would be
    > > appreciated.

    >
    > You can identify the type of user by IP address, for example, if an
    > address starting with 10.*, it's an internal network IP.
    >
    > if (Request.ServerVariables ["REMOTE_ADDR"].indexOf("10.") == 0) {
    > .....
    >
    >
    =?Utf-8?B?bnV1dHV1ZG5ldA==?=, Sep 10, 2007
    #4
  5. We have heard of these two things but they are not exactly what we want. We
    understand remoting to be a sort of physical shoving back and forth of data
    between two apps. And Web services do not also fit our scenario. We have
    existing allready written C# logic. We want asp.net (OR our internet
    programs) to simply be able to use this C# logic. We are simply trying to
    avoid the work of building two apps, one for web and one for intranet.
    --
    cheers,
    nuutuudnet


    "Aidy" wrote:

    > Look into "remoting" or "web services" as two possible solutions. Maybe web
    > services would be the better solution. You expose your code via web methods
    > and both the website and applications use the web service.
    >
    > "nuutuudnet" <> wrote in message
    > news:...
    > > We want to use allready written C sharp programs for our asp.net
    > > applications. The idea is that we write a program ONCE and use this same
    > > EXACT logic for our internet apps. Everything will run on the same server
    > > but
    > > we will have two types of clients 1. web based, 2. intranet based. Is this
    > > possible? If so, what is it called in Microsoft speak? How to links would
    > > be
    > > appreciated.
    > > --
    > > cheers,
    > > nuutuudnet

    >
    >
    >
    =?Utf-8?B?bnV1dHV1ZG5ldA==?=, Sep 10, 2007
    #5
  6. =?Utf-8?B?bnV1dHV1ZG5ldA==?=

    Aidy Guest

    Then just reference the dlls from your web project and you should be able to
    use them as normal.

    "nuutuudnet" <> wrote in message
    news:...
    > We have heard of these two things but they are not exactly what we want.
    > We
    > understand remoting to be a sort of physical shoving back and forth of
    > data
    > between two apps. And Web services do not also fit our scenario. We have
    > existing allready written C# logic. We want asp.net (OR our internet
    > programs) to simply be able to use this C# logic. We are simply trying to
    > avoid the work of building two apps, one for web and one for intranet.
    > --
    > cheers,
    > nuutuudnet
    >
    >
    > "Aidy" wrote:
    >
    >> Look into "remoting" or "web services" as two possible solutions. Maybe
    >> web
    >> services would be the better solution. You expose your code via web
    >> methods
    >> and both the website and applications use the web service.
    >>
    >> "nuutuudnet" <> wrote in message
    >> news:...
    >> > We want to use allready written C sharp programs for our asp.net
    >> > applications. The idea is that we write a program ONCE and use this
    >> > same
    >> > EXACT logic for our internet apps. Everything will run on the same
    >> > server
    >> > but
    >> > we will have two types of clients 1. web based, 2. intranet based. Is
    >> > this
    >> > possible? If so, what is it called in Microsoft speak? How to links
    >> > would
    >> > be
    >> > appreciated.
    >> > --
    >> > cheers,
    >> > nuutuudnet

    >>
    >>
    >>
    Aidy, Sep 10, 2007
    #6
  7. On Sep 10, 4:16 pm, nuutuudnet <> wrote:
    > We have heard of these two things but they are not exactly what we want. We
    > understand remoting to be a sort of physical shoving back and forth of data
    > between two apps. And Web services do not also fit our scenario. We have
    > existing allready written C# logic. We want asp.net (OR our internet
    > programs) to simply be able to use this C# logic. We are simply trying to
    > avoid the work of building two apps, one for web and one for intranet.
    > --
    > cheers,
    > nuutuudnet
    >
    >


    You wrote:

    > Everything will run on the same server


    Does it mean you will have the same application with two kind of
    users, or you will have two applications: one for internet and one for
    intranet? I don't see any point to build a web service here
    Alexey Smirnov, Sep 10, 2007
    #7
  8. Exactly, I have web users and in house intranet users. But we want both users
    to make database changes in exactly and precisely the same way as far as
    types, as far as date conversions, whatever. We hope with dotnet to be able
    to write one program here in house, compile it, put one on the internet and
    one local (both actually physically in the same machine) we'll write a GUI in
    c# for in-house and an asp.net (??) GUI for the web but the kernal business
    logic is exactly and precisely the same c#. I am hoping that someone could
    tell me that it is indeed as simple as Aidy says just refrencing the methods,
    classes and variables.
    --
    cheers,
    nuutuudnet


    "Alexey Smirnov" wrote:

    > On Sep 10, 4:16 pm, nuutuudnet <> wrote:
    > > We have heard of these two things but they are not exactly what we want. We
    > > understand remoting to be a sort of physical shoving back and forth of data
    > > between two apps. And Web services do not also fit our scenario. We have
    > > existing allready written C# logic. We want asp.net (OR our internet
    > > programs) to simply be able to use this C# logic. We are simply trying to
    > > avoid the work of building two apps, one for web and one for intranet.
    > > --
    > > cheers,
    > > nuutuudnet
    > >
    > >

    >
    > You wrote:
    >
    > > Everything will run on the same server

    >
    > Does it mean you will have the same application with two kind of
    > users, or you will have two applications: one for internet and one for
    > intranet? I don't see any point to build a web service here
    >
    >
    =?Utf-8?B?bnV1dHV1ZG5ldA==?=, Sep 11, 2007
    #8
  9. On Sep 11, 9:26 am, nuutuudnet <> wrote:
    > Exactly, I have web users and in house intranet users. But we want both users
    > to make database changes in exactly and precisely the same way as far as
    > types, as far as date conversions, whatever. We hope with dotnet to be able
    > to write one program here in house, compile it, put one on the internet and
    > one local (both actually physically in the same machine) we'll write a GUI in
    > c# for in-house and an asp.net (??) GUI for the web but the kernal business
    > logic is exactly and precisely the same c#. I am hoping that someone could
    > tell me that it is indeed as simple as Aidy says just refrencing the methods,
    > classes and variables.
    > --
    > cheers,
    > nuutuudnet
    >
    >
    >
    > "Alexey Smirnov" wrote:
    > > On Sep 10, 4:16 pm, nuutuudnet <> wrote:
    > > > We have heard of these two things but they are not exactly what we want. We
    > > > understand remoting to be a sort of physical shoving back and forth of data
    > > > between two apps. And Web services do not also fit our scenario. We have
    > > > existing allready written C# logic. We want asp.net (OR our internet
    > > > programs) to simply be able to use this C# logic. We are simply trying to
    > > > avoid the work of building two apps, one for web and one for intranet.
    > > > --
    > > > cheers,
    > > > nuutuudnet

    >
    > > You wrote:

    >
    > > > Everything will run on the same server

    >
    > > Does it mean you will have the same application with two kind of
    > > users, or you will have two applications: one for internet and one for
    > > intranet? I don't see any point to build a web service here- Hide quoted text -

    >
    > - Show quoted text -


    What I ment, is that you can setup one application on one server for
    all users. You didn't say that it has to be different (intranet/
    internet), so why don't you make your existing intranet ASP.NET
    application available in the internet?
    Alexey Smirnov, Sep 11, 2007
    #9
  10. Maybe it is better to describe what we have now. What we have is one Visual
    Basic dll of which each user has his own copy on his own computer in house.
    Then we have a PHP based web portal where this Visual Basic business logic is
    imitated. I read through the VB and write the exact logic in PHP. All above
    named entities write to our central MS database. We run the PHP in Apache now
    but would like to switch to IIS. Our current problem is, everytime something
    changes in the Visual Basic, we have to write new PHP programs. We would like
    one program which we could distribute to all our inhouse users (which we
    allready do) --as well as-- internet portal. We allready have IIS an would
    just need to switch over. The thing is, we will not want to switch over, when
    we are forced to do with asp.net, what we allready have to do with PHP, that
    is write a different program which trys to imitate the inhouse desktop
    programs. Right now we have a windows programmer and a web programmer. We
    hope to just have one windows programmer, and one program to maintain.
    --
    cheers,
    nuutuudnet


    "Alexey Smirnov" wrote:

    > On Sep 11, 9:26 am, nuutuudnet <> wrote:
    > > Exactly, I have web users and in house intranet users. But we want both users
    > > to make database changes in exactly and precisely the same way as far as
    > > types, as far as date conversions, whatever. We hope with dotnet to be able
    > > to write one program here in house, compile it, put one on the internet and
    > > one local (both actually physically in the same machine) we'll write a GUI in
    > > c# for in-house and an asp.net (??) GUI for the web but the kernal business
    > > logic is exactly and precisely the same c#. I am hoping that someone could
    > > tell me that it is indeed as simple as Aidy says just refrencing the methods,
    > > classes and variables.
    > > --
    > > cheers,
    > > nuutuudnet
    > >
    > >
    > >
    > > "Alexey Smirnov" wrote:
    > > > On Sep 10, 4:16 pm, nuutuudnet <> wrote:
    > > > > We have heard of these two things but they are not exactly what we want. We
    > > > > understand remoting to be a sort of physical shoving back and forth of data
    > > > > between two apps. And Web services do not also fit our scenario. We have
    > > > > existing allready written C# logic. We want asp.net (OR our internet
    > > > > programs) to simply be able to use this C# logic. We are simply trying to
    > > > > avoid the work of building two apps, one for web and one for intranet.
    > > > > --
    > > > > cheers,
    > > > > nuutuudnet

    > >
    > > > You wrote:

    > >
    > > > > Everything will run on the same server

    > >
    > > > Does it mean you will have the same application with two kind of
    > > > users, or you will have two applications: one for internet and one for
    > > > intranet? I don't see any point to build a web service here- Hide quoted text -

    > >
    > > - Show quoted text -

    >
    > What I ment, is that you can setup one application on one server for
    > all users. You didn't say that it has to be different (intranet/
    > internet), so why don't you make your existing intranet ASP.NET
    > application available in the internet?
    >
    >
    =?Utf-8?B?bnV1dHV1ZG5ldA==?=, Sep 11, 2007
    #10
  11. On Sep 11, 12:42 pm, nuutuudnet <> wrote:
    > Maybe it is better to describe what we have now. What we have is one Visual
    > Basic dll of which each user has his own copy on his own computer in house.
    > Then we have a PHP based web portal where this Visual Basic business logic is
    > imitated. I read through the VB and write the exact logic in PHP. All above
    > named entities write to our central MS database. We run the PHP in Apache now
    > but would like to switch to IIS. Our current problem is, everytime something
    > changes in the Visual Basic, we have to write new PHP programs. We would like
    > one program which we could distribute to all our inhouse users (which we
    > allready do) --as well as-- internet portal. We allready have IIS an would
    > just need to switch over. The thing is, we will not want to switch over, when
    > we are forced to do with asp.net, what we allready have to do with PHP, that
    > is write a different program which trys to imitate the inhouse desktop
    > programs. Right now we have a windows programmer and a web programmer. We
    > hope to just have one windows programmer, and one program to maintain.
    > --


    Thanks for the explanation. What is still not clear is why do you need
    two kind of applications (VB and PHP site) to update the same
    database. If there is no difference in terms of access and permissions
    between intranet and internet users then why not just provide the
    system over the web? (in your case, via a PHP-based portal).
    Alexey Smirnov, Sep 11, 2007
    #11
  12. That is a very deep philosophical question :) One reason amoung many is that
    the system started out with the office app and then they added an internet
    portal later. They expanded little by little. They want to stay with the same
    model. Do you agree Smirnov with Aidy that the programs can simply be
    referenced from asp.net? I am about to go out and buy a book but the choices
    are overwelming and I just do not know which would fit my situation. One
    thing is clear we will not be doing Web Services. We will only resort to
    remoting if we cannot use/reuse ( or in this case reference) the c# in our
    asp.net programs.
    --
    cheers,
    nuutuudnet


    "Alexey Smirnov" wrote:

    > On Sep 11, 12:42 pm, nuutuudnet <> wrote:
    > > Maybe it is better to describe what we have now. What we have is one Visual
    > > Basic dll of which each user has his own copy on his own computer in house.
    > > Then we have a PHP based web portal where this Visual Basic business logic is
    > > imitated. I read through the VB and write the exact logic in PHP. All above
    > > named entities write to our central MS database. We run the PHP in Apache now
    > > but would like to switch to IIS. Our current problem is, everytime something
    > > changes in the Visual Basic, we have to write new PHP programs. We would like
    > > one program which we could distribute to all our inhouse users (which we
    > > allready do) --as well as-- internet portal. We allready have IIS an would
    > > just need to switch over. The thing is, we will not want to switch over, when
    > > we are forced to do with asp.net, what we allready have to do with PHP, that
    > > is write a different program which trys to imitate the inhouse desktop
    > > programs. Right now we have a windows programmer and a web programmer. We
    > > hope to just have one windows programmer, and one program to maintain.
    > > --

    >
    > Thanks for the explanation. What is still not clear is why do you need
    > two kind of applications (VB and PHP site) to update the same
    > database. If there is no difference in terms of access and permissions
    > between intranet and internet users then why not just provide the
    > system over the web? (in your case, via a PHP-based portal).
    >
    >
    >
    >
    =?Utf-8?B?bnV1dHV1ZG5ldA==?=, Sep 11, 2007
    #12
  13. On Sep 11, 3:36 pm, nuutuudnet <> wrote:
    > That is a very deep philosophical question :) One reason amoung many is that
    > the system started out with the office app and then they added an internet
    > portal later. They expanded little by little. They want to stay with the same
    > model. Do you agree Smirnov with Aidy that the programs can simply be
    > referenced from asp.net? I am about to go out and buy a book but the choices
    > are overwelming and I just do not know which would fit my situation. One
    > thing is clear we will not be doing Web Services. We will only resort to
    > remoting if we cannot use/reuse ( or in this case reference) the c# in our
    > asp.net programs.


    Well, the point is that in any case you will have two applications.
    And if idea was to reduce the cost of development then it doesn't
    really help, I think. If I were you, I would either go for one web
    client for everyone, or for a Smart Client (for Windows users,
    deployed over the web).

    http://en.wikipedia.org/wiki/ClickOnce
    http://msdn.microsoft.com/msdnmag/issues/04/05/ClickOnce/
    Alexey Smirnov, Sep 11, 2007
    #13
  14. Thanks for the links but this will not fit our needs because we do a lot of
    document opening, editing saving operations. This sounds like it has too
    limited power. Just try to imagine everything that can be done on the desktop
    in that program must also be done online (after going through a sign in
    process). And yes we will have two applications, but they will both be
    identical copies of the original the way we imagine it, or at least the way
    we think it can be done with .net
    --
    cheers,
    nuutuudnet


    "Alexey Smirnov" wrote:

    > On Sep 11, 3:36 pm, nuutuudnet <> wrote:
    > > That is a very deep philosophical question :) One reason amoung many is that
    > > the system started out with the office app and then they added an internet
    > > portal later. They expanded little by little. They want to stay with the same
    > > model. Do you agree Smirnov with Aidy that the programs can simply be
    > > referenced from asp.net? I am about to go out and buy a book but the choices
    > > are overwelming and I just do not know which would fit my situation. One
    > > thing is clear we will not be doing Web Services. We will only resort to
    > > remoting if we cannot use/reuse ( or in this case reference) the c# in our
    > > asp.net programs.

    >
    > Well, the point is that in any case you will have two applications.
    > And if idea was to reduce the cost of development then it doesn't
    > really help, I think. If I were you, I would either go for one web
    > client for everyone, or for a Smart Client (for Windows users,
    > deployed over the web).
    >
    > http://en.wikipedia.org/wiki/ClickOnce
    > http://msdn.microsoft.com/msdnmag/issues/04/05/ClickOnce/
    >
    >
    =?Utf-8?B?bnV1dHV1ZG5ldA==?=, Sep 12, 2007
    #14
  15. On Sep 12, 4:32 pm, nuutuudnet <> wrote:
    > Thanks for the links but this will not fit our needs because we do a lot of
    > document opening, editing saving operations. This sounds like it has too
    > limited power. Just try to imagine everything that can be done on the desktop
    > in that program must also be done online (after going through a sign in
    > process). And yes we will have two applications, but they will both be
    > identical copies of the original the way we imagine it, or at least the way
    > we think it can be done with .net
    > --
    > cheers,
    > nuutuudnet
    >
    >
    >
    > "Alexey Smirnov" wrote:
    > > On Sep 11, 3:36 pm, nuutuudnet <> wrote:
    > > > That is a very deep philosophical question :) One reason amoung many is that
    > > > the system started out with the office app and then they added an internet
    > > > portal later. They expanded little by little. They want to stay with the same
    > > > model. Do you agree Smirnov with Aidy that the programs can simply be
    > > > referenced from asp.net? I am about to go out and buy a book but the choices
    > > > are overwelming and I just do not know which would fit my situation. One
    > > > thing is clear we will not be doing Web Services. We will only resort to
    > > > remoting if we cannot use/reuse ( or in this case reference) the c# in our
    > > > asp.net programs.

    >
    > > Well, the point is that in any case you will have two applications.
    > > And if idea was to reduce the cost of development then it doesn't
    > > really help, I think. If I were you, I would either go for one web
    > > client for everyone, or for a Smart Client (for Windows users,
    > > deployed over the web).

    >
    > >http://en.wikipedia.org/wiki/ClickOnce
    > >http://msdn.microsoft.com/msdnmag/issues/04/05/ClickOnce/- Hide quoted text -

    >
    > - Show quoted text -


    In this case you will need to create a library encapsulating your data
    and business logic and use it both in WinForms and in ASP.NET.
    Presentation layer will be different.

    I found couple of articles that might be interesting for you

    Create a Trickle-Feed Application
    http://www.ftponline.com/vsm/2002_07/magazine/features/thomas/

    Deploy WinForms on the Web
    http://www.ftponline.com/vsm/2002_09/magazine/columns/desktopdeveloper/default_pf.aspx
    Alexey Smirnov, Sep 12, 2007
    #15
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrey Mazurov

    How to use DLLs from GAC in ASP.NET apps?

    Andrey Mazurov, Dec 16, 2003, in forum: ASP .Net
    Replies:
    10
    Views:
    16,939
    Brent
    Jan 24, 2004
  2. tshad
    Replies:
    5
    Views:
    516
    Steve C. Orr [MVP, MCSD]
    May 17, 2005
  3. Hylander

    To reuse or not to reuse....

    Hylander, Feb 26, 2004, in forum: Java
    Replies:
    0
    Views:
    410
    Hylander
    Feb 26, 2004
  4. code reuse and design reuse

    , Feb 7, 2006, in forum: C Programming
    Replies:
    16
    Views:
    1,001
    Malcolm
    Feb 12, 2006
  5. jacob navia

    To reuse or not to reuse

    jacob navia, Nov 5, 2006, in forum: C Programming
    Replies:
    19
    Views:
    513
    Dave Thompson
    Dec 18, 2006
Loading...

Share This Page