HTTP/1.1 500 Server Error With ASP classic - asp-classic

At the very outset I would like to state that this is my first ASP classic page that I have created which since the first deployment on IIS is giving me server 500 error. I have searched the entire web and have done almost everything possible to get this right, but all in vain.
I have created a classic ASP page using Web Matrix. This is a web based dashboard which connects to MSSQL server and fetch necessary information. I have a similar app in php which is working perfect, but I wanted to learn ASP hence was trying to make a similar web app on ASP. This app works absolutely fine on Web Matrix. When I run this app from within web matrix (both on chrome as well as IE) it connects to the required database and I can browse the details as expected. The problem starts when I host this on IIS (localhost on my windows 7 pc). This is the exact procedure that I have followed :
Created a new Site on IIS named "YCube"
Using basic settings I have given the following Physical path for the app (D:\YVXS\Personal\ASP\SSTool\Ycube) {the project output folder}
In the bindings page I have assigned port 81
IIS authentication is set to "Anonymous Auth"
Application pool for asp is set to classic (as IIS first stated it cannot perform the task in integrated mode)
After this when I tried browsing localhost:81/menu.asp, it given me server 500 error. The 21 days research starts now (bullet points below)
To get the descreptive errors on the web page I did following but the error description did not change IIS->asp->Compliation->send error to browser =true, friendly http error on IE = disabled
IIS log files, not sure if iam not able to understand the error but am getting follwing on the log file (C:\inetpub\logs\LogFiles\W3SVC1
2013-02-23 08:07:44 ::1 GET /menu.asp |-|ASP_0147|500_Server_Error 80 - ::1
On the IIS forum only I underatood at time global.asa file can cause this problem, I deleted this file and tried, all in vain
The folder and files permission for my site is read only, however I have tried the same with read and write access also, this also did not help
On the error pages in IIS, i have changed the "Edit feature settins" to "Detailed error", this also didnot give me any futher error desc.
24 times i have uninstalled IIS and installed back, nothing has happend
Someone suggested to created a dummy asp file and try hosting the same of IIS, so I used a small code
<HTML> <BODY> This page was last refreshed on <%= Now() %>. </BODY> </HTML>,
this is giving correct output (This page was last refreshed at 18:88:22....), however with my original asp page I still get server 500 error
A friend of mine suggested to delete all other hosted web pages from IIS and try (I had one PHP on the IIS), hence I deleted the same and tried, no changes at all
Event log file is showing nothing pertaining the ASP (only few files are there which tells about unexpected shutdown of my PC)
I created a second ASP file which had MS access at the backed, this only is also giving me same server 500 error
Other things that I have tried is changing the web.config file to send detailed error, (thouh i forgot the exact line) but that also did not help me
Here are my system config and other details Windows 7 professional, IIS7.5.7600, MSSQLR2express. Also please note that I have tried hosting this on two othe pc's that I have(both windows 7) and in office server 2003, but all are giving me same server 500 error.
Never thought learning a classic asp will put me into all this Jazz...please help..

Couple of Things u need to take care of while configuring ASP site in IIS
1) Enable parent path = true
2) if you have 64 bit machine need to set your Application pool for 32 bit.
this are default settings which we need to take care.

Related

set Default.html as start page in Web application

I had played down with my host configurations to the point that I can't revert back! I just want to be able to run it from my own visual studio, so I can debug some javascript and don't care if it is not running on Local IIS. I have web application in VS 2013 (Proj1) that I want to add a default.html page to. I set it as the start page, but when running the app, I keep getting the error:
HTTP Error 500.19 - Internal Server Error The requested page cannot be
accessed because the related configuration data for the page is
invalid.
Luckily, this is my own personal machine and I don't mind resetting its IIS or changing its apps configurations. I've tried the following:
I had initially setup my web application via VS as SSL Enabled = true, but now I am trying to reset, so my project properties look like this:
Even though I don't care about IIS setup, I still looked into my C:\Windows\System32\inetsrv\Config\applicationHost.config file, but looked fine
looked at my web.config, but nothing stands out
I think the process of setting up the SSL is the culprit. Is there anywhere else I should look? I just want to be able to run a simple Default.html
I had a problem very similar to this before in the past. This is what I did to solve it.
Try to debug a very basic page with nothing on it (Make sure that works)
Then start building the page back up.
For me it was when I added "Custom Controls" back in, when I removed those controls from the page everything worked.

