多域失败的会话共享 [英] Session Sharing on Multiple domain failure

查看:85
本文介绍了多域失败的会话共享的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个网站。我已经在给定的子域名上传了这两个网站



1)test.example.com

2) run.example.com



本地工作正常,但在服务器上它不工作。我想在这个应用程序之间共享会话。使用sql server作为会话模式。我完成了基于给定网站的那些活动。



共享会话

I have two websites.I have uploaded the both website in given subdomain

1)test.example.com
2)run.example.com

Locally its working fine but in server its not working.I wanted to share session between this application.using sql server as session mode.I done those activity based on given websites.

Sharing session

推荐答案

您无法从另一个域中的一个域读取Cookie或会话。这是浏览器中实现的安全性。使用数据库进行会话可以让多个服务器/域可以共享会话。
You can't read cookies Or Session from one domain in another domain. That's a security thing implemented in the browser. Using a database for your sessions allows you to have multiple servers/Domain can share sessions.


这篇关于多域失败的会话共享的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