ASP.NET Server level DataSet?

Discussion in 'ASP .Net Web Controls' started by Dominic, Nov 15, 2003.

  1. Dominic

    Dominic Guest

    Here's the situation:
    I have 2 web projects for the same client, a WWW-Public web project
    and an Admin project. Both projects are on the same server and I
    found myself loading the exact same dataset in each project. Rather
    than duplicate server resources I created a 3rd project which has the
    common DataSet and certain modules that manipulate the DataSet. My
    test cases were run within the 3rd project where all worked fine. Now
    I'm in the quandry where I can't use that 3rd project dataset in the
    other 2 projects. Caching/Application Variables seem to be out of the
    question unless someone knows a way for a project to reference its own
    httpcontext over the actual requesting context from the other
    project(s). I can't seem to get any type of a global variable on the
    3rd project to work as only the project that created the dataset can
    see/use it, thus requiring an instance per project which is what I'm
    tring to avoid. Any ideas?

    quick rant:
    Microsoft's answer for cross-project issues always seems to be 'by
    design for security' which is annoying. As a .Net programmer it's
    soooo tempting to want to easily share compilable controls/forms
    between projects. Not even offering it is a huge limitation on an
    otherwise powerful platform. I understand the security concern but
    would it have been so hard to offer it allowed if only explicitly?

    Dominic
    Dominic, Nov 15, 2003
    #1
    1. Advertising

  2. Dominic

    Alvin Bruney Guest

    It's tempting but microsoft is right because allowing such behavior is a
    hackers dream come true.

    You have a couple of options here. Basically you will need to push the
    dataset from one process to another.

    For that you can use .net remoting which will be the fastest method or you
    can write a webservice to transport the dataset back and forth. The
    webservice will run on the machine and will just return a dataset so any
    process can call it and get a dataset back. Finally, you can use state
    server to cache the dataset somewhat like a web farm scenario. This sounds
    tempting but it is a radical change in architecture just to get a dataset
    visible across applications. I'd personally go with the webservice because
    it is easily callable from anywhere at anytime. There may be other options
    as well, but these will get you started.

    regards

    --


    -----------
    Got TidBits?
    Get it here: www.networkip.net/tidbits
    "Dominic" <> wrote in message
    news:...
    > Here's the situation:
    > I have 2 web projects for the same client, a WWW-Public web project
    > and an Admin project. Both projects are on the same server and I
    > found myself loading the exact same dataset in each project. Rather
    > than duplicate server resources I created a 3rd project which has the
    > common DataSet and certain modules that manipulate the DataSet. My
    > test cases were run within the 3rd project where all worked fine. Now
    > I'm in the quandry where I can't use that 3rd project dataset in the
    > other 2 projects. Caching/Application Variables seem to be out of the
    > question unless someone knows a way for a project to reference its own
    > httpcontext over the actual requesting context from the other
    > project(s). I can't seem to get any type of a global variable on the
    > 3rd project to work as only the project that created the dataset can
    > see/use it, thus requiring an instance per project which is what I'm
    > tring to avoid. Any ideas?
    >
    > quick rant:
    > Microsoft's answer for cross-project issues always seems to be 'by
    > design for security' which is annoying. As a .Net programmer it's
    > soooo tempting to want to easily share compilable controls/forms
    > between projects. Not even offering it is a huge limitation on an
    > otherwise powerful platform. I understand the security concern but
    > would it have been so hard to offer it allowed if only explicitly?
    >
    > Dominic
    Alvin Bruney, Nov 15, 2003
    #2
    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. Replies:
    2
    Views:
    441
  2. =?Utf-8?B?Sm9l?=

    page-level vs control-level enableViewState

    =?Utf-8?B?Sm9l?=, Oct 26, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    2,926
    S. Justin Gengo
    Oct 26, 2005
  3. Replies:
    8
    Views:
    459
  4. mike
    Replies:
    1
    Views:
    1,132
    Martin Honnen
    Nov 20, 2004
  5. pabbu
    Replies:
    8
    Views:
    720
    Marc Boyer
    Nov 7, 2005
Loading...

Share This Page