Windows 2008 R2 IIS7 windows authentication not working

I have a dev and prod Windows 2008 R2 servers with IIS7 and siteminder, which as far as I can tell are setup the same. Issue being the production websites work but the development ones do not.
Issue being that when I navigate to any dev website, it says "the page cannot be displayed because an internal server error has occured." I do not get a challenge in dev (which I believe is the cause of the issue), but I do in prod. This goes for classic ASP pages or ASP.NET pages.
Some findings :-
- IIS has Windows authentication enabled and all others disabled
- Windows Authentication Provider is Negotiate (tried Negotiate:Kerberos, same result)
- WindowsAuthentication and WindowsAuthenticationModule (Native) are both present in Modules
- WindowsAuthentication is installed under Server Manager -> IIS -> Roles
- Upon receipt of the above error message, IIS logs shows the access with error 401 2 5
All the solutions I found online either do not have the right setup as I do above, or suggests I disable Windows authentication and enable Anonymous Authentication. If I do so, all works fine but the only issue being my websites require Windows authentication to identify the user. I'm at my wit's end and am just short of reinstalling something in hope it works. Any possibilities or log files that I have overlooked?
After screwing around a bit I finally solved my problem ... hope this helps someone.
I realized in fact ASP pages were working but ASP.NET pages were not working
When I had turned on Anonymous Authentication, the ASP.NET pages were now giving 500 0 or 500 19 errors in IIS logs, instead of 401 2 5 with Windows Authentication
I tried to launch a ASP.NET page from within the localhost and got then 500 error with a more detailed error saying I should use relative path in httpErrors under web.config (??)
At this point I realized I had earlier changed the 403 error to a custom file at the default website level, then changed it back. Despite changing it back to it's previous value, What this ended up doing was adding a "remove" then an "add" tag, both for 403.htm, under httpErrors in the wwwroot/web.config. After I deleted the entire httpErrors segment, my websites started working again.
Reverting back to Windows Authentication at this point also worked.
So some take aways is to test websites locally first and keep in mind the existing of the wwwroot/web.config giving near untraceable errors ...

Can't find the include files for classic asp site

I'm having problems with an old classic asp site that I'm trying to get set up in a dev environment. I get the following error at the line for the include files.
An error occurred on the server when processing the URL. Please contact the system administrator.
If you are the system administrator please click here to find out more about this error.
Here's my setup:
I'm running IIS 7 on Win 7.
I have an app pool ControlPanel set up with No managed code and classic pipeline
My website ControlPanel configured under default websites pointing to my project directory "C:\Projects\uk_CP\uk_AU\au"
Many of the pages work, I can log in, click on a link to a feedback form, but eventually I get the above error.
My feedback form is located at "C:\Projects\uk_CP\uk_Au\au\feedbackform_admin\dataview_master.asp"
It has two include files:
<!--#include file="../inc/adovbs.inc" -->
<!--#include file="../inc/incCreateConn.asp" -->
this are correctly located in "C:\Projects\uk_CP\uk_Au\au\inc\"
Is perhaps my IIS configured incorrectly that throws off my working directory? Is there a useful way to troubleshoot the path it's looking at? I haven't work in classic asp in 10 years and it is not something I want to become an expert in, but I do need to get this figured out and I've killed too much time as it is.
Obviously this is an issue with my setup since it does work in production...
In your ASP-configuration you must enable the setting 'Allow parent paths'

ASP File Permissions

