ASP.NET Server level DataSet?

D

Dominic

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
 
A

Alvin Bruney

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top