This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var appHostConfigFile = @"\\{serverName}\c$\windows\system32\inetsrv\config\applicationHost.config"; | |
| using (var server = new ServerManager(appHostConfigFile)) | |
| { | |
| // Do some stuff | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using (var server = ServerManager.OpenRemote(serverName)) | |
| { | |
| // Do some stuff | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Net.Http.Headers; | |
| using Newtonsoft.Json; | |
| public static class HttpHeadersExtensions | |
| { | |
| public static string ToJson(this HttpHeaders headers) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Net.Http; | |
| public static class HttpRequestMessageExtensions | |
| { | |
| public static string GetHeaderValue(this HttpRequestMessage request, string name) | |
| { | |
| IEnumerable<string> values; | |
| var found = request.Headers.TryGetValues(name, out values); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Param($config, $key, $value) | |
| $doc = New-Object System.Xml.XmlDocument | |
| $doc.Load($config) | |
| $node = $doc.SelectSingleNode('configuration/appSettings/add[@key="' + $key + '"]') | |
| $node.Attributes['value'].Value = $value | |
| $doc.Save($config) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <PropertyGroup> | |
| <PostSharpHostConfigurationFile>Web.config</PostSharpHostConfigurationFile> | |
| </PropertyGroup> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <runtime> | |
| <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> | |
| <dependentAssembly> | |
| <assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" /> | |
| <bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" /> | |
| </dependentAssembly> | |
| </assemblyBinding> | |
| </runtime> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Configuration; | |
| using System.IO; | |
| using NHibernate; | |
| using Twilio; | |
| using MyApp.Common; | |
| using MyApp.Data; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using MyApp.Common; | |
| using MyApp.Data; | |
| using NHibernate; | |
| using System; | |
| using System.Configuration; | |
| using System.IO; | |
| using Twilio; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class RouteConfig | |
| { | |
| public static void RegisterRoutes(RouteCollection routes) | |
| { | |
| routes.LowercaseUrls = true; | |
| // Other routing stuff here | |
| } | |
| } |
NewerOlder