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 IIS
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
 
XML
<configuration>
<httpHandlers>
   <add verb="*" path="*.jsp" type="HinoCentral.Website.AppCode.JSPHandler"/>
   <add verb="*" path="*.jspf" type="HinoCentral.Website.AppCode.JSPHandler"/>
</httpHandlers>
<system.webServer>
    <handlers>
      <add name="JSPHandler_jsp"  path="*.jsp" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness64" />
      <add name="JSPHandler_jspf" path="*.jspf" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness64" />
    </handlers>
by Egli   October 25, 2011 @ 2:36pm
60 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
 
$newVirtualDirectory = $args[0]
$physicalPath = $args[1]
 
# gets the IIS root object
$iis = [ADSI]"IIS://localhost/w3svc/1/root"
 
$vdir = $iis.psbase.children | where {$_.AppRoot -eq ('/LM/W3SVC/1/Root/' + $newVirtualDirectory)}
 
# Check to see if the virtual directory exists
if (!$vdir) {
by Robert.Eberhart   December 20, 2010 @ 6:52am
237 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
 
C#
public class URLRewriterModule : IHttpModule
    {
        /// <summary>
        /// You will need to configure this module in the web.config file of your
        /// web and register it with IIS before being able to use it. For more information
        /// see the following link: http://go.microsoft.com/?linkid=8101007
        /// </summary>
        #region IHttpModule Members
 
        public void Dispose()
by ZeroDotNet   February 22, 2010 @ 11:04pm
334 Views
no comments
 
************************************************************************
* wwProcess :: GetUrlBasePath
****************************************
***  Function: Method responsible for establishing the base path
***            for this application. 
***    Assume:
***      Pass:
***    Return:
************************************************************************
FUNCTION GetUrlBasePath()
by Rick Strahl   December 16, 2009 @ 2:43pm
404 Views
no comments
 
C#
/// <summary>
/// This method returns a fully qualified absolute server Url which includes
/// the protocol, server, port in addition to the server relative Url.
/// 
/// Works like Control.ResolveUrl including support for ~ syntax
/// but returns an absolute URL.
/// </summary>
/// <param name="ServerUrl">Any Url, either App relative (~/default.aspx) 
/// or fully qualified</param>
/// <param name="forceHttps">if true forces the url to use https</param>
by Rick Strahl   September 05, 2009 @ 1:37pm
1438 Views
1 comments
 
 
C:\Users\administrator.OSM>dism /online /enable-feature /featurename:IIS-WebServ
erRole
 
Deployment Image Servicing and Management tool
Version: 6.1.7600.16385
 
Image Version: 6.1.7600.16385
 
Enabling feature(s)
by nobodybutca   September 04, 2009 @ 1:38am
467 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