Larry Brouwer

…just my technology sandbox …for my personal amusement only!

Browsing Posts published in April, 2010

This morning, my Outlook inbox has messages with no ‘From’, no ‘Subject’, and nothing in the ‘body’. So, I’m thinking that the .pst file has been corrupted at some point. I Googled on ‘Outlook 2007 repair tool’ and came up with this Microsoft Support article "How to use the Inbox Repair Tools to recover e-mail messages in Outlook 2002, Outlook 2003, and Outlook 2007". I followed the instructions to repair my outlook .pst file as follows:

Open windows explorer and navigate to the folder where my outlook files are stored. Normally, this would be in: C:\users\username\AppData\Local\Microsoft\Outlook, however, I’ve moved them to: My Documents\Exchange.

Check the file sizes. In my case, I have a whopper of a file! It’s 3.9GB. I’m thinking this could be part of my problems. The Microsoft article discusses file size max is 2GB for prior versions of Outlook. I need to find out what the file maximum is for Outlook 2007. I ran a Google search on ‘Outlook 2007 maximum pst file size and found an article from About.com Do Outlook PST Files Have a Size Limit?. This article says that beginning with Outlook 2003, pst file format capable of storing Unicode data, so it has no theoretical size limit. There is a practical limit of 20GB, however.

The file limits are now configurable, as I found out by reading Microsoft Support article "How to configure the size limit for both (.pst) and (.ost) files in Outlook 2007 and in Outlook 2003. I now followed the instructions in this article to determine my current file size settings. They are configured in the registry. There are four (4) registry entries: MaxFileSize, WarnFileSize, MaxLargeFileSize, WarnLargeFileSize. I opened regedit and tried to navigated to: HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\12.0\Outlook\PST, however, I could not navigate beyond Microsoft. Nothing was found. I then Googled on ‘HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\12.0\Outlook\PST values not found’ and found a post discussing this here. Based on this post, it looks like there is no need to mess with the registry as the default settings are at 20GB for the Unicode file format. I did not research any further as to why I don’t have the registry keys.

I’ve been using Outlook a very long time, and I’m wondering what my current file format is. Perhaps the format is still ANSI with a 2GB limit? So I Googled on ‘determining pst file format ansi unicode’ and found a MSOutlook.info article "Am I in ANSI or UNICODE format?". Following the instructions, I opened Outlook and navigated to File | Data File Management. I then double clicked on the pst file in question and looked at the Format field. It reads ‘Personal Folders File’. According to this article, that means my pst file is in UNICODE format. If it would have read ‘Personal FOlders File (97 – 2002)’, then it would have been in ANSI format. Looks like my file size of 3.9GB is fine.

Continuing on with the Outlook PST repair procedure.

I exit Outlook. Open Windows Explorer. I need to make sure I can see hidden files. I’m running Windows 7, so in Windows Explorer, click Organize | Folder and seach options. Open View tab at the top. Make sure ‘Show hidden files, folders, and drives’ is selected. Click Apply. Click OK.

Locate the ‘Scanpst.exe’ program by either navigating to it in Windows Explorer to: C:\Program Files (x86)\Microsoft Office\Office12 or by clicking Start and entering ‘Scanpst.exe’ in the Search programs and files box. Run the program. Browse to the pst file and click Open. Click Options. Check Append to log if you don’t want the log file replaced. Click Ok. Click Start.

After completion, The Microsoft Office Outlook 2007 Inbox Repair Tool found errors in my .pst file. It reads “Errors were found in this file. To repair these errors, click Repair. Folders found in this file: 767 Items found in this file: 40699”. I clicked on Details and the message reads: “Internal errors were found in this file. They must be repaired for this file to work correctly.”. I clicked Ok. I checked ‘Make a backup of scanned file before repairing’. I then clicked Repair.

The repair procedure took a considerable amount of time. Well over 20 minutes. Upon completion, a message box appears “Repair complete”. I clicked Ok. I then went back into Outlook. The blank emails are still present in my InBox. I do not see any evidence of any recovered emails.

