tags:

views:

59

answers:

5

hi all,

Our customer has a requirement to extend the functionality of their existing large government project. It is an ASP.NET 3.5 (recently upgraded from 2.0) project.

The existing solution is quite a behemoth that is almost unmaintainable so they have decided that they want to provide the new functionality by hosting it on another website that is shown within the existing website.

As to how this is best to be done I'm not quite sure right now and if there is any security issues preventing it or that need to be considered.

Essentially the user would log on to the existing web site as normal and when cliicking on a certain link the page would load as normal with some kind of frame or control that has within it the contents of the page from the other site. IE. They do not want to simply redirect to the other site they want to show it embedded within the current one such that the existing menus etc are still available.

I believe if information needed to be passed to the embedded page it would be done using query strings as I'm not sure if there is even another way to accomplish this.

Can anyone give me some pointers on where to start at looking to implement this or any potential pitfalls I should be aware of.

Thanks

+1  A: 

create a virtual directory under the primary domain. If your domain is www.mydomain.com then create a virtual directory www.mydomain.com/site and port the new website application under /site virtual directory. This was linking should become very much relavant. With this the virtual-directory application will also retain all domain cookies set by primary domain.

this. __curious_geek
I'm not sure if that answers my question. I was more takling in terms of actually getting a page to display within another and passing at least a query string to the embedded page.Also what do you mean by your last sentence?Thanks
Daniel
+1  A: 

I would suggest to make the second website look exactly like the first one or at least use the same MasterPage, so you can redirect from one site to another without any visual difference.

If your site needs authentication, consider that you would need to do something to prevent the user to log in twice, an option could be to send an encrypted token to the second site.

All of this if you are forced to have a second site, if not just use a virtual directory

alejandrobog
A: 

Hi Daniel,

I would use an iFrame to embed that website in within your existing application. Just set the "src" attribute and pass in any query string parameters the other site needs to render correctly.

You can still pass in sensitive data in the query string, however it would make sure to encrypt it before sending it in.

I know it is not the most elegant solution, but it gets the job done. And from the description of the existing app, it doesn't seem like your customer cares for "elegance" :)

Hope this helps

Diego C.
+2  A: 

if the 2 sites are hosted from the same network (low latency between them) you could use state server for session management. that way, when you authenticate on one site, you will also be authenticated on the other, and share user state across them.

its pretty simple, in your web config of each web server you'd point to the state server (which could be located on one of the web servers)

<configuration>
  <system.web>
    <sessionState mode="StateServer"
       stateConnectionString="192.168.1.103:42424"
    />
  </system.web>
</configuration>

http://en.csharp-online.net/ASP.NET_State_Management%E2%80%94Storing_Session_State_out_of_Process

Sonic Soul
A: 

You could use something like UFrame. I've used it a couple of times and seems to do quite a good job with it...

"goodness of UpdatePanel and IFRAME combined"

http://www.codeproject.com/KB/aspnet/uframe.aspx

Paul