Compartilhar via


Troubleshoot Issues with ASPTABTEST Tool - ASP.Net tab missing

Sometimes it really pain to troubleshoot ASP.Net tab missing issue on the IIS servers. We have developed a tool, ASPTABTEST, to troubleshoot this issue. You can download the tool from following link, https://blogs.msdn.com/webtopics/archive/2008/04/17/asp-net-tab-missing.aspx
 
One of the most common errors, while we use the ASPTABTEST tool is the following
 
Output:
 
C:\asptabtest>cscript asptabtest.vbs
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
 
PASS: The value of Enable32BitAppOnWin64 in metabase is set to: False
PASS: The current value of Restrict_Run is: 0
PASS: Successfully registered mmcaspext.dll
PASS: Successfully registered AspNetMMC
PASS: Successfully registered Assembly
 
Running aspmantst.exe to test the ASP.NET Tab snap-in
 
Attempting to create the object as CLSCTX_LOCAL_SERVER.
Create failed. hr: 80070002. QIhr: 80070002. GLE: 0
 
Attempting to create the object as CLSCTX_REMOTE_SERVER to USHOULBWEBFM01D.
Create failed. hr: 80070002. QIhr: 80070002. GLE: 1008
 
Attempting to create the object as CLSCTX_INPROC_SERVER. Object created.
Attempting to call method. Method succeeded.
Result: 1.0.3705.556,C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\aspnet_isapi.dll,1.1.4322.0,C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll,2.0.50727.0,
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll
 
If there were any failures in the running of aspmantst.exe The HRESULT error code will be printed in the output above. After correcting the cause of the failures, be sure to either kill all dllhost.exe processes, or reboot the computer, since
certain remedies, particularly DCOM security related ones, will not take effect unless ALL surrogate processes and the ComSysApp have been restarted. Once they have been terminated, or the computer has been restarted, re-run the script until the aspmantst.exe runs without error.
 
Resolution:
The issue was being caused by a dllhost.exe.config file in the C:\Winnt\System32 directory. It contained the following:
<configuration>
<startup>
<requiredRuntime version="v1.1.4322" />
</startup>
</configuration>
- This was forcing the dllhost.exe that launches to host the ASP.NETTab to run the wrong version of the .NET Framework.
- Solution is to rename/remove this file, if it is not being used.
 
More Information:
 
MSCOREE reads the config file when it was loaded. The component is a 2.0 component, but the config file told MSCOREE that DllHost could only use 1.1 Framework.
COM components that are built into DLLs, that are instantiated via CoCreateInstance, can be configured to run either inprocess (loaded and used in the same exe from which the CoCreateInstance call is made), or to run in a surrogate process, the default of which is dllhost.exe, or to run on another machine, which would also employ a surrogate on that other machine.
The ASP.NETtab COM component is actually a .NET component that is exposed as a COM component via Interop. It is configured to run using a surrogate process. This is done so that it will load in its own process, where no other .NET component is loaded, and so avoid framework version issues. For example, there may be snap-ins loaded in the MMC that have already loaded the 1.0 or 1.1 framework, and if the ASP.NET component tried to load it would fail.
So, There is a native snap-in (mmcaspext.dll) that loads in the MMC, and that is what display the actual tab control, but it uses CoCreateInstance to get an instance of the AspMmcExt COM object, that ends up doing all the actual config reading/writing.
‎‎
The problem here, of course, is that someone created a config file for dllhost.exe, that actually told MSCOREE to always load 1.1 Framework for DllHost, so when the snap-in tried to create an instance of the object, we get the 80070002 (Not Found) error, because the assembly and Framework version didn't match.
‎‎
NOTE: This dllhost.exe.config file is NOT present by default at all in that location.
 
We know that 80070002 in the output for LOCAL and REMOTE, but where INPROC works, can mean that the DllHost is loading the wrong version of the framework.
‎‎
For more details about
CLSCTX Enumeration
https://msdn.microsoft.com/en-us/library/ms693716(VS.85).aspx

 Until then...bye...