What is the simplest way to integrate two asp.net 2.0 webapplications?

  • Thread starter Thread starter Author
  • Start date Start date
A

Author

I asked about this here a few days ago. I am still testing and trying
to figure out what is the simplest solution.

OK, I have two web applications developed independently by two web
developers. I would like to integrate them into one application such
that there is only one Login and one Logout (in other words, single
sign-in and single logout for these 2 applications)

I tried the following, which is probably whimsical. :-)

1) Created a container folder called MyWebsites
2) Created Web.config, Login.aspx and Logout.aspx immediately under
MyWebsites folder.
3) Copied both Website1 and Website2 to this MyWebsites folder, and
removed the web.config files of both Website1 and Website2.

Now, the file structure is as shown here:

http://gnewsgroup.googlepages.com/howtointegrate2webapp?

The problem then is that classes under App_Code of either websites are
no longer accessible. The MSDN article at http://msdn.microsoft.com/en-us/library/t990ks23.aspx
says:

<quote>
If your Web application includes code that you want to share between
pages, you can keep the code in one of two special folders underneath
the root of your Web application, the Bin folder and the App_Code
folder.
</quote>

It explicitly says that App_Code should be placed underneath the root
of a Web application. This sorta explains why those classes are no
longer accessible if I integrate those two web applications in that
way.

Had it worked, it would have been an easy solution. But am I close to
any solution like this? Or this rout would never work? Please share
your two cents. Thanks a lot.
 
I asked about this here a few days ago. I am still testing and trying
to figure out what is the simplest solution.

OK, I have two web applications developed independently by two web
developers. I would like to integrate them into one application such
that there is only one Login and one Logout (in other words, single
sign-in and single logout for these 2 applications)

I tried the following, which is probably whimsical. :-)

1) Created a container folder called MyWebsites
2) Created Web.config, Login.aspx and Logout.aspx immediately under
MyWebsites folder.
3) Copied both Website1 and Website2 to this MyWebsites folder, and
removed the web.config files of both Website1 and Website2.

Now, the file structure is as shown here:

http://gnewsgroup.googlepages.com/howtointegrate2webapp?

The problem then is that classes under App_Code of either websites are
no longer accessible. The MSDN article athttp://msdn.microsoft.com/en-us/library/t990ks23.aspx
says:

<quote>
If your Web application includes code that you want to share between
pages, you can keep the code in one of two special folders underneath
the root of your Web application, the Bin folder and the App_Code
folder.
</quote>

It explicitly says that App_Code should be placed underneath the root
of a Web application. This sorta explains why those classes are no
longer accessible if I integrate those two web applications in that
way.

Had it worked, it would have been an easy solution. But am I close to
any solution like this? Or this rout would never work? Please share
your two cents. Thanks a lot.

hmmm... your problem might be as simple as copying files into the
right directory, but I doubt it. Here's an example of how complex it
could be.

Lets say you have two games, Unreal Tournament and Need For Speed, and
you want to combine them into a new game where you can run around with
a gun killing people and ALSO drive a car really fast around the city,
possibly killing people (simple thread here). We'll call this new game
Grand Theft Auto :)

Obviously just copying both game executable files into the same
directory and running one won't work, you would not expect that just
because the other game exe is available that it's functionality will
also be. So how about we copy all the data files from one game into
the other games data files directory? No, probably not, just because
one game has access to the other games data files doesn't mean it will
use them, or that it even knows how to. What if we overwrite one games
data files with the data files from the other game? Hmm... nope that
won't work either, obviously it will error out, I mean it's trying to
run one game with the data from another, if it doesn't error out I am
so calling Skully and Moulder it's not funny. So, this means what you
really need is a programmer to analyze the source for each game and
meld them together into a single, awesome game. One where you get to
kill lots of people.

I suspect you're going to want to do the same with your application.
Just dropping them into the same directory, on a web site, or even a
different directory, won't work, you will need them professionally
combined.

Hope this helps.
Denz.
 
Back
Top