Senator Guerra Souty original series calendar,replica hublot blue steel peach pointer collocation of rolex replica Rome digital scale, track type minute replica watches scale shows that the classical model is swiss replica watches incomparable, wearing elegant dress highlights.
mr-ponna.com

 


ASP.NET Configuration articles and tutorials

Read ASP.NET Configuration articles

Sort by:

<< Start < Prev 1 Next > End >>
Page 1 of 1

ASP.NET Configuration articles and tutorials

# articles: 2  


Encrypt connectionStrings section of web.config

View(s): 8728

Encrypt connectionStrings section of web.config

Web.Config
<configuration>
    <connectionStrings>
        <add name="ConnString" connectionString="Data Source=.\SQLEXPRESS; 
AttachDbFilename=|DataDirectory|MyDatabase.mdf;Integrated Security=True;User Instance=True" />
    </connectionStrings>
</configuration>


The easiest way to encrypt the <connectionStrings> section is to use the aspnet_regiis command-line tool.
This tool is located in the following folder:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\

Executing the following command encrypts the <connectionStrings> section of a Web.Config file
located in a folder with the path c:\Websites\MyWebsite:
   
    aspnet_regiis -pef connectionStrings "c:\Websites\MyWebsite"

The -pef option (Protect Encrypt Filepath) encrypts a particular configuration section located at a particular path.

You can decrypt a section with the -pdf option like this:

    aspnet_regiis -pdf connectionStrings "c:\Websites\MyWebsite"

ASP.NET page can read the value of the connection string by using the <%$ ConnectionStrings:ConnString %> expression

(Continued...) View Full Aritlce


  Last updated on Friday, 11 July 2014
  Author: Mr. Ponna
4/5 stars (4 vote(s))



What are Master Pages in .NET? Why we need Master Pages and how do we use Master Pages in our applications?

View(s): 20078


What are Master Pages in .NET? Why we need Master Pages and how do we use Master Pages in our applications?


Life before Master Pages

For a given website, there are multiple web pages with common layout. How we can achieve this?

  • Write the layout of the code in each page. But this leads to code redundancy which is not correct.
  • We can achieve the common layout, by using User controls.

Advantage of User Controls:

  • Turning an existing ASP.NET page into a user control requires only a few minor changes. User controls can be easily linked to any page that needs their services.
  • Furthermore, changes to a user control's implementation do not affect the referencing page and only require recompiling of the user control into an assembly.

Disadvantage of User Controls:

  • Any alteration to the control's public interface (such as the class name, properties, methods, or events) leads to the pages that reference the control must be updated.
  • Those pages must be re-compiled and needs deployment.
  • In addition, the next time a user views each page, the ASP.NET runtime will take a while to respond because the dynamic assembly for the page must be re-created.

Apart from the above two options, the other options is to use Master pages. A Master page is a file that contains the static layout of the file. It consists of the layout that is common throughout application (i.e. Application Level) or a folder level and dynamic parts will be customized by the pages that are derived from the Master page.

(Continued...) View Full Aritlce


  Last updated on Thursday, 13 March 2014
  Author: HariSantosh Kadiyala
3/5 stars (12 vote(s))

<< Start < Prev 1 Next > End >>
Page 1 of 1
Register Login Ask Us Write to Us Help