With the arrival of ASP.NET MVC and the complementary IIS7 file-extension-less request pipeline it’s finally possible to turn ugly “classic ASP.NET” query string URLs into pretty and orderly REST-style URLs, functionality that PHP had for ages. Out with http://mysite.com/catalog.aspx?category=1&product=100, here comes the more pleasing http://mysite.com/widgets&gadgets/the-useful-&-beautiful-widget
However, the ampersand in the latter will generate a “400 Bad Request” response with the default settings in IIS 7 because the ampersand (&) is not acceptable in the request for security reasons. As discussed here, it takes two measures to fix this and make the URL (I did not have to take the third measure quoted in the post, which is setting ValidateRequest=”false” in the ASP.NET MVC view page):
- AllowRestrictedChars http://support.microsoft.com/kb/820129
- Interestingly enough, enable VerificationCompatibility (http://support.microsoft.com/default.aspx?scid=kb;EN-US;826437), a measure designed for pre-SP1 ASP.NET 1.1, but necessary here even with ASP.NET 3.5 to get the ampersand URLs working.
Hope it helps.
Once you’ve followed these instructions to install PHP hosted on IIS7 using FastCGI (there’s also a video by Scott Hanselman), you’ll probably want to install MySQL and make it work with PHP. However, with your php.ini in its current state you’ll likely get an error message when you start a MySQL-based app, such as Wordpress:
Your PHP installation appears to be missing the MySQL which is required for WordPress.
There’s a lot of information out there to fix this on Windows, and much advice involves copying and grabbing dlls and stuff. Much of it is superfluous, and it boils down to this with your current configuration:
- Edit your php.ini (in C:\PHP\ or wherever you installed php), and uncomment the following line:
;extension=php_mysql.dll
hint: remove the semicolon
- Change this line:
extension_dir = “./”
to this:
extension_dir = “C:\php\ext” - Save php.ini and restart the web server in IIS Manager
- That’s all
Hope it helps.
If Windows Task manager shows excessive resource usage (CPU or memory, mostly) for an IIS 7 worker process (w3wp.exe), it’s helpful to identify which of your application pools consumes the resources. I haven’t found a way to accomplish this in IIS Manager so I proceeded like so:
At the command prompt:
net start WAS
Note: WAS is the Windows Process Activation Service (btw, pretty silly service name, as it’s nigh impossible to google for WAS).
Run appcmd list wp:
C:\Windows\system32>%windir%/system32/inetsrv/appcmd list wp
WP “5716″ (applicationPool:DefaultAppPool)
WP “968″ (applicationPool:MyOtherAppPool)
WP “5836″ (applicationPool:TheThirdAppPool)
The number in number in the results is the process ID in the results is the Windows process ID (PID).
Now in Windows Task Manager, after having enable the PID column in View>Select Columns… you can identify the offending w3wp.exe by its PID.
If you have an easier way to do this, please post in the comments.
With the default configuration of IIS 7 you will not be able to serve the .wdp images requested by the HD View plugin in the clients browser. The user will get the “Could not create scene from file http://{your source path}/l_{l}/c_{c}/tile_{r}.wdp. hr=0x…” error message displayed instead of the HD View. As found in this discussion, it’s necessary to enable the image/vnd.ms-photo MIME type on the web server, which on IIS 7 is in done IIS Manager >> MIME Types:
Simply add a MIME Type for wdp and set the MIME type to image/vnd.ms-photo:
Then HD View content should display just fine. Hope it helps.
Recent Comments