The Microsoft support article proceeds to step 2, a discussion about how to recover the repaired items. Following along with the article, I open the Personal Folders of the one I repaired. The article says I should have recovered folders: Calendar, Contacts, Deleted Items, Inbox, Journal, Notes, Outbox, Sent Items, Tasks. I see none of these. However, at this point, I realize that the blank emails are actually coming in from my Office Live account from the Outlook Connector which is a different profile altogether. So I went back into my Data Files to see which file is storing these emails, and it says Filename “Not Available”.

The resolution of my blank emails

All the above information is nice to know, but it still hasn’t solved my original problems. A solution is about to finally appear. So I perform a Google search on ‘officelive outlook 2007 blank emails’ and find a post about this topic, Outlook getting blank emails. No solutions are found here.

However, the solution finally is found in another post Outlook Connector downloading blank emails that states I need to disable the email integration with my anti-virus software.

I’m currently using Norton provided from Comcast. I opened up Norton Security Suite. Navigated to Settings | Antispam and clicked off the Antispam feature. Clicked Apply then Back. Then clicked on AntiVirus | Scans and Risks. I then clicked off the Email Scan feature. Clicked Apply then selected ‘Permanently’ to stop it from scanning emails altogether. Clicked Apply then Back then Close then exited the program.

I then restarted Outlook. As expected, the blank emails are still there after doing a Send/Receive. I then clicked on Outlook Connector | Mail Settings. It took me to the OfficeLive Website. I logged into my account at Microsoft OfficeLive.

Re-Downloading all the blank emails from OfficeLive

**After trying to find some settings that might help, I went into my OfficeLive InBox. I then checked all my emails, and selected Mark as Unread. I then went back into Outlook and clicked Send/Receive, and all my emails re-downloaded! Cool! Now all my blank emails are gone. Unfortunately, I deleted many blank emails from my inbox prior to all this, and now they did not re-download, and even worse, I have no idea what they are/were. Since the majority of them are not important, I’m not pursuing this any further.

In this post, I just want to keep track of what IIS7 extensions I’ve installed on my development web server, and some brief notes about them. The extensions are located at http://www.iis.net/.

1. Search Engine Optimization Toolkit.

2. Web Platform Installer. This allows for installation of Web Platform Extensions, New Web Applications (i.e. BlogEngine.Net), and Beta Extensions from within the IIS manager. You should really check out the samples. They are also located at: http://www.microsoft.com/web/gallery

3. Advanced logging.

4. Admin Pack 1.0. Originally, I was doing some googling on reporting tools for IIS7 and came across a post for an open source report framework that is an extension to IIS. In the post it said that the reporting tools had been added to the Admin Pack. However, once I installed the Admin Pack, I could not find the reports anywhere. Upon further digging, I found some posts stating that the Reporting extension had been pulled at release, but was still in the Admin Pack RC. I could not find anything to suggest that a report extension is forthcoming.

5. URL Rewrite 2.0 (2010-04-05).

6. Microsoft .NET Framework 4 (2010-04-29)

7. Windows Powershell 2.0 (2010-04-29)

8. Visual Web Developer 2010 Express (2010-04-29)

9. Database Manager 1.0 (2010-04-29)

10. ASP.NET MVC 2 (2010-04-29)

11. Windows Cache Extension for PHP 5.2 (2010-04-29)

12. Update for IIS 7.0 FastCGI (KB980363) (2010-04-29)

13. PHP 5.2.13 (2010-04-29)

14. WordPress (2010-04-29)

15. MySQL Connector/Net 5.2 (Dependency) (2010-04-29)

16. MySQL Windows Essential 5.1 (2010-04-29)

17. Hotfix for IIS DB Manager (2010-04-29)

Today I’m researching WordPress for Clear Lake Auto Service a client of mine. They are looking to upgrade their website to be more easily updated. So, I thought this software to be a perfect fit. They are currently being hosted by c-beyond, and c-beyond allows them to run PHP and MySQL, so it should install quite easily.

To install the WordPress software, I first read through the installation instructions found at installing WordPress. After verifying that c-Beyond’s hosting does meet the requirements, I downloaded the latest WordPress software release download (v2.9.2 as of 4/29/2010) and extracted the wordpress folder to a temp directory.

