Classic ASP function calls not working on Windows 2008 R2 in IIS 7.5 - asp-classic

We are moving our web site from a Windows 2003 server running IIS 6 to a Windows 2008 R2 server running IIS 7.5. The web site is mostly written in classic ASP but there are a handful of Dot Net apps as part of the web site as well.
Right now I am just trying to get the basic foundational code to work and that is all Classic ASP. There are a couple of ASP files that are just VBScript pages with a series of functions in the file. In the main pages there is a statement embedded near the top of the file.
Later in the ASP page it calls one of the functions from the MyFunctions.asp file. This works great on the old server but on the new server it acts like it never heard of this function and it gives me an error. It is a non descriptive 505 error so I don't know what the browser is actually complaining about.
I tried comparing the IIS 7 Web Site setup with another 2008 R2 & IIS 7.5 web server that is working (although it is running a straight dot net web site so that could be the main difference) to see if I could see if anything was different and they were mostly the same.
I read about creating a Classic ASP App Pool that does not use managed code and the pipeline is classic and I set the web site to use that App Pool but that didn't help anything.
I am at a loss and I don't want to nor do I have the time to rewrite the web site in dot net.

I had a similar thing recently. Turned out that the classic ASP code was using server-side includes and these had been disabled in IIS on the the new server. Worth a check.

The solution was much simpler than I thought. Most of the classic ASP code is written so that the VBScript is wrapped with "<%" and "%>". There may be a setting in IIS 7.5 to allow for this but if I get more specific and wrap my VBScript with "" and "" then everything works fine.
If there is a setting in IIS to not be so strict I don't know where it is. But it is not a problem with me to go through the code and do a simple search and replace.

Related

Set up C# http module on windows 2003 server in 32-bit mode

i've got a site set up in Classic Asp on Windows Server 2003 and i'd like to run some HTTP module written in C# on the site when it gets hit.
Is this as simple as putting the module in a subdirectory and sticking a web.config in root? Will that disrupt the Classic ASP stuff?
this might be too convoluted and there may be a much easier way, but I think you can't run ASP and .NET in the same application, so you could put the c# in a folder, create a virtual directory pointing to it and use ajax to call it from your ASP (client side). Or just create another site for it. Just a thought.

Can't debug ASP.NET application stored in IIS

