Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Error when try to encrypt connectionstring using aspnet_regiis -pe (http://www.velocityreviews.com/forums/t562618-error-when-try-to-encrypt-connectionstring-using-aspnet_regiis-pe.html)

rockdale 12-20-2007 03:46 PM

Error when try to encrypt connectionstring using aspnet_regiis -pe
 
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



Alexey Smirnov 12-20-2007 07:17 PM

Re: Error when try to encrypt connectionstring using aspnet_regiis-pe
 
On Dec 20, 4:46 pm, rockdale <rockdale.gr...@gmail.com> 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.

Mohamad Elarabi 12-20-2007 07:23 PM

RE: Error when try to encrypt connectionstring using aspnet_regiis -pe
 
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
>
>
>



All times are GMT. The time now is 04:13 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.