Error when try to encrypt connectionstring using aspnet_regiis -pe

Discussion in 'ASP .Net' started by rockdale, Dec 20, 2007.

  1. rockdale

    rockdale Guest

    I followed this article,

    http://msdn2.microsoft.com/en-us/library/zhhddkxy.aspx


    My command is:
    aspnet_regiis -pe "connectionStrings" -app "/myWebSiteName" -site
    711831 -prov "RsaProtectedConfigurationProvider"


    The error message is: A configuration file cannot be created for the
    requested configuration object.
    Failed!


    ASPNET user is under administrators group
    my website is not a virtual directory under default website, that's
    why I need to specify the site no.
    OS is Windows 2003 server


    Am I missing anything?


    Thanks in advance
    -rockdale
    rockdale, Dec 20, 2007
    #1
    1. Advertising

  2. Re: Error when try to encrypt connectionstring using aspnet_regiis-pe

    On Dec 20, 4:46 pm, rockdale <> wrote:
    > I followed this article,
    >
    > http://msdn2.microsoft.com/en-us/library/zhhddkxy.aspx
    >
    > My command is:
    > aspnet_regiis -pe "connectionStrings" -app "/myWebSiteName" -site
    > 711831 -prov "RsaProtectedConfigurationProvider"
    >
    > The error message is: A configuration file cannot be created for the
    > requested configuration object.
    > Failed!
    >
    > ASPNET user is under administrators group
    > my website is not a virtual directory under default website, that's
    > why I need to specify the site no.
    > OS is Windows 2003 server
    >
    > Am I missing anything?
    >
    > Thanks in advance
    > -rockdale


    Try to use -location instead of -app -site. App exprected a virtual
    path.

    aspnet_regiis.exe /?

    -pe section Encrypt the configuration section. Optional
    arguments:
    [-prov provider] Use this provider to encrypt.
    [-app virtual-path] Encrypt at this virtual path.
    Virtual
    path must begin with a forward slash. If it is
    '/', then it
    refers to the root of the site. If -app is not
    specified,
    the root web.config will be encrypted.
    [-site site-name-or-ID] The site of the virtual
    path
    specified in -app. If not specified, the default
    web site
    will be used.
    [-location sub-path] Location sub path.
    [-pkm] Encrypt/decrypt the machine.config instead
    of
    web.config.
    Alexey Smirnov, Dec 20, 2007
    #2
    1. Advertising

  3. Did you try doing a aspnet_regiis -pef instead of -pe? You can then reference
    the config file's physical path and avoid the hassle. I've always used that
    anyways. To me it seems more precise and less blackboxish.

    --
    Mohamad Elarabi
    Lead Developer. MCTS, MCPD.


    "rockdale" wrote:

    > I followed this article,
    >
    > http://msdn2.microsoft.com/en-us/library/zhhddkxy.aspx
    >
    >
    > My command is:
    > aspnet_regiis -pe "connectionStrings" -app "/myWebSiteName" -site
    > 711831 -prov "RsaProtectedConfigurationProvider"
    >
    >
    > The error message is: A configuration file cannot be created for the
    > requested configuration object.
    > Failed!
    >
    >
    > ASPNET user is under administrators group
    > my website is not a virtual directory under default website, that's
    > why I need to specify the site no.
    > OS is Windows 2003 server
    >
    >
    > Am I missing anything?
    >
    >
    > Thanks in advance
    > -rockdale
    >
    >
    >
    Mohamad Elarabi, Dec 20, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?TWFyYyBCLg==?=
    Replies:
    3
    Views:
    4,408
    Juozas_K
    Jul 2, 2007
  2. Rajeev Gopal

    Re: encrypt connectionString in app.config

    Rajeev Gopal, Jun 10, 2010, in forum: ASP .Net
    Replies:
    0
    Views:
    798
    Rajeev Gopal
    Jun 10, 2010
  3. den 2005
    Replies:
    4
    Views:
    208
    den 2005
    Jul 26, 2006
  4. Arne Garvander

    Encrypt connectionstring in web.config

    Arne Garvander, Nov 2, 2007, in forum: ASP .Net Security
    Replies:
    1
    Views:
    149
    Consultant
    Nov 5, 2007
  5. http://ejobseek.com

    Encrypt in Perl, De-encrypt in Javascript

    http://ejobseek.com, Sep 1, 2003, in forum: Perl Misc
    Replies:
    3
    Views:
    269
    James Willmore
    Sep 1, 2003
Loading...

Share This Page