Next, I logged into the C-Beyond control panel for the web site and initialized the MySql database. I then looked under the AddOns folder, and I noticed that WordPress is already an installable package. So I installed it directly off the C-Beyond site. I then upgraded it to the current version using the auto-upgrade tab already in the software.

I got a call this morning that Master Gardener’s system is not sending emails. So now I’m in troubleshooting mode. I first logged onto the server and checked the Simple Mail Transfer Protocol (SMTP) service. It’s running. I then went into the application and sent out a test message. Did not receive it. I then went into SqlServer Management Studio (SSMS) and logged into prod. Clicked on Management. Then right clicked Database Mail and selected Send Test E-Mail. I sent a test email out from there. I did not receive the email. I then right-clicked and selected View Database Mail Log. There are many errors being displayed. The error message follows:

Message
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 20 (2010-04-28T09:37:27). Exception Message: Cannot send mails to mail server. (Mailbox unavailable. The server response was: 5.7.1 Unable to relay for [email recipient]).)

 

I remember this issue in the past. I had mail being relayed to smtp-relay.tamu.edu. TAMU stopped allowing this, so I had to change it to email directly from hcmga.tamu.edu.

 

Opened up the event viewer. Didn’t see anything related. Opened up IIS6 Manager by going to Administrative Tools | Internet Information Services 6.0. Used 64bit session. Right-clicked SMTP Virtual Server then chose properties. I Enabled logging for W3C Extended Log File Format. Selected all the fields to log and reset new file monthly. Under Access Tab, Clicked Authentication. Changed from Anonymous access to Integrated Windows Authentication. Clicked Connection. Granted access to only server IP address. Clicked on Relay. No entries were found. Added IP address of server to grant relay from server. De-selected ‘Allow all computers which successfully authenticate to relay, regardless of the list above.’ since I really only want this server sending out emails originating on this server. Clicked Apply and closed windows. Restarted SMTP service.

 

Went back into SSMS and attempted to send another email. Email not sent. The log error message follows:

 

Message
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 20 (2010-04-28T10:34:59). Exception Message: Cannot send mails to mail server. (The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.3 Client was not authenticated).)

 

Since I’m tightening up security, I need to change the way SqlServer Database Mail logs into the SMTP Mail service. Right Click on Database Mail in SSMS. Choose Manage Database Mail accounts and profiles. Choose View, change, or delete an existing account. Using first profile, change from Anonymous authentication to Windows Authentication using Database Engine service credentials. Sent another test message from SSMS Database Mail. Success! It works! Now change the remaining profile to update security.

 

My next task of the morning is to install AWStats on the Harris County Master Gardener website. See my post here, for more details on installation. The main problem I ran into was that the log was not outputting sc-bytes. So, to get AWStats to run, I substituted it for s-port, which is the only numeric field available. I plan to shut down the web site, regenerate the stats, then move the log files, then change the output format to include sc-bytes, then change the config file, then start up the web site and regenerate. This should allow me to keep my historical stats and start getting more accurate transfer data.

 

Another thing I looked into today was an open source CMS system called WordPress.org. My initial thoughts are very positive about this software. It’s written with a totally open source technology stack (i.e. PHP, MySQL, Apache). I’m definitely going to install it and play around with it in the very near future.

Also, I’m a bit frustrated that my DotNetNuke site isn’t getting the traffic that the BlogEngine.Net site on port 81. So I ran the IIS7 Site Analysis Tool on my site. To run this, open up IIS7, click on the website root, then double-click on Search Engine Optimization under Management. At first, I clicked on my website root and opened up the SEO, but I couldn’t properly run the analysis as it wouldn’t allow me to enter the URL directly.

Today, I decided that I needed to see a little bit more about the traffic hitting my website. So I set off attempting to find a tool that will help me do just that. After doing some Googling, I ran across a Microsoft utility called Log Parser. So I downloaded and installed it. A great post to read about Log Parser is by Steve Bunting. Another post by Jeff Atwood here. Microsoft Technet has an article about how Log Parser works here. Log Parser is not officially a supported Microsoft tool, the forum site can be found here. Another article from Symantec discusses the fields for parsing and some examples here. I played around with Log Parser some and got some rudimentary results. But since I didn’t want to recreate the wheel, I decided to keep searching.

