两个网站共享session:
登陆后A,记下登陆口令,链接到B,共享session,
1、aspnet_state 已启动!
2、web.config 中已设置StateServer
3、当machine.config   validationkey="012..ef.."(128),
                      decryptionkey="01..2..ef"(48个),
                      validation="3DES";出错?求助各位高手,请赶快帮忙!出错时的提示:
指定键是 TripleDES 的已知弱键,不能使用。 
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Security.Cryptography.CryptographicException: 指定键是 TripleDES 的已知弱键,不能使用。源错误: 执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。  堆栈跟踪: 
[CryptographicException: 指定键是 TripleDES 的已知弱键,不能使用。]
   System.Security.Cryptography.TripleDES.set_Key(Byte[] value) +226
   System.Web.Configuration.MachineKey.ConfigureEncryptionObject(MachineKeyConfig config) +472
   System.Web.Configuration.MachineKey.EnsureConfig() +96
   System.Web.Compilation.CompilationMutex..ctor(Boolean initialOwner, String name, String comment) +12
   System.Web.Compilation.CompilationLock..cctor() +112[TypeInitializationException: “System.Web.Compilation.CompilationLock”的类型初始值设定项引发异常。]
   System.Web.UI.TemplateParser.GetParserCacheItemInternal(Boolean fCreateIfNotFound) +20
   System.Web.UI.TemplateParser.GetParserCacheItem() +32
   System.Web.UI.ApplicationFileParser.GetCompiledApplicationType(String inputFile, HttpContext context, ApplicationFileParser& parser) +171
   System.Web.HttpApplicationFactory.CompileApplication(HttpContext context) +43
   System.Web.HttpApplicationFactory.Init(HttpContext context) +485
   System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +170
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +414 

解决方案 »

  1.   

    web.config中的设置将重写machine.config中的设置
    所以,无需更改mathine.config
    在web.config中找到sessionState配置节。
    将mode属性设置为StateServer
    修改stateConnectionString属性,使它显示状态服务器的服务器名称和asp.net状态服务器监视的端口,默认为42424
      

  2.   

    除了在服务器提供共享的地方,也要保证两个网站的SessionID是相同的啊.
      

  3.   


    what is the relationship between A and B?How to create keys by using Visual C# .NET for use in Forms authentication
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;312906