multiple portals on one host & cookies

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
12/10/2006 1:41:41 AM
Gravatar
Total Posts 488

Re: multiple portals on one host & cookies

As far as I can see, you use cookies to store some user settings. The name of these cookies are domain-specific.
So, if I install 2 or more portals on the same host (as I do on my development environment) they begin to share these cookies.

It would be nice to change cookies names according to application's virtual path to avoid this problem.
12/10/2006 4:02:41 AM
Gravatar
Total Posts 18439

Re: multiple portals on one host & cookies

Yes I am aware that on a development machine using localhost you can have cookie conflicts but this is not a problem specific to mojoPortal. You can just as easily have a conflict with
http://localhost/mojoportal
and
http://localhost/somenonomojoportalapp

Cookies are supposed to be host name (aka domain name) specific, see RFC 2965

I do not think it is a good idea to try and mange some path into the cookie name to solve this. For one thing there is no guarantee there will be a path after the host name. You could easily have mojoportal running at
http://localhost
or http://someotherhost

Another easy way to solve this on your development machine is to edit your hosts file located at
Windows\System32\drivers\etc\hosts

There you will see is where the name localhost is bound to the loopback address 127.0.0.1, but you can easily bind other names there as well to avoid the cookie problem. For example you can put
dev1 127.0.0.1
dev2 127.0.0.1

Then you can access multiple mojoportal apps on your dev machine by using different host names
http://dev1/mojoportal
will not conflict with
http://dev2/mojoportal

In the above example they would point to the very same physical directory but still could be completely independent sites using the feature in mojoportal to host multiple sites on one installation. The key is they MUST have different host names.

You could also use separate physical directories like:
http://dev1/mojo1
and
http://dev2/mojo2

Joe
You must sign in to post in the forums. This thread is closed to new posts.