3

I have a pretty old VS 2003 web app that I've finally been able to run via F5. However, the IDE doesn't break on any breakpoints.

I think this is related to the confgiuration. Previously, when I pulled up the properties of the project and went to Configuration Properties/Debugging, only Enable ASP Debugging was set to true. From the suggestion of others, I also enabled ASP.NET Debugging and Unmanaged Debugging. However, an error occurs if both ASP Debugging and Unmanaged debugging are enabled.

enter image description here

So I disabled ASP Debugging, which left just ASP.NET Debugging and and Unmanaged Debugging enabled. I actually have no idea why Unamaged Debugging is enabled because as far as I can tell, there is no unmanaged code. But if that's not enabled, another error occurs.

enter image description here

That being said, it seems to run fine with those two enabled, but I can't debug. Any ideas why?

ernest
  • 1,633
  • 2
  • 30
  • 48

2 Answers2

0

Sheesh! VS2003! Specifically referring to your managed code error, there are some steps I've found in an old msdn post that references an even older post that has the following steps outlined.

Basically, in order to debug those older asp.net web apps you need to make some mods to IIS and your machine. The example below is specific to server 2008, so you'll need to modify some of the navigational steps to suit your OS (If different)

I'm assuming you have probably have IIS 7.5 Installed and if so it seems to have worked for the person in this post (references below)

1 - Install IIS Metabase Compatibility

To install on Windows 2008 Server – click Start and then “Server Manager”.

Under Web Server (IIS), click Add Role Services.

Ensure that IIS Metabase Compatibility is installed.

2 - Install .Net 1.1

I installed .Net 1.1 in the following order:

I still got a compatibility warning, but chose “Run Program” to continue.

Installing Service Pack 1 is likely to require a reboot.

3 – Enable ASP.Net 1.1 ISAPI Extension

Following the steps in option 2 made ASP.NET v1.1.4322 available on my ISAPI and CGI Restrictions dialog, but was disabled by default. Open Internet Explorer, click on your server name and choose ISAPI and CGI Restrictions from the IIS section. Enable ASP.Net v1.1.4322 as a valid ISAPI extension.

4 – Adjust machine.config

We need ASP.NET 1.1 to ignore IIS configuration sections, so open machine.config for Framework 1.1 (%windir%\Microsoft.NET\Framework\v1.1.4322\config\machine.config) and add the following towards the end of configSections.

<section name="system.webServer" type="System.Configuration.IgnoreSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

5 – Adjust the Application pool

I now needed to tell my application to use the application pool ASP.NET 1.1. Use IIS Manager, choose the site that you are working with and choose “Advanced Settings”. Adjust the application pool to use ASP.NET 1.1 which will use .Net Framework 1.1.

6 – Fix applicationHost.config bug

IIS runtime detected that I was running on a 64 bit operating system, so it attempted to load .net framework configuration from Microsoft.Net\Framework64, but this doesn’t exist for .Net Framework 1.1. The solution is to copy the 32 bit version into the appropriate 64 bit folder.

  • Create \Windows\Microsoft.net\Framework64\v1.1.4322\config
  • Copy machine.config from \Windows\Microsoft.net\Framework\v1.1.4322\Config\

References

JP.
  • 131
  • 4
  • I believe I saw something like this before, but I'm hesitant to do any of these steps since I'm on Windows Server 2003 and IIS 6. – ernest Oct 14 '14 at 12:02
  • hey ernst - thats understandable. Please see my next answer and let me know if that works for you. Cheers – JP. Oct 15 '14 at 03:51
0

Best recommendation I can offer, especially due to being reluctant to modify any settings on your existing production configuration, is to set it all up on a local workstation; develop your code locally where you can test and deploy any updates to your webserver properly.

Out of curiosity, is your source code on a separate web server to your development machine i.e do you have Visual Studio 2003 .NET installed on your workstation and are attempting to debug the project remotely while it is on the webserver?

If this is the case this is apparently alright if you have installed remote components The remote setup runs automatically when you install Visual Studio .NET, but you can apparently run it separately: see: http://msdn.microsoft.com/en-us/library/ey7ec813%28v=vs.71%29.aspx

That said, other threads I've found about this have said that it probably isn't worth the hassle (unless you really want to give it a go), and that the best way forward would be to fresh install a development workstation with everything you need and code your project from there.

Best of luck.

JP.
  • 131
  • 4