CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of config
Encrypting appSettings and connectionStrings sections in web.config :
 
   aspnet_regiis.exe –pef "appSettings" "<Path.to.website.directory>"
 
   aspnet_regiis.exe –pef "connectionStrings" "<Path.to.website.directory>"
 
-----
 
Encrypting appSettings and connectionStrings sections in web.config and specifying the Data Protection Provider:
by NEParis   January 04, 2012 @ 9:33am
24 Views
no comments
 
C#
xml version="1.0" encoding="utf-8" ?>
<configuration>
 
      <appSettings>
 
            <add key="ApplicationTitle" value="DevAsp Application Configuration Sample" />
            <add key="ApplicationHeaderText" value="DevAsp" />
           
      appSettings>
 
by Jose David Parra   July 05, 2011 @ 8:25pm
Tags: Config
69 Views
no comments
 
<?xml version="1.0" encoding="UTF-8"?>
 
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
 
<configuration>
 
    <system.web>
by joe911   June 14, 2011 @ 3:24am
129 Views
no comments
 
# If you read this it means you want to edit this file manually, so here
# are some useful tips:
#
# - You can add your own menu-entries to ~/.fluxbox/usermenu
#
# - If you miss apps please let me know and I will add them for the next
# release.
#
# - The -r option prevents removing of empty menu entries and lines which
# makes things much more readable.
by Mac_live   June 05, 2011 @ 4:19pm
127 Views
no comments
 
<system.diagnostics>
  <sources>
    <source name="System.ComponentModel.Composition" switchValue="Error">
      <listeners>
        <add name="fileListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="Mef Composition.log" />
      </listeners>
    </source>
  </sources>
  <trace autoflush="true" indentsize="4" />
</system.diagnostics>
by bnaya   November 03, 2010 @ 5:03am
Tags: MEF, Debug, Config
279 Views
no comments
 
C#
using System.IO;
using System.Text;
using Ninject;
using NUnit.Framework;
using Should.Extensions.AssertExtensions;
 
namespace ninject.configurer.tests
{
    public class GreeterConfig
    {
by Andy Sherwood   October 28, 2010 @ 2:19pm
172 Views
no comments
 
C#
using System;
using System.Collections.Specialized;
using System.Configuration;
using Ninject.Modules;
 
namespace Cirrostrata.NinjectConfigurator
{
    public interface IConfigurableNinjectModule : INinjectModule
    {
        IConfigurationSyntax Configure<T>();
by Andy Sherwood   October 26, 2010 @ 11:16am
255 Views
no comments
 
XML
<Target Name="UpdateWebConfig">
   <XmlUpdate XmlFileName="$(PackageDir)\$(WebApplicationName)\web.config"
              XPath="//*/compilation/@debug"
              Value="false"/>
 </Target>
 
by Petter Wigle   September 08, 2010 @ 1:32am
198 Views
no comments
 
To Encrypt, run the following from the Visual Studio command prompt:
 
  aspnet_regiis -pe "connectionStrings" -app "/AppName" -prov "RsaProtectedConfigurationProvider"
 
To Decrypt, run the following from the Visual Studio command prompt:
 
  aspnet_regiis -pd "connectionStrings" -app "/AppName"
 
by Al Gonzalez   July 12, 2010 @ 4:39pm
256 Views
no comments
 
XML
// Howto to add the sql Memberschip provider and configure a default web application
 
// Register the sql membership provider tables in sql server
// -E      Authenticate with current Windows credentials.
// -S     server
// -d    Database        
// -A    mr        -> Membership and Role manager
    C:\Windows\Microsoft.NET\Framework\v2.0.5027>aspnet_regsql.exe -E -S server-01 -d MyDatabaseCatalogName -A mr
 
// Add membership and roleprovider to Web.config and configure connectionstings:
by Arjan   April 03, 2010 @ 4:04am
306 Views
no comments
 
C#
using System;
using System.Collections.Specialized;
using System.Web;
using System.IO;
 
namespace ConfigFileExample.Services
{
    public interface IConfigurationManager
    {
        NameValueCollection AppSettings { get; }
by Bob Cravens   February 03, 2010 @ 2:46pm
501 Views
2 comments
 
C#
public class ServicesConfig : ConfigurationSection
    {
        public static ServicesConfig GetConfig()
        {
            return (ServicesConfig)System.Configuration.ConfigurationManager.GetSection("servicesConfig");
        }
 
        [ConfigurationProperty("serviceGroups", IsDefaultCollection = true)]
        public ServicesCollection ServicesCollection
        {
by Amitabh   January 22, 2010 @ 9:46am
Tags: .net, config
312 Views
no comments
 
XML
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="servicesConfig" type="Admin.Config.ServicesConfig, TestConsole"/>
  </configSections>
  <servicesConfig>
    <serviceGroups>
      <services group="group1">
        <add name="Service1" host="localhost"/>
        <add name="Service2" host="localhost"/>
by Amitabh   January 22, 2010 @ 9:42am
Tags: .net, config
200 Views
no comments
 
C#
<system.web>
  <pages>
    <controls>
      <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      <add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit"/>
      <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    </controls>
  </pages>
</system.web>
by afsharm   December 24, 2009 @ 5:00am
388 Views
no comments
 
XML
<configuration>
    <system.net>
        <mailSettings>
            <smtp deliveryMethod="SpecifiedPickupDirectory">
                <specifiedPickupDirectory pickupDirectoryLocation="c:\email" />
            </smtp>
        </mailSettings>
    </system.net>
</configuration>
by Barry King   July 22, 2009 @ 1:12am
228 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate