Re: Encrypt connection string - Access denied



the worker process would need write access to the webroot - nothing you want to do!

better write a console app or use aspnet_regiis.exe (under an admin account) to encrypt sections at deployment time.


-----
Dominick Baier (http://www.leastprivilege.com)

Developing More Secure Microsoft ASP.NET 2.0 Applications (http://www.microsoft.com/mspress/books/9989.asp)

Using the tutorial:

Protecting Connection Strings and Other Configuration Information

http://www.asp.net/learn/data-access/tutorial-73-cs.aspx

The sample code works fine, but it does not work in my web application
on my local machine or on a test server.

When I try to encrypt my sql connection string, I get an error
message: Access to the path 'c:\inetpub\wwwroot\....\cjhspoo2.tmp' is
denied.

web.config line 0

I assume it is here: Configuration config =
System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(
Request.ApplicationPath);

I have tried changing settings in IIS 6.0 with no luck. The sample
program code works but not with my website.

Is there some other permission that needs to be set?

Will this ever work on a shared server or is there a better approach?

Greg G



.



Relevant Pages

  • Re: Windows Server to Debian migration
    ... >> Right now I am trying to decide how I will migrate from a test server I will ... I simply need the configuration of all the packages, ... >> structure of my OpenLDAP install, apache, ftp, samba, and any other ... Check *all* of your configuration files into CVS ...
    (Debian-User)
  • RE: ActiveDirectory and user page Access
    ... like for the role management I found this link: ... Do you mean you want the sample code of validate the group or role that the ... That depends on your configuration in web.config. ... Again, for SqlRoleProvider, the best sample I ever found is the ...
    (microsoft.public.vsnet.general)
  • Re: How to write code for this XML configuration section?
    ... Professional Numbskull ... "Kevin Spencer" wrote: ... try to find out a way to implement my XML configuration sections. ... (Look for the sample code included) ...
    (microsoft.public.dotnet.framework)
  • Re: web.config question 2.0
    ... can only retrieve connection strings from within the current application. ... To retrieve configuration settings from a different application, ... What you're proposing would remove the application's configuration as an application, ... Juan T. Llibre, asp.net MVP ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How to write code for this XML configuration section?
    ... (Look for the sample code included) ... powerful and strongly-typed Configuration model. ... The bottom-most class is the ConfigurationElement class, ... Show me your certification without works, ...
    (microsoft.public.dotnet.framework)