Classic ASP error: Server.CreateObject_Failed 4000 Http 500 (ultra simple ASP with no DLLs) [duplicate] - asp-classic

This question already has an answer here:
Error ASP 0177: 8007007e CreateObject fails for COM DLL
(1 answer)
Closed 3 years ago.
I moved some old code (WS 2008) to a new server (WS2016). The new server gives HTTP 500 errors and in the C:\inetpub\logs\LogFiles\W3SVCx log shows "Server.CreateObject_Failed 4000" despite the fact that no DLL is (intentionally) being referenced. Another site on the same server (different port) works fine.
I compared website and app-pool settings on both servers and on both sites. I have verified that a simple HTM works. I am testing by using IIS (v10) to go to 'Content View' and right click to browse ASP.
http://localhost:3000/hello.asp
I tried a few registry hacks as suggested on similar SO questions.
My code (hello.asp) has two words
hello world
I expect to get back just those two words but instead get "HTTP 500 Internal Server Error".
Any suggestions are appreciated.
Updates:
I created a new site from scratch with just the hello.asp and that worked fine. I slowly started pulling over one file at a time from the the failed site to the working site. When I pulled over global.asa, it blew up (http 500). I am not that familiar with the file, but researched it and see that it gets invoked at start up. Looking at the contents of mine, I saw what looked like references to a DLL. I found and copied it from the old server to the new server (in the SysWow64 folder) and then used CMD as Admin to register it using REGSVR32. The register worked, but I still get 500 (after site restart, app-pool recycle, and iisreset)
Using #Lankymart 's suggestion, I was able to get the following error to display
Microsoft VBScript runtime error '800a01ad'
ActiveX component can't create object
/LM/W3SVC/5/ROOT/global.asa, line 13
which points to a line of code in global.asa that says
set objServiceMgr = server.CreateObject("XMLMGR.FedXReqMgr")
XMLMGR is the DLL that I registered (to no avail).
I tried all the suggestions at Error ASP 0177: 8007007e Server.CreateObject fails for COM DLL (regsvr32, regedit, syswow64) and my error persists. The problem description is very similar, the same I guess, but none of the suggestions have worked - yet

