Menu
Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
ASP .Net
ASP .Net Security
Create Forms Authentication Ticket with MachineKeys
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Thomas Sun [MSFT], post: 4285745"] Hi Chuck, Sorry for late responding. With Reflector, we can see that the FormsAuthentication.Encrypt method invokes MachineKeySection.EnsureConfig method which is used to load MachineKeySection from config file when it is null. The follow code is from .Net Framework: ============================ private static void EnsureConfig() { if (s_config == null) { lock (s_initLock) { if (s_config == null) { MachineKeySection machineKey = RuntimeConfig.GetAppConfig().MachineKey; machineKey.ConfigureEncryptionObject(); s_config = machineKey; s_compatMode = machineKey.CompatibilityMode; } } } } ========================== Without accessing web.config file, I think we cannot set its value. - Best Regards, Thomas Sun Microsoft Online Partner Support -------------------- | | I started messing with Reflector with | System.Web.Security.FormsAuthentication, but after about 4 pages of code I | stopped. They way they initialized static classes and had global members | being set in the middle of functions, just did not inspire confidence. | | [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
ASP .Net
ASP .Net Security
Create Forms Authentication Ticket with MachineKeys
Top