Friday, February 1, 2008

Application Server on Dell E510 inexplicably shuts off.. how we worked around it...

I have to maintain the mail services for a client that I am working with. They are a small shop, with 6 users. They have Exchange 2003 running on Small Business Server 2003 (what we will call the exchange server). They run their applications on a separate Box (a Dell Dimension E510) that is running Windows 2000 Advanced Server with Terminal Server installed in Application Mode. For about a year, we were trucking along smoothly, then suddenly, the E510 would should down inexplicably. This became a nightmare. The easiest way for users to work in our environment was to access Terminal Server, we have gotten used to this arrangement. We still have not figured out why the E510 shuts down suddenly. The Event viewer shows us nothing, a memory dump does not get performed.

I know that in the past, when I would have this happen to me, it points to 3 things.

1) The Power Supply is wearing out. This is the easiest of the issues to fix. Go to Frys, pick up a PSU, swap it out.
2) the CPU is getting to hot.
3) A short somewhere in the unit

We took care of 1 by changing out the power supply unit. This did not fix the issue. The CPU does seem to be getting hot. We laid the unit on its side and took the cover off, it has not shut down since. This implies that #2 must be the issue.

The most important issue with now is how to get our users access to their emails. The second important issue is that the users must have access to their files. They were used to logging into terminal server to obtain them, the application server is dead.

To solve the first issue: I knew the Exchange 2003 installs Outlook Web Access OWA by default. I noticed that, for whatever reason, the OWA virtual directories did not exist anywhere in IIS. I has to recreate them. I looked up the following article http://support.microsoft.com/kb/883380 which told ne how to reset the default virtual directories for OWA. From the article, this is the method I used:

Method 1: Use Metabase Explorer from the IIS 6.0 Resource Kit Tools

1. Install the IIS 6.0 Resource Kit Tools. To obtain the IIS 6.0 Resource Kit Tools, visit the following Microsoft Web site:

http://www.microsoft.com/downloads/details.aspx?FamilyID=56FC92EE-A71A-4C73-B628-ADE629C89499&displaylang=en (http://www.microsoft.com/downloads/details.aspx?FamilyID=56FC92EE-A71A-4C73-B628-ADE629C89499&displaylang=en)

Note If you do not want to install all the IIS tools on your computer, you can install only the Metabase Explorer 1.6 component. To do this, follow these steps:

a. Double-click iis60rkt.exe, and then follow the instructions that are on your screen until you reach the Setup Type page of the IIS 6.0 Resource Kit Tools Setup Wizard.

b. On the Setup Type page, click Custom, and the click Next.

c. Click to clear all the IIS Resource Kit Tools and components check boxes except the Metabase Explorer 1.6 check box.

d. Click Next, and then click Finish.

2. Back up your IIS metabase. To do this, follow these steps:

a. Start IIS Manager.

b. Right-click Default Web Site, point to All Tasks, and then click Save Configuration to a File.

c. In the Save Configuration to a File dialog box, type a configuration name in the File name input box, and then click OK.

3. Delete the virtual directories for Outlook Web Access. To do this, expand the Default Web Site in the left pane of IIS Manager, right-click Exadmin, and then click Delete. Click Yes when you are prompted with the question of whether you want to delete this item.

Repeat this step for the following virtual directories:

Exchange, ExchWeb, Microsoft-Server-ActiveSync, OMA

Public

4. Quit IIS Manager.

5. Click Start, point to All Programs, point to IIS Resources, point to Metabase Explorer, and then click Metabase Explorer.

6. Expand LM, right-click DS2MB, and then click Delete. Click Yes when you are prompted with the question of whether you want to delete this key and all subkeys.

7. Quit IIS Metabase Explorer.

8. Click Start, point to All Programs, point to Administrative Tools, and then click Services.

9. To restart the Microsoft Exchange System Attendant service, follow these steps:

a. Click Start, click Run, type services.msc, and then click OK.

b. Right-click Microsoft Exchange System Attendant, and then click Restart.

c. When you are prompted to restart the dependant Exchange Server services, click Yes.

Note When you restart the Microsoft Exchange System Attendant service, the Microsoft Exchange Information Store service is also restarted. In this scenario, your Exchange Server users lose connectivity to their Exchange Server mailboxes.

The virtual directories are re-created. To verify that the virtual directories are re-created, start IIS Manager, and then view the Default Web site folder.

Important If the virtual directories are not re-created after 15 minutes, restart your computer.

10. Reset the access permissions to Anonymous. To do this, follow these steps:

a. Start IIS Manager, right-click ExchWeb, click Properties, and then click the Directory Security tab.

b. Under Authentication and access control click Edit, and then verify that the Enable anonymous access check box is turned on.

c. Click to select the Integrated Windows authentication check box, click OK, and then click Apply.

d. If you an Inheritance Overrides dialog box appears, click Select All, and then click OK.

e. Under Authentication and access control, click Edit, and then click to clear the Integrated Windows authentication check box.

f. Click OK two times, and then quit IIS Manager.

