locked
machine.config validation key problem

    Question

  • Hi all,

    I want all of the ASP.NET applications on my Web server to use the same encryption and also validation keys. So i have to make the modifications in the Machine.config file instead of web.config file...

    Neither 32bit version of Net 2.0 nor 64bit version doesnt include the validation key tag in their machine.config files which are placed on their config folder.

    My server has a 64bit CPU. So i have to use Net 2.0 64bit. Unfortunately this config file doesnt include the validation attributes.

    Anyone know where it is? moved/removed?

    Thanks!

    Tuesday, April 04, 2006 1:45 PM

Answers

  • If one machine is running 1.1 and the other machine is running 2.0, then this won't work. (this seems to be the scenario you've described)
    Monday, April 24, 2006 8:38 PM

All replies

  • The following section:

    <system.web>
    <machineKey validationKey="" decryptionKey="" validation="" />
    </system.web>

    Can now be found in a "root" web.config file, located in the same directory as the machine.config file.

    This was a change in ASP.NET 2.0 - in fact to set any <system.web> settings globally for the machine, you need to set them in this new "root" web.config file

     

    Wednesday, April 05, 2006 5:55 PM
  • thanks for your assistance..

    I have few more questions...

    I have two servers for my applications whice are working as one.  Clients connect to these servers randomly (dns round robin). When someone login to my site from server x and than if the server changed to server y (dns round robin), my encyrpted cookies dont work on the server y unless i dont equalize the validation key tag on both server's machine.config. because of that reason i equalize this key, and i fix this problem. (framework 1.1,32bit)

    Now i have a new server with AMD64bit CPU. I installed the framework x64 2.0. I changed one of my old server with the new one. i set the validation key which i find it in a root web.config file,located in the same directory as the machine.config. But it doesnt work!

    What do u think? are the encyption methods of 32bit and 64bit different, even if they have the same validation key?
    is there any way to fix this problem???

    References:

    İ googled net and find a documentation.

    If i enter the following command
    "cscript %SystemDrive%\inetpub\AdminScripts\adsutil.vbs set w3svc/AppPools/Enable32bitAppOnWin64 1"

    64bit framework works as 32bit... But when i use this, my applications crash approximately in 2 hours.. so i cant use this metod too..


    I'm really trouble with my new server and also 64bit framework!!!

    Thanks!

    Friday, April 07, 2006 12:51 PM
  • If one machine is running 1.1 and the other machine is running 2.0, then this won't work. (this seems to be the scenario you've described)
    Monday, April 24, 2006 8:38 PM