I have recently inherited a website written in Classic ASP, and am currently trying to get a sense of the state of things. The website is working in production, however the development environment (hosting on a Windows Server 2003 box) produces an HTTP 500 error when you try to navigate to it.
I realize that HTTP 500 errors just mean that an unexpected server error occurred, and that this also is more than likely the ASP code crashing for one reason or another. I have tried numerous browsers (IE, Firefox, and Chrome) but they all have the same amount of information.
Being primiarly an ASP.NET developer I am use to the yellow screen of death which can be configured to show a stack trace.
So my question is, how do I convince IIS and/or Classic ASP to give me a better hint about what is causing the error?
Update:
I should have gone into more detail originally, but here are some of the things I've looked at.
I've looked at the event logs
(Application, Security, System, etc)
and there is nothing relevent there.
I have looked at the IIS access logs
and I see the access attempts, and
just 500 errors. It is even
producing 500 errors on favicon.ico
If you can't find the offending line by turning off "Show friendly HTTP error messages" as Wayne suggested, then try adding "On Error Resume Next" to the code along with response.write statements. I've found with problems like these, you just have to start going line by line through the code until you find the offensive code.
Just out of curiosity, is Active Server Pages set to allowed in the Web Server extensions in IIS on the dev servers?
Have you checked the Application portion of the web server's Event Viewer for error entries?
What alex said, also make sure that you turn off "Show friendly HTTP error messages" in Internet Explorer and then browse to the site; that tends to give you a more specific error message (although still generic compared to ASP.NET's stack trace) along with the line number.
If you have a global.asa file in your web directory, you could rename the file and try loading the favicon.ico file again. If it loads, the problem lies within the global.asa
Clearly an old question, but for what it's worth, if you have access to the development server (direct or remote desktop), you can access the site from there. Localhost requests reveal more debugging information about classic ASP including line numbers.
Related
Every time I try to connect to any SharePoint site running on my customer server I get the following error.
An error occurred accessing your Microsoft SharePoint Foundation site
files. Authors - if authoring against a Web server, please contact the
Webmaster for this server's Web site. WebMasters - please see the
server's application event log for more details.
I already checked the sharepoint options in CA and in every site in the mentioned server. Everything seens correct but the error persists.
It looks like there is no direct relation to SharePoint and something else in the server but I was not able to determine what could cause such behaviour.
Hope someone here has something to say.
Well... After a very long and painful headache we were able to find out what was causing this malfunction.
It was a .net agent from New Relic. This agent is used to analyse traffic, page load time and some other cool things. It basicly add some javascript to the head session of every response our IIS make and this code send some data to New Relic servers that will be processed to build some reports about the applications running in the IIS.
In the end, I just disabled it and SPD turned back to life.
Thanks.
PS: Boland was in the right path. I were able to find out the solution using Fiddler to analyse the responses from IIS. Thanks.
You have to check the event log. Do you see any error there? If not, it must be a network issue. Firewall is rare, because SPD works on TCP/80.
As a security measure, I want to hide the technology stack I am using on my server. What are effective ways to do this? I thought about
1) Use mod_rewrite or Rewrite Module to hide any page extensions like .php or .aspx
2) Turn off all error reporting
1b) use mod_rewrite to serve a misleading extension on purpose, like disguising a php page as aspx
2b) Throw misleading errors to go with 1b), making my php pages display asp-like errors.
This is an impossible task. You will have to modify the entire stack, in which case you will have just created new buggy versions that you now have to keep in sync with vendor's versions.
There's literally no way to do this without making your site less secure.
You can do lame stuff like remove X-Powered-By, or change the session generation scheme if it's using something like ASP or PHP which has a known one. The fact is it's not going to stop anyone who actually wants to know what you are running.
For basic examples (it goes much deeper than this), some web servers will accept any header, so I can say GET LOLOLOL HTTP/1.1 and it will still work. Some stacks will keep the session alive, some wont. You can also see what features are on the stack, since there are just so many on the web and there's no way on earth any stack supports the exact same set.
Don't show accurate page extensions
Don't use standard error pages
Make sure the web server and application layer (ASP.NET, PHP et al) hide their presence in browser headers)
If your error pages do anything dynamic, assume that this can fail somehow and have a set of static html pages you can serve that aren't the web servers default ones
Make sure all of our technolog stacks are configured to not show stack traces on any error pages served to machines other than the local server. If for some reason all your custom errors fail then the user may see the technology stack, but they won't have a window into the underlying code
You can add fake Server: and/or X-Powered-By headers to the response, pretending that it was generated by a different server. (Or, Server: My Unhackable Server)
Trying to copy a website to a new server as the old one is dying. :(
I tried copying over the files and setting it up manually, but some specific user accounts needed to be used and the guy who set all this up left the company nearly 5 years ago. And is even worse at documentation than I am.
Anyway, at that point the ASP pages were serving, but getting errors. Ok, fine... I went back and exported the configuration from the old server (lucky that worked at all) and created a new website from that config on the new server. On the new website, from the config file, the ASP pages are giving 404 errors.
The Active Server Pages extension is enabled, and I can actually get the asp pages to serve from another website on the server... so I'm thinking it's something at the website level. No idea what though.
Any ideas?
Back when I was doing classic ASP development we used Parent Paths. This is at the top of your ASP file you'll see something like;
<!--#include file="../../resource/includes/MSSQLconnection.asp"-->
This isn't enabled by default in IIS. It may not be answer but worth looking at. But was a long time ago now.
Hope this helps,
Mike
404 is a file not found error.
Start by checking you can access a 'hello world' HTML file in the folder using http: //localhost/path/toyour/HelloWorldFile.htm
Hello World
is all you need in the file = you don't need to bother with any HTML markup to test what we're interested in.
This will check that your virtual directories, application settings etc are correct before you move on to the Active Server Page settings.
Once you've got your paths sorted out and you know you are looking for your application in the correct place move on to a 'hello world' ASP file
<%="Hello World"%>
is all you need in that file!
You ask about settings in IIS which will stop ASP from working. These come to mind as the most obvious.
Depending on the OS (or more specifically the IIS version) you may also need to activate ASP pages.
These instructions from msdn cover Windows 2003 (IIS6) and Windows 2008(IIS 7.x)
If you can get your hello world script working you can move on to debugging your application.
It will be a great help when debugging the application if you can see what's going wrong so I recommend that you turn off friendly error messages if you are using Internet Explorer. Also set IIS to pass error messages on to the browser
see:
http: //learn.iis.net/page.aspx/564/classic-asp-script-error-messages-no-longer-shown-in-web-browser-by-default/ --excuse the link formatting but SO's newbies can't post more than 2 hyperlinks in a message was getting in the way of me trying to be helpful and earning enough rep to post more!
(that may only be relevant to IIS 7.x I don't have an IIS6 installation lying around to refresh my memory.
Make sure you are browsing your application on the server using http: //localhost - this should ensure you see any errors
Good luck
Sometimes the style sheet disappears when naviguating on our WSS 3.0 sites (white background on the site, no colors, no formatting, etc.). This has mainly happened with IE6 (corporate browser for the majority of our computers). The fixes were :
clean up temporary internet files
if it still doesn't work, upgrade to IE 7
However, this time, the upgrade to IE 7 hasn't worked, the style sheet isn't applied. When we clean up temporary internet files, things go back to normal, but after a while the css disappears again.
Here are a few ideas on what you could try:
Fiddler should be able to tell you if there is a network problem.
Check the HTML for anything unusual. Is it malformed in any way? Can you save a copy and run it through an online validator (although this is limited in use as SharePoint's default markup isn't compliant).
If some users are having the issues but others aren't, check their permissions on the server.
You could also try using the SharePoint "Log in as another user" feature to see if the problem can be reproduced on your machine when logged in as them. You may also want to try running Internet Explorer as that user.
Check the Event Viewer on both client and server for anything unusual.
Check the IIS logs on the server for any errors.
Check the SharePoint ULS logs on the server in the "12 Hive" for errors that might be related to this problem.
Try running Process Monitor on the client and reproduce the problem. Search for keywords such as FAIL or ERROR to see if anything appears. Make a note of the time the problem occurs and see if the Process Monitor logs give any additional information.
Is there some javascript that's involved as well? Could it be a virus scanner that is set way to strict? As you pointed out in one of the comments, the CSS isn't even being requested (at IIS log level, which is as basic as you get, not even in SHarePoint yet), so it HAS to be something on the client PC.
Good Morning,
I was having serious problems regarding this website.
What happens is everyytime I try to open a .shtml page in the site it always has an error "The Page Cannot Be Found" but this is highly unlikely since I already all have the resources in my local pc and already did a virtual directory for the entire site. Can you please tell me what's the problem? i've checked all the codes and they're constructed just fine.
If you're attempting to view the page in Internet Explorer then I recommend turning off friendly HTTP error messages in the advanced settings. Disabling the setting may result in more verbose error messages, especially if it's an HTTP/500.
This is not actually an ASP problem. .shtml files are handled by the server-side include ISAPI application extension.
In Web service Extensions folder under the server icon in IIS manager, ensure that Server Sice Includes is set to "Allowed".