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:
24 Views
no comments
xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="ApplicationTitle" value="DevAsp Application Configuration Sample" /> <add key="ApplicationHeaderText" value="DevAsp" /> appSettings>
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>
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.
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>
279 Views
no comments
using System.IO; using System.Text; using Ninject; using NUnit.Framework; using Should.Extensions.AssertExtensions; namespace ninject.configurer.tests { public class GreeterConfig {
172 Views
no comments
using System; using System.Collections.Specialized; using System.Configuration; using Ninject.Modules; namespace Cirrostrata.NinjectConfigurator { public interface IConfigurableNinjectModule : INinjectModule { IConfigurationSyntax Configure<T>();
255 Views
no comments
<Target Name="UpdateWebConfig"> <XmlUpdate XmlFileName="$(PackageDir)\$(WebApplicationName)\web.config" XPath="//*/compilation/@debug" Value="false"/> </Target>
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"
256 Views
no comments
// 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:
306 Views
no comments
using System; using System.Collections.Specialized; using System.Web; using System.IO; namespace ConfigFileExample.Services { public interface IConfigurationManager { NameValueCollection AppSettings { get; }
501 Views
2 comments
public class ServicesConfig : ConfigurationSection { public static ServicesConfig GetConfig() { return (ServicesConfig)System.Configuration.ConfigurationManager.GetSection("servicesConfig"); } [ConfigurationProperty("serviceGroups", IsDefaultCollection = true)] public ServicesCollection ServicesCollection {
312 Views
no comments
<?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"/>
200 Views
no comments
<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>
388 Views
no comments
<configuration> <system.net> <mailSettings> <smtp deliveryMethod="SpecifiedPickupDirectory"> <specifiedPickupDirectory pickupDirectoryLocation="c:\email" /> </smtp> </mailSettings> </system.net> </configuration>
228 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
