posted this in IIS, Windows on November 8th, 2012 To redirect in IIS 6.0 using pure javascript create a file called “redirect.htm” and have IIS6 listen on port 80 and redirect to that file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
<!-- beginning of redirect magic file --> <script type="text/javascript"> function redirectToHttps() { var httpURL = window.location.hostname+window.location.pathname; var httpsURL = "https://" + httpURL ; window.location = httpsURL ; } redirectToHttps(); </script> <!-- end of redirect magic file --> |
posted this in IIS, Windows on September 24th, 2012 Set proper permissions in IIS 7.x on a remote computer
We will be using psexec icacls on the remote comptuer
Objective: Grant NT AUTHORITY\NetworkService the proper permissions for a particular website on “somecomputer” using credentials “somedomain\someuser somepassword”
The Command to Run
|
|
psexec -u somedomain\someuser -p somepassword -e \\somecomputer cmd /c (^ mkdir c:\temp1\Common ^ & icacls c:\temp1\Common /grant "NT AUTHORITY\NetworkService":^^(OI^^)^^(M^^) ^ & icacls c:\temp1\Common /grant "NT AUTHORITY\NetworkService":(CI^^)^^(M^^) ^ & icacls c:\temp1\Common /grant "NT AUTHORITY\NetworkService":^^(OI^^)^^(CI^^)^^(M^^) ^ ) |
What if we want to do this through jenkins? On the remote computer . . . → Read More: psexec icacls remote computer
posted this in IIS on July 24th, 2012 You’ll need to edit the web.config
Web.config
Place the following after system.web tag:
|
|
<trace enabled="true" localOnly="true" pageOutput="false" requestLimit="100" traceMode="SortByTime" /> |
Trace ASP.NET Application
Those options only allow you to see the trace from the server itself. RDP in to the server
Connect to:
|
|
http://your.domain.name.com/trace.axd |
posted this in IIS, Windows on April 18th, 2012 I recently ran in to this error on an IIS 6 server using MVC 3 Razor.
Check this first
your exception:
System.IO.FileNotFoundException: Could not load file or assembly ‘System.Web.Mvc, Version=1.0.0.0
It is trying to load MVC version 1. You probably need to do an assembly binding redirect in your test project as well, same . . . → Read More: Could not load file or assembly ‘System.Web.Helpers, Version=1.0.0.0
posted this in IIS, Windows on April 18th, 2012 Determine the site’s application pool:
|
|
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>C:\Inetpub\AdminScripts\adsutil.vbs get w3svc/1975602314/root/apppoolid apppoolid : (STRING) "some_app_pool_name" |
Restart the site’s application pool:
|
|
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>cscript %SystemRoot%\System32\IIsApp.vbs /a some_app_pool_name /r Microsoft (R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. Connecting to server ...Done. Application pool 'some_app_pool_name' recycled successfully. |
posted this in IIS, Windows on April 18th, 2012 Have you ever noticed your IIS 6.0 site is running the wrong version of .net?
This post explains how to change the asp.net version of a specific iis 6.0 website to asp.net 4.0
First find your website using
|
|
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -lk |
I have limited the output for simplicity below (a you can see the site is using . . . → Read More: iis 6.0 site running wrong version of .net
posted this in IIS, Windows on April 18th, 2012 If you’ve got a 64-bit server you can test this out for yourself by following these steps.
Install IIS 6.0 on the server and then open the Properties of the Default Web Site. You should see the Asp.Net tab as shown here
If you now run the following command at this point :
cscript . . . → Read More: asp.net tab missing iis6
posted this in IIS, O/S, Windows on April 17th, 2012 Original article from http://haacked.com/archive/2010/12/22/asp-net-mvc-3-extensionless-urls-on-iis-6.aspx
If you have a server running IIS 6, ASP.NET 4, and ASP.NET MVC 3 (or even ASP.NET MVC 2. I haven’t tried ASP.NET MVC 1.0), your website should just work with the default extensionless URLs generated by ASP.NET MVC applications. No need to configure wildcard mappings nor *.mvc mappings. In fact, you don’t . . . → Read More: set up asp mvc3 iis6
posted this in Apache, c#, IIS on April 13th, 2012 Nathan Bridgewater explained how to configure multiple reverse proxies properly with apache and IIS (without losing original domain name). I’m reposting this for myself to keep a record of this fine work.
multiple reverse proxy host broken iis serving up local server name instead of the ServerName that was originally passed to it. How to . . . → Read More: multiple reverse proxy host broken
posted this in IIS, Windows on March 2nd, 2012 Details
This particular error is indicating that some file in your site’s directory structure does not have permissions to be viewed by your web site. You need to ensure all files for your site are readable/executable
One easy way to debug this is to run the command line tool calcs on a different (working) . . . → Read More: Fix HTTP Error 401.3 IIS 6.0
|
|