Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 17th, 2006, 04:52 PM
Registered User
 
Join Date: Apr 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Compilation Error with ASP.Net 2.0 & IIS 5.1

Hi,

I am working with an open source application called DotNetNuke 4.0.2. I have the version 3.2.1 (an ASP.NET 1.1 version) running but I have not had any success with 4.0.2 (an ASP.NET 2.0 version). My OS is Win XP SP2 and I have IIS 5.1 installed. I also have VS 2003 and 2005, ASP.NET 1.1 and 2.0, SQL Server 2000 and 2005 installed and running. However, I continue to get a compilation error on a Try… Catch block because it appears that Exception is not recognized as part of the System namespace. The change Exception to System.Exception works but there are many of these Try… Catch blocks in DNN 4.0.2 and I can’t change them all. The compiler error message is BC30392: ‘Catch’ cannot catch type ‘exception’ because it is not ‘System.Exception’ or a class that inherits from ‘System.Exception’. Interestingly, the VS 2005 IntelliSense recognizes Exception in the code as part of the System hierarchy.

After a week I still haven’t eliminated this error but have narrowed it, I think, to a problem with IIS 5.1. I created a small test website using VS 2005. I placed a Try… Catch block in a button click event. I first executed it using the ASP.NET Development Server. No problems occurred! However, when I tried to execute it via IIS 5.1 I got the same error (BC30392) that I got with the DNN 4.0.2 application. On the test application I commented out the Try… Catch block and it ran on IIS 5.1 with no problems! I then went back to the DNN application thinking I could switch to the ASP.NET Development Server but when I click the Website menu and then Start Options to access the property page I noticed that the Server toggle button is set at Use default Web server and Use custom server is grayed out. Also interestingly the NTLM Authentication check box on the Use default Web server is not present in the property page for the DNN application. This forces me to use IIS. I suspect this is all related to values in the DNN application solution file.

Also, I found some information on problems with IIS mappings (Articles 306005 and 325093) but I am not getting these exact behaviors. I did look at my IIS mapping and it looks like I am pointing to the correct Framework version (v2.0.50727). The error output also indicates this. I have tried a lot of “fixes” from reinstalling VS 2005 to things like running aspnet_regiis -i from the correct Windows Framework directory (v2.0.50727) but nothing worked. However, my old DNN 3.2.1 (ASP.NET 1.1) application still works with IIS 5.1!

I have posted this problem on a number of DNN and ASP.NET forums. Here are the links where you can read some excruciating details with lots of error output, if you are so inclined - http://forums.asp.net/thread/1258209.aspx, http://forums.asp.net/thread/1258765.aspx, http://www.dotnetnuke.com/Community/...s/Default.aspx, http://www.dotnetnuke.com/Community/...s/Default.aspx.

I have noticed some other IIS issues that might have a similar cause but none with this exact error (BC30392). Any suggestions? I have also noticed that some people have had configuration problems with ASP.NET 2.0. Could that be the root of my problem?

There could very well be a simple fix for this but I just don’t see it. If anyone can point me in the right direction it would be very much appreciated.

Thanks,
G. Mitchell







Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with IIS & .NET anujrathi General .NET 1 May 4th, 2006 07:10 AM
SQL Server error with VWD Expres & IIS bradnerdhss BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 1 January 30th, 2006 06:09 AM
ASP cache & IIS setting kalunalan Classic ASP Basics 2 February 25th, 2004 10:52 PM
Asp.net and IIS-Error 500 problem fig000 VS.NET 2002/2003 0 September 18th, 2003 08:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.