IIS7 – post #25 – Debugging Vista / IIS7 using Integrated Mode app pool

Here is how-to enable debugging on Vista / IIS7, using an application pool in Integrated Mode.   You can either use Visual Web Developer or Visual Studio 2005.   Thanks Scott Guthrie / Rick Strahl for providing the steps on how-to do this.

  • Assume you installed IIS7
  • Install Visual Studio 2005 SP1, 
  • Enable or install Windows Integrated Authentication.   

How-to turn of built-in web server with VWD or VS 2005

  • Turning off built-in debugger: Right click on Solution > Properties (project options) >  Start Options > Use Custom Server

Steve Schofield
Microsoft MVP – IIS

Logparser and finding information ‘between two times’

I’m finding working with Logparser and dates is a bit involved.   Here is a query I used to extract files between two times stored in W3SVC logs.

logparser "select date,time,cs-uri-stem,sc-status,count(*) into out.txt from \Serverwwwlogsw3svcXXXXX61220.log WHERE TO_TIME(time) BETWEEN TIMESTAMP(’01/01 13:50:00′, ‘MM/dd hh:mm:ss’) ANDTIMESTAMP(’01/01 18:30:00′, ‘MM/dd hh:mm:ss’) AND SC-STATUS = 500 group by cs-uri-stem, date,time,sc-status order by count(*) DESC" -o:csv

IIS7 – post #23 – Vista and SMTP server. Where is it?

Where is my SMTP server on Vista?  I’m not sure why more developers haven’t asked this question. 
Simple, it is not includedhttp://blogs.iis.net/bills/archive/2006/09/18/IIS7-_2D00_-Vista-vs.-Longhorn-Server.aspx


Here are a couple I’ve used on Vista Ultimate.   I’m sure there are others but for testing, SMTP is additional ‘feature’ you’ll need to add, at this point. 

Free SMTP Server (This is handy, runs as an app and simple to configure for testing your apps).
http://softstack.com/freesmtp.html


Smartermail – Free for one domain.
http://www.smartertools.com/Products/SmarterMail/Free.aspx


Steve Schofield
Microsoft MVP – IIS


**************************************


Some additional testing. 
In IIS7 SMTP properties, if you put a smarthost or server that allows relaying.  This will work too for testing.  Then you won’t have to install anything on Vista.


Here is the code I used to send email to a smarthost on Vista.


        ‘create the mail message
        Dim mail As New System.Net.Mail.MailMessage()


        ‘set the addresses
        mail.From = New Net.Mail.MailAddress(“[email protected]“)
        mail.To.Add(“[email protected]“)


        ‘set the content
        mail.Subject = “This is an email”
        mail.Body = “this is a sample body”


        ‘send the message
        Dim smtp As New Net.Mail.SmtpClient()
        smtp.Send(mail)


Here is the picture of my settings on Vista to send email to a remote relay.


 

IIS7 – post #22 – IIS7 and Powershell info

I’ve been reading up on Powershell and found a few articles on IIS7 related material.  Using Powershell will be handy with IIS7 because of the new WMI provider.  Also, check out my blog post on Powershell reference links..

An Introduction to Windows PowerShell and IIS 7.0
http://www.iis.net/default.aspx?tabid=2&subtabid=23&i=1212

Writing PowerShell Command-lets for IIS7
http://channel9.msdn.com/Showpost.aspx?postid=256994

Managing IIS 7 with Windows PowerShell
http://www.iis.net/default.aspx?tabid=2&subtabid=25&i=1211

Enjoy,

Steve Schofield
Microsoft MVP – IIS

Powershell references

For the last few years, every holiday season I ‘geek’ on a particular technology.  This year, Powershell has been generating a lot of buzz in the admin community.  I decided to jump on the bandwagon and check out what this Powershell thing is about.   This posting has some misc links, commands and resources for Powershell.  It is not meant to be an complete list but some places I’ve visited.  When you install Powershell, there are 2 documents that are a must read before using Powershell.  You can get the documentation here.  I recommend reading GettingStarted.rtf and Userguide.rtf.  This is a nice primer and in-depth documentation provided by Microsoft.  The Userguide.rtf is a 116 page ‘readme’ type file, I am about 1/2 through reading it.  There is a lot of examples.  I also listed below some links to community resources for help.

Since 2002, I’ve used console apps to do an array of administrative functions.  Console apps made it easy to combine .NET and WMI to perform a lot of powerful ‘scripting like’ activities.  The one drawback applications required Visual Studio to update a ‘script’.  I can use Powershell as a way to combine the ease of ‘scripting’ and power of console apps with .NET.  I’ve not exposed WMI information yet but I can see this will be one of my favorite methods.  In conclusion, Powershell is a huge leap forward for Administrators.  It introduces a new ‘shell’ to perform things UNIX admin’s have had for years.  Heck, you can even type ‘man’ to view help.  If you perform administrative functions, I encourage you to check out Powershell.

0) Few basic cmdlets: Get-Help, Get-Command, Get-Process, Get-Service, and Get-Eventlog.

1) Get help
powershell -?

2) Get help, pipe to a file
powershell -? | Out-file 2.txt | Notepad 2.txt

3) Get help, piple to a file, open file in notepad
powershell -? | Out-file 2.txt | Notepad 2.txt

4) get-help about_*

5) get-process | taskkill -pid dw20.exe -f

6) get-alias is cool!

7) get-wmiobject win32_bios -computername server01 

8) Windows PowerShell 1.0 Documentation Pack
http://www.microsoft.com/downloads/details.aspx?FamilyID=B4720B00-9A66-430F-BD56-EC48BFCA154F&displaylang=en

9) Windows Newsgroup
msnews.microsoft.public.powershell

10) Windows Powershell Blog.
http://blogs.msdn.com/PowerShell/

11) Powershell newsgroup
http://www.microsoft.com/communities/newsgroups/list/en-us/default.aspx?dg=microsoft.public.windows.powershell

12) http://msdn2.microsoft.com/en-us/library/aa830112.aspx 

13) http://mow001.blogspot.com/  (Marc Powershell MVP)

14) http://sapien.eponym.com/  (MVP book and blog)

15) http://www.sapienpress.com/WindowsPowerShellTFM_Sample.pdf (Sample chapter on powershell)

16) http://www.myitforum.com/forums/New_PowerShell_email_discussion_list/m_134793/tm.htm (Powershell listserv by MyITForum.com)

IIS7 – post #21

It has been a week or so since reading up on IIS7.   Training, using up my remaining vacation time cut down on my IIS geek time.  Here is a few additional resources on IIS7.

‘The place to start learning IIS7.   TechCENTER on http://www.IIS.net
http://www.iis.net/default.aspx?tabid=2

New IIS7 Article: Upgrading ASP.NET 1.1 to Windows Vista and IIS7
http://www.iis.net/News/Item.aspx?i=1224

AppCMD article.  Based on RTM.
http://www.iis.net/default.aspx?tabid=2&subtabid=25&i=1222&p=3