I have a question regarding IIS (version 7.5) and ASP.NET (.NET Framework 4) . I am trying to debug ASP.NET web application which is stored on IIS. Now, I have done this in past and everytime it worked perfectly.
But now when I try to do same, **Visual Studio 2010** always gives me error, **"unable to start debugging on the web server. the iis worker process for the launched URL is not currently running" ...** even the application I had created in past (& stored in IIS) can't debug using Visual Studio. But all applications (new & old) can be accessed if I type their path in Browser, and they work fine too.
I did search on internet about my problem and I found many posts, but almost every post talks about activating **Windows Authentication** in IIS for the application in question. But, I am using Windows 7 home premium and the IIS shipped with this version doesn't support option for Windows Authentication. Also, if this is the only reason then why my old applications were working just fine till now without this Authentication method?? I found MSDN help about this error but it is not much helpful to me. I also checked APPLICATION POOL selection in IIS and my Application (both are using V.4.XX.XXX)... I have also checked **BINDING** , which is *:80 to Default Website, that means all requests to port 80 will be directed to default website (where my all applications reside)
As a side note, I have SharePoint Server 2010 installed. Which has its own website (which I have disabled while debugging) ...
I think there is something is changed in my IIS configuration, but I cant figure out what it is. And I am sure that it has something to do with SharePoint installation (may be because of more than one website on IIS for same port ??). Because I am using IIS for first time after installing SharePoint and I am having this error.
I will really appreciate if any one has answer ...
Thanks,
Jack
UPDATE: As I suspected ... having more than one site in IIS was root cause of trouble, Once I uninstalled Sharepoint Server 2010 and its web sites from IIS, my Visual Studio 2010 debugger was able to "Auto-Attach" w3wp.exe process while debugging any application ... ( I really don't see any reason that even after disabling all other websites why still it was giving me error at first place ?? )
I know its not a solution, because I have to remove Sharepoint Server ... but at present its more important for me to work on that application then Sharepoint Server.
But I am still open for any suggestions which might help me to run both together ....
Thanks,
Jack
Check the Bug fix for this issue in the Microsoft's Connect site.
.
Is it with .NET 3.5 in Visual Studio 2010 , if yes , then check http://www.ginktage.com/2010/08/fix-for-visual-studio-2010-hangs-when-debugging-asp-net-3-5-web-application/ for information

ASP .NET Development Server not serving everything all the time

I'm using Visual Studio 2005 on a Windows XP SP3 machine and recently have come accross a some what strange issue.
I have a C# and ASP.NET project that runs fine when on the team test server and using IIS locally on my own machine. However, running it using the in-built Visual Studio ASP.NET Development server it doesn't seem to serve all the images/scripts/css files all of the time. When I load a page one time images A, B and C will be missing and I may get a system (sub-package) error however loading it again all those images will be there and the sub-package will work but a CSS, a script or any other image file may be missing.
The Windows event application log seems to show occasionally the missing files will be logged but this isn't consistent either.
It happens to me all the time; I think the reason is that the ASP.NET Develoment server is not a very good HTTP server, and when receiveing too many requests, it drops some ones.
Since it is also very very slow, I configured vs2008 (you can do that with vs2005, of course) to use ASP.NET for debugging; it works far better that way.
To do that:
Project -> properties -> Web (last tab) -> Server. There are three alternatives: Use Visual Studio Development Server; Use local Web IIS; Use custom Web server. Choose the second. (not sure about the exact english names: I have the Italian version of VS).
Check the page in Firefox/Firebug or with IE8 and see if the paths to the files/scripts/images is correct or not. A common problem when switching between the local dev webserver and IIS hosted pages is that the paths may not resolve the same. You can fix this sometimes by using the "~" character before a path in the asp code.

VS ASP.NET 500 Server Error

Hey guys, I'm having a super weird problem with my VS 2008 solution.
We had this hand-coded ASP.NET compiled web app on our old IIS6/Win2003 server, working great, moved it to our new IIS7/Win2008 server, still working great, but when I try to compile the application and publish it again to our new Win2008 server, I get server 500 errors. It's ASP.NET 2.0 with AJAX extensions and AJAX control toolkit.
I'm not too great with server issues, or even sure if it is a server issue but here are some more symptoms... ?
I know the website works (it only differs by some minor code fixes) and can use it's code on a development machine, there are no errors, and it publishes fine. Publishing (using the DLL files), and even not publishing and trying to use the code-behind files on our new server, both no success. The old website does work on the new server just fine.
If I put a simple hello world html page in the website's virtual directory, with the old code, it works fine, but with the new code, that html page gets the 500 error. And in fact, oddly, I can add all the files to the website, only when I add the web.config, do I get the 500 error. The web.config has not changed.
Tried stopping and restarting IIS
What's the problem, here? Any ideas, what else can I do to troubleshoot the problem?
Check what IIS7 is running under .NET 2.0 or .NET 3.5?
Its tough to see without being there, have you checked which App pool the server is running the site on? (default should be OK, I have found some to be set to classic which causes problems with the AJAX control toolkit)
Also you could try aspnet_regiis -i (if the server is 64 bit make sure you run the one under the 64 bit version of .net)
It was a IIS 7 to 8 issue.
Both machines have different assemblies that need to be just-so on the web.config, in addition with IIS7 web.config changes to make AJAX happy (it has new XML sections).

Is there a small classic ASP server like ASP.NET Development server that comes with Visual Studio?

I would like to hear if there is a small classic ASP server, similar to the ASP.NET Development server that comes with Visual Studio?
We are a small group that supports a legacy (classic) ASP site, and would therefore like to have a small server that easily can be executed on a Windows XP machine. Currently we're stuck with IIS 5.1 on our development machines (and because we're running XP Pro, we cannot update to IIS 6 or 7).
I've tried installing the Cassini web server, but that doesn't seem to work with classic ASP either.
You're not going to get anything extra from ASP by running on IIS 6 or 7. Are you having any specific issues with being stuck on IIS 5.1?
Have you tried Baby Web Server? - http://www.pablosoftwaresolutions.com/html/baby_web_server.html
The short answer is No, there is no small web server that runs classic ASP. There are many alternatives, as mentioned here, such as IIS or Apache plug-ins, but none that has a similar small footprint like the ASP.NET Development Server that comes with Visual Studio and that supports debugging.
There is a small footprint web server that runs Classic ASP.
Its called Abyss Web server. Abyss Web server is produced by Aprelium software and can be downloaded free of charge. Abyss Web server can be configured to run with ASP.net OR Classic ASP.
The Server can be configured to run ASP.net without any addition downloads.
To run Classic ASP on the server a program called ActiveHTML written by Selisoft must be downloaded and configured to allow Classic ASP to run on the Abyss web server. Active HTML is on a 45 day free trial and if you like it the purchase price is currently around 30 to 40 euros depending on whether you need a client or server version.
Hope this helps.
Anthony
Abyss web server http://www.aprelium.com/ supports classic ASP (also ASP.Net, Ruby, and PHP) with a 3rd party extension that cost $$$. But at one point there was a free version of the third party component, you MIGHT be able to find a copy of that still floating around. Not sure about debugging.
Baby ASP Web Server can take care of things for you, PLUS you don't have to install it, so it doesn't plop all sorts of crazy settings into your registry.
Get it here
Your only real choice is to either run Windows server or Vista in order to get the latest version of IIS.
Cassini doesn't support classic asp.
According to this post it is not possible to run ASP on Cassini. A couple of google searches later I have still not been able to find any other alternatives either.
What functionality is it that you're after? If it is the quick-and-easy running features of VS, you can quite easily make the IDE debug on IIS (although ASP cannot technically be "debugged" - what you really do is just run it with the Ctrl+F5 command).
Here is a web site that allows you to run classic ASP pages from any web server (including IIS and Apache), but it costs money:
http://www.selisoft.com/en/ahtml/index.phtml

Resources