我在IIS中配置了两个应用程序.我需要使用HttpContext对象将一些值从一个应用程序传递到另一个应用程序. 我已经尝试过使用 FormsAuthentication.SetAuthCookie("Hello",false) 在Httpcontext对象中设置一个值,通过 HttpContext.Current.User.Identity.Name 属性从其他应用程序检索. 到目前为止,一切正常,但我需要使用Httpcontext传递更多用户数据对象并在其他应用程序中检索它. 我该怎么做?是否可以使用HttpConext对象传递更多的用户数据.... 请帮助我:(
I have two applications configured in IIS. I need to Pass some values from one application to other using HttpContext object. I have tried out using FormsAuthentication.SetAuthCookie("Hello", false) which sets one value in the Httpcontext object which i m retrieving from other application through HttpContext.Current.User.Identity.Name property.Upto this all works fine but i need to pass more user data using Httpcontext object and retrive it in other application.How can i do that?Is it possible to pass more user data Using HttpConext Object or not....Please help me out :(
推荐答案实际上,实际上只是在客户端上设置了一个cookie.SetAuthCookie建立了用户身份验证cookie,它允许HttpContext.当前用户可用. 如果您想让应用程序#2读取应用程序#1数据,则可以让应用程序#1设置一个cookie,然后应用程序#2可以读取它. Actually, what is happening is simply a cookie being set on the client. SetAuthCookie establishes the user authentication cookie, which allows HttpContext.Current.User to be available.If you want to application #2 to read application #1 data, you could have app#1 set a cookie that app#2 can then read.
更多推荐
使用Httpcontext对象在应用程序之间进行通信.
发布评论