Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 6 of 6

Thread: Can encrypt Web.config be turned off at the database?

  1. #1
    cksite is offline Senior Member
    Join Date
    Apr 2006
    Location
    Easthampton Massachusetts
    Posts
    125

    Default Can encrypt Web.config be turned off at the database?

    ML 8.0.1.2/8.0.1.2

    We can't access administration in our new development copy, we think we need to change the DB connection string but Web.config was set for encrypt when the database was copied.
    Can we turn off "Encrypt web.config" in the database rather than with the setup wizard which we can get access?
    Or do we simply need to have the database copied again, but with encrypt Web.config set for no?

  2. #2
    deanfp is offline Senior Member
    Join Date
    May 2009
    Location
    Sweden
    Posts
    556

    Default

    Our dev site was not encrypted and never has been but does not stop us accessing it .

    I had the same issues but found that it was down to security issues. Providing that the Network System has full rights on the web/image folder that seemed to cure the problem for me.

    Also we changed the name of our admin folder to a new name and ensured this was changed in the web config file.

    Our url was http://localhost/fodlername/NutriAdmin

    Hope that the Aspnet team can sort this for you

    Ps out of interest can you actually see your dev website ?as usually if you can you should not have issues with the admin.

  3. #3
    Dusty is offline Member
    Join Date
    Jun 2009
    Posts
    176

    Default

    You won't need to copy the database again, but you'll need to put a decrypted web.config on your production server and re-encrypt it from there. By default, the web.config file uses the private key on each server to encrypt the web.config file, hence encrypted web.config files cannot transfer successfully from one server to another.

    Dusty
    ASPDotNetStorefront Staff

  4. #4
    cksite is offline Senior Member
    Join Date
    Apr 2006
    Location
    Easthampton Massachusetts
    Posts
    125

    Default

    You won't need to copy the database again, but you'll need to put a decrypted web.config on your production server and re-encrypt it from there. By default, the web.config file uses the private key on each server to encrypt the web.config file, hence encrypted web.config files cannot transfer successfully from one server to another.
    OK, good to know. Does that mean I need to change the "EncryptKey" that is on line 42 of the unencrypted web.config file before copying it over to the dev server?
    If so, do I make up a new one or get that value from somewhere on the dev Server?

  5. #5
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    Just make sure that it matches the Encrypt Key of the web.config that was originally tied to that database, otherwise, it will surely pose an issue. Please ensure a full backup of your database and your web.config file before doing so...

  6. #6
    cksite is offline Senior Member
    Join Date
    Apr 2006
    Location
    Easthampton Massachusetts
    Posts
    125

    Default

    Thank you. Worked like a charm. Copied the original unencrypted Web.config file over to the development server, set the database connection string, now admin works great.