Posts tagged ‘web’

Deploying MVC 2 & .NET 4.0 on IIS 6

A lot of people have problems with this specific topic, and as always, I blame Microsoft ‘couse this topic is seriously unintuitive.

First off, installing MVC 2 aswell as .NET 4.0.
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9cfb2d51-5ff4-4491-b0e5-b386f32c0992&displaylang=en
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=7aba081a-19b9-44c4-a247-3882c8f749e3

After installation, follow these easy steps.
1. Right click your website, choose properties
2. Click the tab called “Home Directory”
3. Choose “Configuration”
4. At the wildcard part choose “Insert”
5. Find the file called aspnet_isapi.dll on your computer, usually located at C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll
6. DO NOT forget to uncheck “Verify that file exists”
7. Go back to the IIS 6 Manager and choose Webservice Extensions
8. Make sure your .NET Framework has status “Allowed”

If you’re thinking about running .mvc file endings or any other thoughts, use these guides:
http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx
http://blog.stevensanderson.com/2008/07/04/options-for-deploying-aspnet-mvc-to-iis-6/

  • Facebook
  • Twitter
  • Digg
  • del.icio.us
  • LinkedIn
  • RSS
  • StumbleUpon
  • Google Bookmarks
  • Yahoo! Buzz
  • email
  • MySpace
  • PDF
  • Print
  • Reddit
  • Tumblr

PowerShell webscraper tool

A little snippet for scraping a site for matches using regular expressions.

$regex = [RegEx]'(.*LPE.*)'
 
$url = 'http://mute.nu/'
$wc = New-Object System.Net.WebClient
$content = $wc.DownloadString($url)
 
#echo $content
 
$regex.Matches($content) | Foreach-Object { $_.Groups[1].Value }

This will match everything before and after the string LPE on this site.

  • Facebook
  • Twitter
  • Digg
  • del.icio.us
  • LinkedIn
  • RSS
  • StumbleUpon
  • Google Bookmarks
  • Yahoo! Buzz
  • email
  • MySpace
  • PDF
  • Print
  • Reddit
  • Tumblr