After Googling on “IIS7 Statistics”, I stumbled upon AWStats. I decided to install it. The documentation for installing on Windows Server 2008 is pretty weak. I found a  great guide to installing AWStats here. The steps can be summarized as follows:

  1. Install ActivePerl here.
  2. Install AWStats here. Be sure to change the default installation path to: “C:\AWStats”. If you let it go into ‘Program Files’, you’ll run into trouble in step 5 below as the path with ‘Program Files’ has a space. Trust me, I tried it. I’m sure there’s a work-around, (please post your comments about a solution!) but after spending 30 minutes with various quotes, etc. I gave just up and moved ahead!
  3. Create a new default configuration file.
  4. Edit the default configuration file with notepad. Run notepad as Administrator.
  5. Change entry: LogFile="/var/log/httpd/mylog.log" to: LogFile=”c:\awstats\tools\logresolvemerge.pl c:\inetpub\logs\LogFiles\W3SVC3\*.log |” **Make sure double quotes are not formatted type, ***Be sure to get the right site number at the end of ‘W3SVC#’
  6. Change LogFormat = 2 (I had already changed the logformat in IIS7 to W3C when I set up the site, so no additional changes were needed to the LogFormat)
  7. Verify SiteDomain and HostAliases vars.
  8. Open Command Prompt (cmd) with Administrative Privileges and navigate to “c:\AWStats\wwwroot\cgi-bin” and run “awstats.pl -config=www.yourdomain.com” (don’t add the prefix “awstats” or suffix “conf” it will add it for you)

So, at this point, I’m getting an error about the format of the log file. It doesn’t match the format it’s expecting. My second attempt at generating the stats database was to use the LogFormat string as follows from my guiding post above:

LogFormat=”%time2 %other %method %url %other %query %other %host %other %code % %other %other %bytesd”

This also produced the same type of error. I then opened up IIS7 Manager and navigated to the Webserver Node, selected logging. I then chose the ‘Select Fields’ option. I noticed here, that there are many more fields selected than what is defined in the LogFormat string I’m providing. Here is the list for fields currently being logged and a screen shot showing them as well:

Date, Time, Client IP Address, User Name, Service Name, Server Name, Server IP Address, Server Port, Method, URI Stem, URI Query, Protocol Status, Protocol Substatus, Win32 Status, Bytes Sent, Bytes Received, Time Taken, Protocol Version, Host, User Agent, Cookie, Referer

IIS7_W3C_Logging_Fields

My next task is to see if I can manually determine the actual format of the log file. So I Googled on “W3SVC IIS7 file format” and got a nice explanation of file formats here. I navigated to “C:\inetput\logs\LogFiles\W3SVC3” and opened up the current log file. I immediately noticed that there are #Fields: statements in the file. Here is a sample line from the log file:

#Fields: date time s-sitename s-computername s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken

I then compared the commented #Fields with actual content in the log file, and they appear to match. I then cross-referenced the following list of fields from the awstats config file:

 

#   %host             Client hostname or IP address (or Sender host for mail log)
#   %host_r           Receiver hostname or IP address (for mail log)
#   %lognamequot      Authenticated login/user with format: "john"
#   %logname          Authenticated login/user with format: john here
#   %time1            Date and time with format: [dd/mon/yyyy:hh:mm:ss +0000] or [dd/mon/yyyy:hh:mm:ss]
#   %time2            Date and time with format: yyyy-mm-dd hh:mm:ss
#   %time3            Date and time with format: Mon dd hh:mm:ss or Mon dd hh:mm:ss yyyy
#   %time4            Date and time with unix timestamp format: dddddddddd
#   %methodurl        Method and URL with format: "GET /index.html HTTP/x.x"
#   %methodurlnoprot  Method and URL with format: "GET /index.html"
#   %method           Method with format: GET
#   %url              URL only with format: /index.html
#   %query            Query string (used by URLWithQuery option)
#   %code             Return code status (with format for web log: 999)
#   %bytesd           Size of document in bytes
#   %refererquot      Referer page with format: "http://from.com/from.htm"
#   %referer          Referer page with format: http://from.com/from.htm
#   %uabracket        User agent with format: [Mozilla/4.0 (compatible, ...)]
#   %uaquot           User agent with format: "Mozilla/4.0 (compatible, …)"
#   %ua               User agent with format: Mozilla/4.0_(compatible…)
#   %gzipin           mod_gzip compression input bytes: In:XXX
#   %gzipout          mod_gzip compression output bytes & ratio: Out:YYY:ZZpct.
#   %gzipratio        mod_gzip compression ratio: ZZpct.
#   %deflateratio     mod_deflate compression ratio with format: (ZZ)
#   %email            EMail sender (for mail log)
#   %email_r          EMail receiver (for mail log)
#   %virtualname      Web sever virtual hostname. Use this tag when same log
#                     contains data of several virtual web servers. AWStats
#                     will discard records not in SiteDomain nor HostAliases
#   %cluster          If log file is provided from several computers (merged by
#                     logresolvemerge.pl), use this to define cluster id field.
#   %extraX           Another field that you plan to use for building a
#                     personalized report with ExtraSection feature (See later).
#   If your log format has some fields not included in this list, use:
#   %other            Means another not used field
#   %otherquot        Means another not used double quoted field

