How do I debug a 500 Internal Server Error on IIS 6.0 managed by Plesk (running ASP classic)? - debugging

I have read pretty much EVERY blog post, article and help document published regarding this problem and they have not helped. The most common suggestions are:
Internet Explorer -> Tools Menu -> Internet Options -> Advanced -> Show Friendly Error Messages (make sure this is NOT ticked)
IIS -> Home Directory tab -> Configuration... -> Debugging tab -> Send Detailed ASP Error message to the client (make sure this is selected)
Neither of these work and I have a feeling it has to do with Plesks management of IIS. Is there ANY way to see what these Internal Server Errors are? Even if it means browsing around the server for log files?

The class_terminate event can be used to create a global error handler without touching the iis config. When ASP encounters an error it server.execute's the configured 500 handler and then return to the orginal script to clean up all remaining objects.
This offers you an opportunity to create a global debugger object and use the class_terminate event to handle the errors (eg print out debug info).
Eg:
class cDebugger
private sub class_terminate
if err then
response.clear
dim asp_error
set asp_error = server.getLastError()
response.write asp_error.description
...
...
end if
end sub
end class
set [_debugger] = new cDebugger

The following applies to Plesk only.
Proceed to your domain in Plesk control panel and turn off "Custom Error Documents" under "Physical hosting setup". This will send error message directly to the browser.
You can also find error messages in log file directory yourdomain.com\statistics\logs\W3SVCXXXX

An idea spurred on by Agent_9191:
At the top of the page put:
On Error Resume Next
And at the bottom of the page put:
If Err.Number <> 0 Then Response.Write(Err.Description)
Any other ideas on debugging direct from IIS without changing page code?

Another LEGENDARY page for ASP Classic developers (using IIS 7.0 though) is here:
http://blogs.iis.net/bills/archive/2007/05/21/tips-for-classic-asp-developers-on-iis7.aspx

"If" you have the ability to chance your custom 500 error page then you can catch the error using a call to Server.GetLastError which will give you all the details (well most of them) which should allow you to start debugging it on live.
http://www.w3schools.com/ASP/asp_ref_error.asp
Can you not recreate the problem locally?

Related

How do I stop iisnode on Windows Server 2019 from caching my javascript files?

I have a node.js application running on iisnode running on IIS 10 running on Windows Server 2019.
At one of these layers, there seems to be some caching of javascript files. For example, in my app.js file, I had this:
fs.appendfilesync('log.txt', 'CORS set up.\n');
...which was giving me the error:
appendfilesync is not a function.
I realized I had a typo: it should be camel cased. So I changed it to:
fs.appendFileSync('log.txt', 'CORS set up.\n');
But it kept giving me the same error, even specifying the exact same line and column in the file.
I know the caching is occuring on the server because the error is logged to iisnode's logs and because I leave it for a day and try again the next day and the error no longer occurs.
It's extremely frustrating when I'm trying to fix things on the server and I can't test my fix because it stubbornly won't update the cache.
How can I force iisnode, IIS, or Windows Server 2019 (whichever one is doing the caching, if not more than one) to clear the cache or to not cache?
Thank you.
Please make sure you assigned the iis_iusrs and iusr full control permission to the log.txt file.
To disable caching in iis you could follow the below steps:
1)using output caching:
Select your site in iis.
Double click on output caching feature from the middle pane.
Click edit feature setting from the action pane.
Uncheck Enable cache and Enable kernel cache.
2)clientCache:
Open Internet Information Services (IIS) Manager select your site.
In the Home pane, double-click HTTP Response Headers.
In the Set Common HTTP Response Headers dialog box, check the box to expire Web content, select the option to expire after a specific interval or at a specific time, and then click OK.

URL validation failed error while accessing Oracle Form

I am developing custom application in Oracle Apps which will call an oracle form named form.fmx
I have put form.fmx in FORM_PATH variable of default.env
I have created section called vikram in formsweb.cfg
I am accessing as http://prod.txis.com:7406/forms/frmservlet?config=vikram&form=form
And getting this error
URL validation failed. The error could have been caused through the use of the browser's navigation buttons ( the browser Back button or refresh, for example). If the error persists, Please contact system administrator.
Try one of the following methods to resolve your issue :
Goto Internet Options >> Security Tab >> Trusted sites >> Sites >>
Add this website to the zone.
Issue select fnd_profile.value('APPS_MAINTENANCE_MODE') from dual;
to see whether returns the result NORMAL, If this is not the case you're in the maintenance mode, and use :
sqlplus mySchema/myPassword#$AD_TOP/patch/115/sql/adsetmmd.sql DISABLE
Click on Lock and Edit, and then
Navigate to Domain structure >> Services >> Data sources Where you should see both oacore_cluster1 and forms_cluster1 in
the EBSDataSource targets.
Assume forms_cluster1 is missing in the EBSdatasource target list, then click on the EBSDatasource and then go to the
Targets section. In this page, check the box for forms_cluster1.
Save and Activate the changes and see the following view in you weblogic screen :
Issue was with Forms server configuration.
With correct config, it is running fine

