after installing .NET 4.5 on a Windows Web Server 2008 R2, some performance counters shows the wrong values. I'm using the built in Performance Monitor and looking at the group
ASP.NET Apps v4.0.30319 for counters Anonymous Requests/Sec and Requests Executing.
Before those values reflected the current load with fluctuating values, but now they instead increases for each request, so they behave more like Total Requests and Total Requests Executing.
We have seen the same behavior in a production environment and also on internal servers.
Have any of you seen the same behavior, I can find anything when googling for it.
Regards
Patrik
Fix for this issue is available now. http://support.microsoft.com/kb/2805227 for windows8 and http://support.microsoft.com/kb/2805226 for windows 7 platform.
So below workaround is no longer required.
The workaround for this issue is to execute below commands from 4.5 installed directory, (e.g. “%systemroot%\Microsoft.Net\Framework64\v4.0.30319”)
aspnet_regiis -u
aspnet_regiis -I or aspnet_regiis -iru
One thing that comes to mind is permissions on this registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\version of ASP.NET\Names
I'd start off by checking those and ensuring they're correct. If you have multiple versions you can even cross-check/compare the settings (ie if 2.0 still works fine)..
Related
I have been trying for a day now to enable various IIS services on a laptop.
Using Control Panel, Programs and Features, Turn Windows Features On and Off.
The key feature I am trying to enable is ASP.NET.
I get a stupid error message that gives no clue (An error has occurred. Not all of the features were successfully changed.), but the event log shows a whole string of errors, starting as below.
Unable to install counter strings because the
SYSTEM\CurrentControlSet\Services\ASP.NET_64_2.0.50727\Performance key
could not be opened or accessed. The first DWORD in the Data section
contains the Win32 error code. 020000000E0E0000
Installing the performance counter strings for service
ASP.NET_64_2.0.50727 (ASP.NET_64_2.0.50727) failed. The first DWORD in
the Data section contains the error code. 02000000C9120000
I have searched the net, and tried various remedies, all with no success.
These threads discuss the same topic, without solving it:
http://social.technet.microsoft.com/Forums/windows/en-US/d711ecd1-620c-473c-af39-e607bbe2ec18/turn-windows-features-on-or-off-application-development-features?forum=w7itproinstall
http://blogs.msdn.com/b/tom/archive/2008/04/11/asp-net-performance-counters-missing.aspx
I tried uninstalling all versions of ASP.NET using aspnet_regiis.exe -Ua on each and every version on Framework and Framework64, then adding them back. None of this has made any difference whatsoever.
Any ideas?
I had this problem too. I had 2 errors logged in the Windows Application Event Log:
Unable to install counter strings because the SYSTEM\CurrentControlSet\Services\ASP.NET_64\Performance key could not be opened or accessed
Installing the performance counter strings for service ASP.NET_64 (ASP.NET_64) failed. The first DWORD in the Data section contains the error code.
Note that these msgs are similar, but not the same as the original poster, probably due to different versions and time moving on. I'm on Windows 7 64-bit, with various .NET Frameworks installed, at least 3.5 and 4.x, plus some remnants at least of 2.x. I have Visual Studio 2010 Pro installed, and just installed VS 2013 Community this morning. I already had IIS installed, and I think it was installed before any VS versions. This is the first time I explicitly tried to enable ASP.NET under IIS on this machine.
If you look in the registry, it's true, this key does not exist: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ASP.NET_64
I narrowed down the problem to the .NET Extensibility feature, on which the ASP.NET feature depends and automatically checks/enables (not that this helped me).
I followed the other answer in this thread: "Control Panel > Programs > Turn Windows features on or off, and switched off Internet Information Services (which will turn off all the subfeatures), then clicked OK. [Reboot as prompted.] Then I went back to the Control Panel and turned on all the IIS services I needed and the error did not resurface."
HOWEVER, be sure to enable the ASP.NET feature (which auto-checks/enables related dependent features such as the problematic .NET Extensibility feature) at the time you are re-enabling IIS. If you do it at the same time, the registry key is successfully re-added, if not then not. Doing it piecemeal didn't work for me and just resulted in the same error message. A reboot was not required for the enabling (just the disabling), but I have found that changes over time.
Note that there are other problems out there that generate errors when this feature is added to IIS. Apparently if IIS is installed before ASP.NET then the solution is the register ASP.NET with IIS. There are MS pages around that tell you how. (e.g. http://blogs.msdn.com/b/tom/archive/2008/04/11/asp-net-performance-counters-missing.aspx) Use the link to the ASP.NET IIS Registration Tool to fix that problem (although this disable and re-enable of IIS may also work).
I went through these other fixes and they didn't help me. At least one generated an error, but again probably because I had that ASP.NET_64 registry key missing. The standard Windows Fix tool didn't do anything for me either. Updating my .NET Framework to the latest (there happened to be an update to 4.5.2 or something similar) didn't help either.
My guess, in hindsight, is that maybe VS 2010 is too old, and is 32-bit on my 64-bit OS, and it resulted in problems with my registry keys. Maybe. I'm just guessing.
(I would have simply commented on the other answer/solution, but apparently I don't have sufficient points - this would seem to be a flaw in that design.)
I was having the same issue with Windows 7 Enterprise but this worked for me:
Control Panel > Programs > Turn Windows features on or off, and switched off Internet Information Services (which will turn off all the subfeatures), then clicked OK. Then I went back to the Control Panel and turned on all the IIS services I needed and the error did not resurface.
Windows Web Server 2008 R2 (x64) &
.Net Framework 4.5
It is a classic ASP.Net Web Site (Not a web project, code is in App_Code directory and compiled when the site is being launched)
And it depends on many reference DLLs in /Bin directory.
For those DLLs I have source code, I compile them targeted as "x64" platform.
And I have some other DLLs without source code (mysql.data.dll / etc), which are compiled as "Any CPU".
I modified them in EditBin.exe to ensure the IMAGE_FILE_LARGE_ADDRESS_AWARE flag is indicated in their PE header.
According to this table:
http://msdn.microsoft.com/en-us/library/aa366778%28VS.85%29.aspx#memory_limits
x64 process can't use more than 2GB memory unless IMAGE_FILE_LARGE_ADDRESS_AWARE is set.
How can I verify whether it works?
Is there any place I can see the memory limitation of running x64 process?
I don't know if you can actually "see the memory limitation" explicitly stated (assuming you don't trust MS's own documentation that you cited) other than getting your hands on and digging into the IIS and/or ASP.NET source code.
That being said, you could try stress testing the site, and monitor memory consumption (via Task Manager or Process Monitor), to see if it exceeds 2GB. I would recommend tinyget, part of the IIS 6 Resource Kit, which can still be used with IIS 7.
tinyget -svr:localhost -uri:/<your site> -loop:200 -threads:20
You'll have to play with the loop and thread count to try to push it over 2GB. I would expect to see an System.OutOfMemoryException as you approach about 1.4GB of combined physical and virtual private bytes. You may want to create a stress test function in the site itself, for testing purposes only of course, which will help you reach this limit, by using the exact opposite of good practices. You can read more about what would lead to an System.OutOfMemoryException` here, and then do things they recommend against. For example, add a test method that just concatenates strings in a very large loop.
try procexp, from sysinternals here. This application can monitor .NET specific metrics.
Nevertheless, according to your link, you should be able to address at least 8GB.
Please keep in mind that enforcing the IMAGE_FILE_LARGE_ADDRESS_AWARE is irrelevant in your case. You could have all your components compiled to target "Any CPU", the only flag that is checked is the flag of the executable file.
I have a live standalone server running Windows Server 2008 SP2 (64bit) and IIS7. It is running an ASP.NET website built against .NET 3.5 in its own application pool. Randomly at different times of the day, I get the above error. This may occur once per day, or more. Often when it occurs, it will occur two or three times in relatively quick succession.
Looking at processes and logs leading up to the crash there appears to be no real pattern or specific scenario causing it.
From searches, most recommendations appear to be to get a crash dump and analyse it, however I am struggling to get one.
I have Debug Diagnostics 1.2 installed, and have tried various crash rule setups, but they do not create a userdump. Currently I have a 'Crash rule for all IIS/COM+ related processes' with default advanced configuration.
Can anyone suggest why this isn't creating a crash dump when the issue occurs? Is there another way to get a crash dump?
EDIT: I have installed Debugging Tools according to this useful link and am running ADPlus using this command:
ADPlus -crash -pn w3wp.exe -o c:\ADplusCrashDump
Hopefully I will get a crash dump when it reoccurs . . .
EDIT 2: Found a recursive method call, which caused a stack overflow in rare circumstances. Hopefully that is problem solved. I found another useful link however, see this Blog Post.
I'm supporting a ASP.NET v2.0 app installed on a Windows 2003 SP3 Enterprise on a quad core 8G machine running on .NET 2.0 SP1.
before enabling the config, ran "tasklist /m mscorwks.dll"
Image Name PID Modules
w3wp.exe 7888 mscorwks.dll
add under section in web.config
ran IISRESET, rebooted server too
ran "tasklist /m mscorsvr.dll"
INFO: No tasks are running which match the specified criteria.
ran "tasklist /m mscorwks.dll"
Image Name PID Modules
w3wp.exe 6251 mscorwks.dll
It seems like gcServer is not taking effect. Are there any additional settings/ configurations necessary to get it working?
Update: Sorry, just saw that the link below, and thus maybe the whole information, applies to IIS 6.0. I don't know whether that is applicable to your environment.
I don't believe you can configure any GC setting on a per AppDomain basis, which is essentially what would happen when you only set it in a web.config file, thus on a per application basis.
You need to set this in the aspnet.config file. The Aspnet.config file is in the same directory as the Aspnet_isapi.dll file (check this for more information).
Edit: To figure out the GC in use, you can use WinDBG/SOS and the eeversion command:
0:010> !eeversion
2.0.50727.3082 retail
Workstation mode
SOS Version: 2.0.50727.3053 retail build
See this MSDN link, where Chapter 5 had the answer. Quote from Chapter 5:
Note: At the time of this writing, the .NET Framework 2.0 (code-named "Whidbey") includes both GCs inside Mscorwks.dll, and Mscorsvr.dll no longer exists.
I guess there is no way to check whether the server GC is working. EDIT: but see Christian's answer.
From code you can use GCSettings.IsServerGC.
Are there any particular settings one should optimally enable/disable/tweak when doing ASP.Net MVC development on local test machine Windows 7 using IIS 7.5 and moving in and out the debugger & recompiling refrequnetly (integration/troubleshooting stage now before TDD fantactics throw stones - although admittedly I could have more under test), I work with 64 bit edition but figure this probably applicable at both x86/x64?
I'll start with one:
Ping Period (seconds) - increase from 90 to 3000 (or something somewhat higher) so you can if unfortunately need to a good bit of time whilst debugging or disable ping on local test machine.
Credit: http://blogs.msdn.com/johan/archive/2007/09/12/my-web-application-times-out-when-debugging-in-iis7.aspx
However I see over stuff such as:
Disable Overlapped Recycle & Recycling settings etc.. that I wonder if could increase performance or make debugging less friction
Question prompted by the annoyance that I've ran across a few recent debugging issues (not apparent in production) including a random, and tempormental error "An assembly with the same simple name blah-blah-lah-assembly-definiton has already been imported . Try removing one of the references or sign them to enable side-by-side." (iisreset resovles) and generally slow debugging attaching. The points and answers to this question need not help with the above (I believe it may be related to spark view engine as that where the stacktrace ends) but figure it worth mentioning incase someone has a direct suggestion *
quick tip: if you're experiencing slow response times (~1-1.5 sec) from browsers other than internet explorer (eg: firefox, chrome, safari) while running your mvc/ other web app on your local machine using win7/vista, it is due to dns resolution with ipv6.
firefox solution: disable ipv6 in about:config (boolean cfg 'network.dns.disableIPv6')
machine wide soft solution: uncomment the good old localhost address in the hosts file (%WINDIR%\System32\drivers\etc\hosts):
# localhost name resolution is handled within DNS itself.
127.0.0.1 localhost
# ::1 localhost
machine wide hard solution: disable ipv6 completely
credit goes to this blogpost: http://weblogs.asp.net/dwahlin/archive/2007/06/17/fixing-firefox-slowness-with-localhost-on-vista.aspx
Embarcadero guys just published a fresh article on similar topic for Delphi Prism (aka Delphi for .NET), so why not take a look on their suggestions?
http://edn.embarcadero.com/article/40108
From the experience i have working with asp.net mvc, i can tell that there are no special settings for IIS 7 or IIS 7.5 for working on asp.net mvc projects. It works fine in the default form, you just need to create a new website and point it to the folder that has the files for you application.
For debugger if you ask, you can simply put a breakpoint in the code and hit that breakpoint when you run the application from visual studio. But by default the application will use the development web server that fires up when you run a web application from visual studio. If you want to the application to run using the IIS installed on your system you will have to change the project settings. See here for a screen shot of how to do so
http://blogs.bootcampedu.com/blog/post/Debugging-aspnet-mvc-application-using-IIS.aspx
Additionally you can also use System.Diagnostics.Debugger.Break(); for putting a break point in the code.
If you only want to debug your application, I recommend to use the built-in development server of Visual Studio.
If you debugged the most of it or want to do that on IIS, I recommend you the Ctrl+Alt+P shortcut, which enables you to attach a debugger. Select w3wp.exe and you can debug with IIS.