After mapping, here is my new LogFormat file:

 

LogFormat=”%time2 %other %other %host_r %method %url %query %other %logname %host %other %ua %other %referer %other %code %other %other %bytesd %other %other”

A couple notes here about why step 8, the statistics build, didn’t work. First, in step 5, I was using “W3SVC1” instead of “W3SVC3”. The number at the end indicates the site. The site I’m using is site 3. Second, I selected additional fields to log several days ago. This changed the format of the file from its original state. So, the build program had problems recognizing the older record formats. To solve this, I moved all of the old log files out into another directory so that only the files with the newest format are being used in the database.

I now continued on, repeating from step 8 above:

  1. Open Command Prompt (cmd) with Administrative Privileges and navigate to “c:\AWStats\wwwroot\cgi-bin” and run “awstats.pl -config=www.yourdomain.com” **If it runs successfully, you will get Phase 1 …, Phase 2 …, Jumped lines …, Parsed lines …, …, Found 804 new qualified records.
  2. Run “awstats.pl -config=www.yourdomain.com –output –staticlinks > ..\yourdomain_com_stats.html” **remember to use “..\” to build the html file in directory above.

At this point, I used Windows explorer and navigated to “C:\AWStats\wwwroot\” and clicked on the generated html file. I expected something magical to appear, but was disappointed to see it display:

WARNING: LastLine parameter in history file is ‘20100426184511′ so in future. May be you need to correct manually the line LastLine in some awstats*.www.larrybrouwer.com.conf files. Create/Update database for config "C:\AWStats\wwwroot\cgi-bin/awstats.www.larrybrouwer.com.conf" by AWStats version 6.95 (build 1.943) From data in log file "c:\awstats\tools\logresolvemerge.pl c:\inetpub\logs\LogFiles\W3SVC3\*.log |"… Phase 1 : First bypass old records, searching new record… Searching new records from beginning of log file… Jumped lines in file: 0 Parsed lines in file: 804 Found 0 dropped records, Found 0 corrupted records, Found 804 old records, Found 0 new qualified records.

I then Googled “AWStats Warning LastLine parameter in history file” and found numerous posts, one of which is here. It appears that the IIS7 outputs timestamps in GMT, and my server is on US Central Time (GMT-0600), so I need to correct for that as indicated here. There is a parameter in the AWStats config file:

LoadPlugin=”timezone –6”

I tried –6 first, but got the same result. A Wikipedia explanation here is useful. Daylight savings is the culprit, so I changed the parameter to “–7”, and it worked! I’ve temporarily put it at http://www.larrybrouwer.com:81/stats/larrybrouwer_com_stats.html for viewing. Sadly, clicking on this link won’t work since DNN is re-writing the URL. Bummer! It’ll be changing the link in the near future anyway when I integrate it into my DotNetNuke site.

Additional Steps to work on:

  1. Set it up to view from my DNN website
  2. Have it automatically produce new stats
  3. Have it automatically compensate for Daylight Savings

(see my post, Adding AWStats to DotNetNuke)