Use a Web browser to verify that you can connect to your Outlook Web Access server. If you are also running other mobility services, verify that you can connect to these services by using an appropriate client.


So now the users could access their emails. I also realized that, with Exchange 2003 and Outlook 2003+, we can allow the user to access the exchange server using RPC over HTTP. We paid for Exchange and Outlook, so we might as well get everything we can out of it. Several users prefer the traditional Fat Email Client over the Browser based email model. Following the steps detailed in http://www.petri.co.il/configure_outlook_2003_to_use_rpc_over_http.htm, I was able to give the users their choice of access to their emails. There were a few other examples, but this one seems to fit my exact scenario.

To solve #2, I needed a way to allows users remotely and locally to access their files. The Application server contains a path that everyone needs (what we will call the Public Path). All the users have some recent version of Word and Excel on their desktop, so I just need a way for them to access this path.
1. I purchased an external drive,
2. I moved the public folder to this external drive,
3. attached it to the exchange server and deactivated the share on the Application Server.
4. I then installed Hamachi http://en.wikipedia.org/wiki/Hamachi on the Exchange server.
5. I create a network on the Server Hamachi installation called “MyNetwork”
6. I install Hamachi on the client machines and have them join the “MyNetwork” network.

They will now be able to access the files they need.

This event has exposed a serious flaw in our architecture in that the users could not get access to their emails because of the strange issues with the Application Server. We are going to rethink our architecture.

Tuesday, January 22, 2008

When opening a project in VS2008, a dialog appears with asking to manually set up ASP.NET 2.0

the message dialog says:
"ASP.NET 2.0 has not been registered on the Web Server. You need to manually configure you Web server for ASP.NET 2.0 in order for your site to run correctly, Press F1 for more details"

I remembered there was an easy way to install ASP.NET 2.0 using a tool found in %WINDIR%\Microsoft.NET\Framework\v2.0.50727 called aspnet_regiis.

I opened a command line, I navigated to the above path and typed in
aspnet_regiis -ir

Note: I chose to use the -ir parameter to simply install ASP.NET, but not have it update the application pools. I have read that using the -i parameter can be dangerous, read the following link to get more detail:
http://weblogs.asp.net/owscott/archive/2006/05/30/ASPNet_5F00_regiis.exe-tool_2C00_-setting-the-default-version-without-forcing-an-upgrade-on-all-sites.aspx

Below is the dialog from the command line window:
C:\Windows\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis -ir
Start installing ASP.NET (2.0.50727).
................................................................................
................................................................................
.......................................
An error has occurred: 0x80004005 Unspecified error



After hunting around the net, I happened upon this website that provided the answer:
http://weblogs.asp.net/scottgu/archive/2006/09/19/Tip_2F00_Trick_3A00_-Using-IIS7-on-Vista-with-VS-2005.aspx
Written by http://www.wyattpreul.com/

Solution to "An error occurred..."

1. Open C:\Windows\System32\inetsrv\config\applicationhost.config

2. Remove ISAPI filter entries inside the sections.

3. Stop the w3svc with "net stop w3svc"

4. run "aspnet_regiis -i"

5. Start the w3svc with "net start w3svc"


Using windows explorer, I went to the .config file referenced above and found:

«isapiFilters»
«filter name="ASP.NET_2.0.50727.210" path="C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_filter.dll" enableCache="true" preCondition="" /»
«filter name="ASP.NET_2.0.50727.0" path="C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_filter.dll" enableCache="true" /»
«/isapiFilters»


I altered the file by removing the child nodes under isapiFilters.
The setting now looks like this

«isapiFilters»
«/isapiFilters»

I ran the application again:
C:\Windows\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis -ir
Start installing ASP.NET (2.0.50727).
................................................................................
...............................................................
Finished installing ASP.NET (2.0.50727).

C:\Windows\Microsoft.NET\Framework\v2.0.50727>


Success! thank you internet!

Friday, January 18, 2008

Error on ajax.asp.net - sys is undefined

I am developing an application (module ) for DNN 4.8 (Project Structure:WAP). I was in the process of moving my application from VS2005 to VS2008. I downloaded the source code for DNN 4.8, and opened it in VS2008. I compiled and ran it and started receiving this dreaded "Sys is missing" error.More specifically, I was recieving:Handler 'AJAX_ScriptResourceHandler' has a bad module 'ManagedPipelineHandler' in its module list

I discovered this using Firefox's Firebug plugin, which allowed me to view the scripts that were used in rendering the page. It allowed me to see the error when it tried to enter the script.

After spending a day scouring the internet for some news on this, I saw something on http://forums.iis.net/p/1054083/1533808.aspx that grabbed my attention.

Even though the info on that forum post was somewhat vaguely close to my scenario, it pointed me to this site:http://www.iis.net/articles/view.aspx/IIS7/Hosting-Web-Applications/ASP-NET/Upgrading-ASP-NET-1-1-to-IIS7-on-Windows-Vista---L?Page=3
Which explained to be the difference between Classic and Integrated mode.

It was then that I decided to change the application pool that I was running my DNN app in from Integrated to Classic. After recycling the app pool, my application loaded as expected.

YAY!