This is in fact an indirect duplicate of Error ASP 0177: 8007007e Server.CreateObject fails for COM DLL
The trick was finding the real error using the tips at
Detailed 500 error message, ASP + IIS 7.5
The process also taught me that global.asa is invoked when the site is accessed even if the ASP you are pointing to is a simple helloworld.asp with no code. Since the global.asa (in my case) is referencing a DLL, that DLL has to be dealt with (properly registered) before any other ASPs in the same folder can be invoked.
For my app, I also add to set the App Pool to Enable 32-Bit Applications
(Classic ASP and COM DLL Does not work in Server 2008 R2 (Microsoft VBScript runtime error '800a01ad' ActiveX component can't create object ). Only then could I display my simple ASP.
Thanks for everyone's help!

Related

ASPX Page Not Found (Error 404), though it exists?

I have a C#.NET project and am having a problem with a single web forms, ASPX page when debugging my application. Most of my application works fine, but when I hit a particular page, I get an Error 404, resource not found. I don't understand this because the file does exist, and it exists in the path that is being referenced. And, I hit several other ASPX pages on the way to this one, without error.
Now, I should mention that this particular page was only recently added to the project. My coworker, who added the page, says he was able to get the page to work, but we have different environments. So, I'm sure that has something to do with it, but I don't know what. Below are the known details regarding the differences between our environments.
My environment
Windows 8.1
IIS Express
Visual Studio 2013
Co-workers environment
Windows 7
IIS 7
Visual Studio 2012
We are both running with the same source code, as well as the same site and application pool settings in IIS, which are pointed to run time 4.0 and in classic mode.
Does anyone here have any idea why this would happen, or what I might try to get past this?
I ended up fixing this by switching to local iis and enabling the Static Content option in Windows Features.

ASP.NET app which worked fine on IIS 6 is not working correctly in IIS 7

I have a web app which is working fine in IIS 6 ex:loading page, loading doc and excel file perfectly. recently I moved the same web app code ti windows server 2008 R2 IIS 7. Now it is not working correctly, it is browsing but it is not loading the Excel and doc files properly.
Additonal Trouble Shooting Info
Adding to the above when i checked the event viewer i am getting below information
The description for Event ID 0 from source Quotes cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer,
the display information had to be saved with the event.
The following information was included with the event:
Class : GetFile Method : Page_Load An unexpected error has occurred
while locally saving the requested file. Error details - Object
reference not set to an instance of an object. the message resource is
present but the message is not found in the string/message table
could you please help on this. how to find the root error and how to trouble shoot further.
This is a long shot but we had an issue where we used to parse data Excel worksheets using Microsoft.JET.OLEDB.4.0
This started to throw errors on an Application hosted within IIS7 but was fine in IIS6.
Our fix was to:
Right click the Application Pool being used by the Web App
Advanced Settings
Set Enable 32-Bit Applications to True
If that fails to help, why not try to use the Classic .NET AppPool with your application, as opposed to the DefaultAppPool (which I am assuming is the case).
Good luck!

Windows 2008 - The source was not found, but some or all event logs could not be searched

I've been dredging up an old classic ASP application and installing it on a windows 2008 server, but when it should throw an error, it seems to be throwing this error instead:
System
error '8013150a'
The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security.
So it seems to be throwing a further error as I don't have permission to write to the event viewer, so I can't see what the original error is!
I've looked into a lot of answers on this, such as adding registry permissions on the EventLog and Applications folders within HKEY_LOCAL_MACHINE, but without success. I wonder if things are different for classic asp - has anyone come across this issue before that could help me sort this infuriating error out?
Thanks
EDIT - I have other .NET applications running on that server that write to the event viewer. It does seem to be confined to the classic asp applications
Your application is probably trying to write to an event source that doesn't exist. You can create an event source as follows: How to create Windows EventLog source from command line?.
Determine which event source your application is trying to write to and create it.

localization: AppLocal Resources throws InvalidOperationException on server with message "The resource class for this page was not found."

I have implemented localisation on my web application using meta:resourcekey and GetLocalResourceObject with App_LocalResources for user controls, pages etc. everything worked perfectly during testing however when copied to our live server I get:
InvalidOperationException: The resource class for this page was not found. Please check if the resource file exists and try again.
I have checked and the files are exactly where they are on my development machine, where I am testing using IIS 7. The server also uses IIS 7. The website is running on .Net 4 .
I have done some research and found some answers:
Moving to global resources
apparently may fix the problem: I
cannot do this, as I have many pages.
It is impractical
There is a hotfix available for .net 2.0, however I am
using .Net 4.0 :
http://support.microsoft.com/kb/933383
. This bug is caused by the resource
files being changed while the
application is running, but
recompilation occurs on the aspx
pages, bringing them out of sync. I
have not changed my resource files
since publishing.
The live server is clustered. This error showed up in my exception logs. I have not experienced a crash on the application, which indicates that either the system is contuining on despite the exception, or I am simply not being directed to the cluster which has this error. I have checked and it seems that only one cluster is reporting the error, although this could also mean that the load balancing server has not chosen the other cluster for users.
Has anyone experienced anything similar and how did you solve the problem?
There was a missing AppLocal resources folder in my project. What threw me off was that the error occured on the page and not the user control. Careful investigation of the stack trace was all that was needed.

Visual Studio 2003 - opening ASP.NET project - getting “The operation timed out” error message

On a Windows 2003 server I installed several versions of Visual Studio, also Visual Studio 2003. On the server I want to develop two different webapplications. One web application is working, but I go problems on the other one.
When I try to open the application (after a rebuild), I get the error: "The Web server reported the following error when attempting to create or open the Web project located at the following URL: 'http://localhost/MyApp'. 'The operation timed out'." I have already seen that the problem disappears when I delete the dll file generated by building. Because the environment will be distributed to multple users, it is not an option to remove the dll everytime to start Visual Studio.
I already tried multiple times to reregister asp.net with aspnet_regiis -u, aspnet_regiis -i and aspnet_regiis -r.
When I execute aspnet_regiis -lv I get the following:
1.1.4322.0 Valid (Root) C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll
2.0.50727.0 Valid C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll
Does anyone knows a solution to this problem?
This was still a problem for me after following the steps proposed above. Here's the solution that finally worked for us.
Turn on IIS logging on your local machine. Be sure to log the query string and the HTTP response code.
Attempt to open your solution and let it time out.
Perform an iisreset to flush the IIS logs.
Open the IIS logs. You will notice that when you opened your solution you generated quite a bit of activity.
VS2003, for whatever reason, attempts to navigate to some of your pages... in particular, it may navigate to your login page if you have forms authentication turned on.
Check the processing time and HTTP response code in the log entry for your login page. In our case it was returning a 302 HTTP redirect.
In our code, the login page starts up by checking for a cookie and redirecting to an external page if it isn't found. This redirect is to a location that is not accessible in the dev env. So VS would open the page, follow the redirect, and time out trying to get the page.
We fixed it by modifying the login page with the following code:
//If Request is coming from Visual Studio, just return an error
if (Request.UserAgent.StartsWith("Microsoft-Visual-Studio.NET"))
{
Response.StatusCode = 500;
Response.End();
}
Visual Studio can handle the 500. It can't handle a 302 to an unknown host.
Hope this helps.
Did you apply service pack 1 to visual studio 2003?
http://www.microsoft.com/downloads/details.aspx?familyid=69d2219f-ce82-46a5-8aec-072bd4bb955e&displaylang=en
This worked for me...
http://forums.asp.net/p/1192304/2066860.aspx
On my XP development machine I went to "C:\Documents and Settings\USERNAME\VSWebCache\USERNAME\" and deleted the folder matching my VS2003 solution name. (Actually I moved the folder to C:\Temp just in case). This worked, although one designer file would not load without a re-build and the start-up page needed to be re-marked. I don't understand why my solution depends on this VSWebCache (it re-appeared when I re-built my solution.) Can anyone explain this dependence? It's un-settling.

Resources