One final note… While trying to integrate AWStats into DNN, I stumbled upon the logging features in DNN. Logging is not turned on by default now as is outlined in this post here. Per this post, to enable logging, as administrator, navigate to: Site Settings \ Advanced Settings \ Host Settings \ Site Log History and change it to a positive number representing the number of days you wish to have logs kept.

To view the logs, click on Admin then select Site Log in the Basic Features section.

Update on 4/27/2010:

I’ve noticed that the gifs aren’t showing up in the viewed pages. So I went poking around through the installation document that comes with the software. It’s located at c:\AWStats\docs\awstats_setup.html. It probably would have been best to follow these instructions first as it describes in detail my current problems. It also discusses how to set up the log file just for AWStats use (i.e. disabling all the unnecessary fields).

So I’m going to fix my installation for IIS7 using the documentation that came with the software.

  1. Configure IIS7 to create logs in the “Extended W3C log format”. I’m leaving my log file formats the way they are. Since I’ve already re-mapped the fields, no need to change them again.
  2. Copy the contents of AWStats cgi-bin folder to your server’s cgi-bin directory. In my case I have two websites running. So I created new cgi-bin dirs for each site.
  3. Copy the icon directory and sub-directory contents to the target website root folders. Again, I copied the icon folder to my two sites.
  4. Create a configuration file. I’m using the one I’ve already configured.
  5. Edit your configuration file. LogFile values remain the same; LogType=”W”, stays the same; LogFormat stays the same; Change the DirIcons parameter to reflect the relative path of icon directory. In my case, I don’t have to change the location since I’ve now moved the icon dir to the proper location off the root directory.

Now the icons are showing up fine.

Looking more closely at the AWStats report, I’ve noticed that there links to other reports that aren’t there. Doing some more looking at the documentation, I see that there are many more reports that can be generated. A quick way to build up all the reports is to use awstats_buildstaticpages.pl. Here’s the script I created:

#navigate to AWStats tools
G:
cd \data\www\DotNetNuke\AWStats\tools
awstats_buildstaticpages.pl -config=DotNetNuke -staticlinks -update -configdir=..\wwwroot\cgi-bin - awstatsprog=..\wwwroot\cgi-bin\awstats.pl -dir=..\wwwroot
awstats_buildstaticpages.pl -config=TechNotes -staticlinks -update -configdir=..\wwwroot\cgi-bin - awstatsprog=..\wwwroot\cgi-bin\awstats.pl -dir=..\wwwroot

I’ve just configured AWStats to work with IIS7 on my web server (see my post, IIS7 Statistics Reporting with Log Parser and AWStats), and now I would like to integrate it into my DotNetNuke (DNN) website.

Here’s an outline of what I would like to do:

  1. Be able to log into my DNN web site as an authenticated user and navigate to a web statistics page. I don’t want anonymous users to view my stats.
  2. Create a script that runs in the background to keep the statistics up to date and have it re-generate the html page for the stats.
  3. See if I can programmatically adjust the LoadPlugin=”timezone –7” for US Central daylight savings or standard time. I really don’t want to have to remember this 2x per year.

So the first thing I did was to open the IIS7 Manager and navigate to my DNN website. I then Right Clicked on it and selected ‘Add Virtual Directory…’. I then choose ‘Statistics’ for my Alias, and navigated to the correct directory path of the AWStats webroot or ‘C:\AWStats\wwwroot’. I then opened up IE and navigated to my web site at http://www.larrybrouwer.com/stats/larrybrouwer_com_stats.html, and it displayed just fine.

My first approach to add the statistics html page was to first add a new page to the DNN website logged in as the site administrator, and then have it permanently redirect as a URL to the statistics page. At first, this seemed to work fine. The only problem was when I tried to restrict access to the file, it didn’t have any effect. In other words, I could enter the URL directly into the browser, and I could open the statistics page.

After much fiddling around with various settings, I decided to try another approach. This time, I again created a new page and deleted the default HTML module on the page. I then added an IFrame Module and set the Location to the URL for the statistics page. I set the Width and Height to 100%, checked the Auto height, disabled Scrolling and Border by setting both of them to ‘No’. This seemed to work much better. Now, when I directly enter the URL for the DNN Statistics page, it redirects me to the login screen! Pretty cool.