CRM 2016 html page 500 - internal server error

In dynamics CRM 2016 I have a custom button that opens up a HTML WebResource and runs some JavaScript.
It works perfectly in our development environment.
However, in our pre-production it gives the message:
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
F12 Debugging only provides the same message, and i cannot access the specific resources (the code) because it is a managed solution in preproduction.
Google only return very general "500 error fixes", or similar questions that have not been answered, that are very old.
Any suggestions how to go about this?
(And yes I have checked that it is actually pointing at the correct files).
It turns out that in the RibbonWorkbench in the Url command the path called, begins with /Udv/WebResources/myPage.htm, which is a hardcoded part of the development path.
The answer was to change the parameter to $webresource:myPage.htm

500 error when integrating multiple apps in one code base

I'm trying to set up an MVC application that will service several facebook applications for various clients. With help from Prabir's blog post I was able to set this up with v5.2.1 and it is working well, with one exception.
At first, I had only set up two "clients", one called DemoStore and the first client, ClientA. The application determines what client content and facebook settings to use based on the url. example canvasUrl: http://my_domain.com/client_name/
This works for ClientA, but for some reason when I try any DemoStore routes I get a 500 error. The error page points to an issue with the web.config.
Config Error:
Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'facebookredirect.axd'
I am able to add additional clients with no problem, and changing DemoStore to something like "demo" while using the same facebook application settings works fine also.
Working calls:
http:// localhost:2888/ClientA/
http:// localhost:2888/ClientB/
http:// localhost:2888/Demo/
Failing call:
http:// localhost:2888/DemoStore/
I was thinking this might be an MVC issue, but the Config Error points to the facebookredirect handler. Why would the SDK try to add this value to the config during runtime, and only for this specific client?
Any insight would be greatly appreciated.
I managed to figure out what went wrong here. Silly mistake..
After I had set up the application routes to require the client_name I changed the Project Url in the project properties to point to demostore by default. When I hit ctrl+S a dialog popped up that I promptly entered through without reading.
When I changed the Project Url, IIS Express created a new virtual directory for the project. This was the source of my problem. Why? I'm not sure, but once I removed the second site from my applicationhost.config I was able to access the DemoStore routes.
Moral of the story: read the VS dialog messages!

My Working Application MVC3 Razor Unexplainably stopped working :-( IIS 7

I have the following projects within my solution.
MyWebApplication.Data --> Here i interact with my Data Repository
MyWebApplication.Services --> Here i interact with the Data Layer
MyWebApplication.Web --> The UI which relies on the Service Layer
MyWebApplication.Tests --> Unit testing project
For MONTHS i have had NO problems with IIS in my local dev environment. Ready for a long weekend of programming but all day i have been getting 500 Server Errors when simply trying to resolve the Home page. Before I went to bed all was well, the entire day thereafter i could NOT even load the home/index view.
After looking at the logs it says continually MyWebApplication.Data.System (which is a class i created called System()) does not include Web. But no where in code is this true. Then i get another error of mismatching files in the Temp Directory.
Steps I have taken:
Deleted all temp files
Created a new repository in IIS and pointed URL there, No luck
Cleaned solution
Deleted all bin folders to have regenerated... No Luck
PLEASE HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Without the details of the error messages, one strategy may be to create a new MVC project and copy/paste the files over to it.
A few other common causes:
Are you referencing any 64-bit libraries but compiling the project as 32-bit (or vice-versa)? Try changing the "bitness" of your application.
If your application is 32-bit and is running on a 64-bit server, you need to enable running 32-bit apps in IIS. See http://exhibita.com/blog/post/2010/03/30/IIS-75-on-x64-with-32bit-applications.aspx
If all else fails, please post the exact error messages. If all it says is "HTTP 500: Internal Server Error", you should enable debug output or run your app from the server itself (actually using a web browser on the server), which will tell IIS it's "safe" to display full debug information. The debugging messages have actually been pretty useful in my experience.
Figured it out. In
MyWebApplication.Web project, within the Shared/Site.Master I added a imported a reference to my Data Layer. (i.e., <%# Import Namespace="MyWebApplication.Data" %>
I resolved by removing the static reference to my ShoppingCart class in the Data layer and just created an ActionResult to return the same and in the MasterPage (which currently holds the javsscript to allow the user to peek into their cart from anywhere in the site without a redirect to a specific page) used the Html.RenderAction() and just returned Content(shoppingCartString).
Guess I have learned that within the Site.Master page it is complied differently than every other page in an MVC application. I can positively say this because in other pages I am doing exactly as I attempted to do here without any issues. Maybe its the build process?
Anyhow, problem solved and hopefully it can help someone else too.

Resources