I'm a ASP.NET developer who was contacted by a client asking me to make some changes to their site after someone told them it was ASP.NET. It wasn't, it was classic ASP but she seemed at her wits end with it so I said I would give it a go. However I have very little experience with Classic ASP.
Am currently trying to update a form. Have copied the entire site and database to my local machine and got it up and running. I have set the Anonymous user to my windows user to allow me to connect to the database using windows authentication.
The difficulty I am having is when I go to edit an existing record using the edit form and click save on my local machine I get the following error:
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/xtpropertyedit.asp, line 200
800401f3
However it works fine on the hosted version of the site. I imagine this is an permissions issue. I have tried adding my user with full permissions to the root folder of the site on my local machine but that doesn't seem to make a difference.
Set Jpeg = Server.CreateObject("Persits.Jpeg") '** Line 200 **
Any ideas?
AspJpeg is a paid third-party component and seems like it's not installed on your development computer. It can be used without any limitation for 30 days.

HTTP Error 403.14 - Forbidden Error when accessing website

So I have all the updated code, the entire solution builds. It works on everyone else's machine, however when I try and access localhost/extranet on my machine, it gives me this error:
HTTP Error 403.14 - Forbidden
Detail Error Info:
Module DirectoryListingModule
Notification ExecuteRequestHandler
Handler 0x00000000
Requested URL http://localhost:80/extranet/
Physical Path C:\svn\K2\trunk\appteam\web\Chatham.Web.UI.Extranet\
Logon Method Anonymous
Logon User Anonymous
Now I tried going into IIS7, and enabling directory browsing, this removed the error, but still didn't bring up my website. I also tried going in and disabling the default document, re-enabling it, everything, nothing worked. I've also restarted IIS a few times to no avail.
Any ideas?
It sounds like your IIS is not processing the routing rules for your application and is trying to find a default.aspx, index.htm, etc. Since it cannot, it is wanting to display the directory listings (which is why you were getting the 404.14).
I just checked my dev setup and I think that your AppPool has to be set on Integrated as opposed to Classic on the Managed Pipeline for the AppPool. I have ran into this before, there may be ways to use the Classic Pipeline, but this would/should be the quickest way to resolve your issue. To check/change the pipeline mode, click on Application Pools from the menu on the left side of IIS, find your AppPool and look in the managed pipeline column. If it is set to Classic -> Right click the AppPool, choose basic settings, then change the dropdown from Classic to Integrated.
If I am incorrect, someone please feel free to correct me on this in the comments.
Edit - Just to add, you can run an MVC app in the Classic Pipeline mode, but you have to do the IIS 6 tricks to get it to work properly. Mainly, you need to turn on wildcard script mapping for MVC to work in Classic mode, If not it expects an .aspx file (or similar) to exist for it to handle the execution pipeline over to .NET from IIS.
Causes this error is removed Global.asax file from your root directory of your site.
To solve this problem add a Global.asax file to your project.
See here: How to add Global.asax file to ASP.NET MVC4 project
In IIS, you need to find out which app pool your application is running from. Just right click the web application under Sites>Manage Web Site>Advanced Settings. The first property should be the app pool.
Now, click Application Pools. You should see a column called "Identity". Add that user to the ACL of the C:\svn\K2\trunk\appteam\web\Chatham.Web.UI.Extranet\ directory. If it just says 'ApplicationPoolIdentity', it can be a little tricky figuring out the user. If it's just running under DefaultAppPool, you can use IIS AppPool\DefaultAppPool.
My solution was because I didn't have ASP.NET installed via "Turn Windows Features on and Off" so it was simple. I figured it out by enabling directory browser and trying to go to my views folder which then gave a more descriptive answer and pretty much said that there was a problem with a module because ASP.NET is not properly installed. It then dawned on my to go and install it.
Change the 'start page' by right click on the page and select 'Set as Start Page' that you want to open first when the web application starts first. This might solve your problem. :)
Also make sure in IIS Application Pool settings that Enabled 32-bit Applications under Advanced Settings is set to FALSE. I spent hours trying to fix this and that was my issue. Windows Server 2012 IIS 8.5
I solved this problem by setting exact .net framework. My website was using v4.0 version of .net.
Workaround to handle the problem:
Open command line as an administrator
Go to directory "C:\Windows\Microsoft.NET\Framework\v4.0.30319"
Execute the following: aspnet_regiis.exe -i
Open IIS and change Pipeline Mode of Your application to Integrated
Hope this helps
In my case the HTTP Redirection feature was missing on the server (with IIS 10).
Adding the feature resolved the issue and the site started to load fine.

Resources