There’s only one catch… And that is, I can still access the statistics page by directly entering the URL of the actual page. After about 2 hours of Googling and fiddling around with Web.config settings, I came up with the solution. I went into IIS7 Manager, and selected the Statistics virtual directory. I then clicked on the Authorization Rules. I then clicked ‘Add Deny Rule…’. I then selected ‘All anonymous users’ to Deny access to anyone who isn’t a user with a valid id. So I think I’ve got it! This action resulted in a Web.config file being generated in the Statistics virtual directory (or c:\AWStats\wwwroot). Here’s the contents of the Web.config file:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
   
<location path="">
       
<system.webServer>
           
<security>
               
<authorization>
                   
<add accessType="Deny" users="?" />
                </
authorization>
           
</security>
       
</system.webServer>
   
</location>
</configuration>

 

This concludes step 1! On to the next. The second step should be pretty straight forward. All I think I need to do is create a script with essentially two (2) steps in it. First, regenerate the AWStats, then regenerate the html for it. Here’s the script I came up with:

c:
cd \AWStats\wwwroot\cgi-bin
awstats.pl -config=www.domain.com
awstats.pl -config=www.domain.com -output -staticlinks > ..\domain_com_stats.html
exit

 

I then added the script to the Task Scheduler. I initially set it up to run every 10 minutes.

The next day (4/27/2010)

I discovered today that I’m still having issues with access security on the direct URL’s. So I decided to install AWStats directly in the DotNetNuke root folder. To me, this makes a lot more sense now, and should help me solve some problems with using virtual directories, etc. I’ll tackle that problem later today, hopefully.

I also fixed a problem with the icons not displaying correctly (see my other post for more details here).

I also updated my script to generate all the reports automatically:

#navigate to AWStats tools
G:
cd \data\www\DotNetNuke\AWStats\tools
awstats_buildstaticpages.pl -config=DotNetNuke -staticlinks -update -configdir=..\wwwroot\cgi-bin - awstatsprog=..\wwwroot\cgi-bin\awstats.pl -dir=..\wwwroot
awstats_buildstaticpages.pl -config=TechNotes -staticlinks -update -configdir=..\wwwroot\cgi-bin - awstatsprog=..\wwwroot\cgi-bin\awstats.pl -dir=..\wwwroot 
 

I also changed DNN to allow for uploading of .html files. Host / Host Settings / Advanced Settings / Other Settings / Allowable File Extensions which in an attempt to fix my file security issues. More on that later.

Today started out with discovering our phone wasn’t working. Since we have Vonage or Voice over IP (VOIP), this usually means our Internet is down. At least I know when the Internet is down! My usual routine for this sort of thing is to first unplug everything (the cable modem, router, switch, and the Vonage router), let it sit for a good minute or so to discharge any kind of inductance build-up (or whatever), and then re-plug everything back in starting from the modem, then the router, then the switch, then the VOIP box.

So, as usual (so I thought) this procedure worked. Our phones were working again. But when I logged on to my laptop, I soon discovered there was more to the situation this time. When I opened up IE, my browser immediately took me to a site securespot and told me that my machine did not have access to the Internet. Since I’ve had some prior experience with Secure Spot, I knew that it had to be something wrong with my D-Link DIR-655 router. I logged into my router and checked the configuration. It seemed fine. I rebooted it. I still had the problem. I then began searching the D-Link forums, and sure enough, there is a hornets nest of very upset D-Link users experiencing similar problems. I had recently upgraded my router to the latest firmware, 1.33NA because the router had been randomly dropping my Virtual Servers List. This was problematic because I’m using a single dynamic IP address and I need to NAT individual ports over to my web/email server. As a side-note the firmware upgrade to 1.33NA did not help this!

After pouring through many posts, here, here, here, and here,  it appears this latest buggy firmware is affecting the router in different ways. Secure Spot is one of them. Since I had tried out Secure Spot previously, and had registered my router with a trial (I was trying the feature out for a client who had some workers going to websites they shouldn’t have been), the firmware is still communicating with Secure Spot, even though my router clearly has that feature disabled. One option mentioned is to downgrade the firmware to 1.31RU, another is to try out a beta version located here (version 1.34b03NA is the latest as of this post). I really hesitate to do either of these, so I opted to ‘Reset’ the router back to its factory settings, and then I re-loaded the settings. This, (at least for the moment) has fixed my problems. I’ll probably wait until the next release of the firmware before upgrading if I don’t have much more trouble. If I do, I will give the latest beta version a try.

