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!