Next, I wanted to log into DotNetNuke to do some work on my website. I keep all my username/password information in KeePass Password Safe. If you have a lot of passwords to keep track of, I highly recommend it! I don’t know how I kept my password information before using this. Anyway, as I was saying, I wanted to get into my website to work on it, but I couldn’t find the username/password information anywhere. I had to think about this for a moment (don’t panic). How did I regain access to my website? Easy. I just logged into SqlServer and queried the aspnet_users table. Now I remember what user name I used! Now add them to KeePass, right?

My yahoo mail stopped sending emails through Microsoft Outlook 2007 several days ago. I finally had some time to troubleshoot the problem. I fixed the issue by going into Tools / Options then selecting Mail Setup. Next, click on E-mail Accounts… I then selected my yahoo.com account and clicked Change… I first performed a Test Account Settings … and it gave me a send error. After changing several settings, I found and corrected the problem by clicking on More Settings … I then selected Advanced. In the ‘Use the following type of encrypted connection:’ I changed it from ‘Auto’ to ‘SSL’ and that seemed to fix the problem. Just to let you know, I’ve set up my Yahoo mail to ‘Yahoo Asia’ so I can enable Pop3 without purchasing a Yahoo Plus account. It’s been working great for me until recently, and now it’s working great again!

Now having problems connecting to my SmarterMail email account on my personal web-server. When attempting to log in, it is giving me an error ‘Unable to connect to SmarterMail service.’ After looking at the Event Logs, I discovered several ‘System.OutOfMemoryException’ errors. After looking through some posts on the SmarterMail website, I discovered that I most likely have a corrupted .Net environment, and that I need to re-install .Net. I found this Microsoft support article explaining how to repair a corrupted .Net installation. I followed the instructions to repair .Net framework.

I first downloaded the .Net Framework 3.5 Service Pack 1 (Full Package) to my local G:\temp directory.

I then created a C:\temp directory per instructions.

I then opened a command prompt with Administrative privileges by choosing ‘Run as Administrator’.

I then executed the following command:

g:\temp\dotnetfx35.exe /t:c\temp /c:”msiexec.exe /i 
c";:\temp\netfx.msi REINSTALL=ALL ReinstallMODE=vomus”

and selected ‘Repair’ / Next >

After a successful completion, I rebooted the server and verified that Windows updates were up to date. I then checked the Event Viewer to check for any additional errors. I haven’t seen any yet.

I’m now able to get into my SmarterMail account, and I had a couple emails that I needed to reply too, all is working fine at the moment. I’ll have to keep an eye on it to see if the problem is actually resolved.

Today, I’m working on getting BlogEngine.Net installed on the Harris County Master Gardener website. I’m trying to test the new post notifications, and I keep getting “You are now unsubscribed” message after entering a new email address. Since I’m using the SQL Server data store, I didn’t think to check the permissions on the “APP_DATA” folder. After looking at the tables, I didn’t see a newsletter table. So I added “NETWORK SERVICE” write permissions to the “APP_DATA” folder and it is now working fine.

So now, after adding a new post, notification emails are not being sent out.

Installed Visual Studio 2010 Ultimate trial.

Installed Silverlight 4 Tools RC2 for Visual Studio 2010

Stumbled upon Ramp Up, a free learning resource.

Installed Silverlight 4 Toolkit April 2010 from codeplex

Installed Microsoft Expression Blend 4 Release Candidate (RC)

Installed WCF RIA Services Release Candidate 2 for Silverlight 4 and Visual Studio 2010

Installed WCF RIA Services Toolkit April 2010

Installed Silverlight 4 Offline Documentation

Installed Silverlight 4 Training

Installed Visual Studio 2010 and .NET Framework 4 Training Kit

Getting started with Silverlight

Navigate to Tools / Extension Manager and select Online Gallery

Visual Studio 2010 Training videos on channel9