Is there a default for maxWorkerThreads in IIS 8.0 ASP.NET 4?
With IIS 6 I recall there was a maximum number of threads that could execute within a single worker process. Having a tough time finding Microsoft documentation stating what the default is for IIS-8.
The default is 20 according to the .NET Framework documentation for MaxWorkerThreads.
Related
We want to use the Azure Redis service as a session cache for our MVC 5 web application.
For that we use Nuget Microsoft.Web.RedisSeessionStateProvider, which was updated to v3.0.2 recently.
However, putting that specific version in the web.config throws an error saying that the session state provider must inherit from SessionStateStoreProviderBase (namespace System.Web.SessionState).
The RedisSessionStateProvider v3.0.2 from the Nuget inherits from SessionStateStoreProviderAsyncBase (namespace Microsoft.AspNet.SessionState), and hence doesn't work.
The web application is running .NET Framework 4.72! So it must be compatible with v3.x according to the release notes.
The only solution so far is to fall back to version 2.x of the Nuget and use that instead.
What am I missing?
I have a strange problem. I have an MVC 4 application (cloud service) on MS Azure. Application after deployment works fine but after 24-30 hours is returning an error 500. Then I have to reboot the instance. Currently it is running on the machine size S, I have 900 megabytes of free memory and the CPU is at about 3%. I have 1 instance. OS family = 3 (because of .NET framework 4.5)... Any ideas what is going on?
I have found it. Thanks for idea about app pool. Application pool is automatically recycling after 29 hours (default settings). So I recycled it manually and get error:
Could not load file or assembly 'file:///D:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.1\System.Data.Entity.dll'
From log I found that the reason is Entity Framework Profiler. I forgot remove it before deploying the app.
I've created a WCF 4 Router Service and am hosting it in IIS7. It works fine on my development machine, but when I deploy to the QA server is returns the following message:
The configuration section 'routing' cannot be read because it is missing a section declaration
The section it's complaining about is the standard WCF4 routing section:
<routing>
<filters>
<filter name="MatchAllFilter1" filterType="MatchAll" />
</filters>
<filterTables>
<filterTable name="ServiceRouterTable">
<add filterName="MatchAllFilter1" endpointName="WCF_XXXService" />
</filterTable>
</filterTables>
</routing>
This should be stock standard, but I'm receiving the above error from IIS. Does anyone have any suggestions on how I can fix this issue?
Ok, finally found the solution here:
The root configuration files (the
machine.config file and the root
Web.config file) for the .NET
Framework 4 (and therefore ASP.NET 4)
have been updated to include most of
the boilerplate configuration
information that in ASP.NET 3.5 was
found in the application Web.config
files. Because of the complexity of
the managed IIS 7 and IIS 7.5
configuration systems, running ASP.NET
3.5 applications under ASP.NET 4 and under IIS 7 and IIS 7.5 can result in
either ASP.NET or IIS configuration
errors.
We recommend that you upgrade ASP.NET
3.5 applications to ASP.NET 4 by using the project upgrade tools in Visual
Studio 2010, if practical. Visual
Studio 2010 automatically modifies the
ASP.NET 3.5 application's Web.config
file to contain the appropriate
settings for ASP.NET 4.
READ MORE HERE:
aspnet4 breaking-changes
A quick Google turned up this:
If you upgrade a site to .NET 4, and don’t upgrade the application pool to use .NET 4, you will get this. The machine.config file for .NET 4 declares this section, and earlier version did not have it (unless you manually added it).
In IIS 7, with the site select, choose Basic Settings in the right pane. This will bring up a dialog that contains the name of your application pool. Then select the application pools tree node and the application pool from the list that shows up. Choose Basic Settings from the right pane here, and you can change the framework version.
From here
Can you try re-running aspnet_regiis from the FrameworkXXX\microsoft.net\v4.0.30319 folder and reset IIS?
Check the .Net framework associated with the site's app pool.
If you need to change it, run iisreset -force after to ensure changes take effect.
I installed .net framework 4 on my windows 2003 enterprise x64, wrote simple asp.net 4.0 application (default.aspx page only). The application works great if request is to default.aspx, not to the root site:
contoso.com/ - doesn't work (Get 404 error)
contoso.com/default.aspx - works.
Default.aspx is in list of default documents in IIS.
Please help.
Found a fix in a seemingly unrelated location - try setting the "EnableExtensionlessUrls" registry key to 0:
ASP.NET 4 Breaking Changes -> ASP.NET 2.0 Applications Might Generate HttpException Errors that Reference eurl.axd:
In the Windows registry, open the following node:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET\4.0.30319.0
Create a new DWORD value named EnableExtensionlessUrls.
Set EnableExtensionlessUrls to 0. This enables extensionless URL behavior.
Save the registry value and close the registry editor.
Run the iisreset command-line tool, which causes IIS to read the new registry value.
You will find the answer here
http://johan.driessen.se/archive/2010/04/13/getting-an-asp.net-4-application-to-work-on-iis6.aspx
.Net 4.0 doesn't enable itself to run with IIS so you have to run the command (while in the folder c:\windows\system32):
cscript iisext.vbs /EnFile C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll
or in your case since you are running x64
cscript iisext.vbs /EnFile C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll
Change the ASp.Net Version from 4.0 to 2.0 and apply it. and revert back The Asp.Net version to 4.0. This Will address the issue.
I don't have enough points to comment apparently, but I wanted to say that the solution from Will WM worked for me. Adding EnableExtensionlessUrls to the registry corrected the problem.
As a side note, if your run aspnet_regiis at anytime, it will remove this value and you will need to add it again.
I use the following regex as first rule with Ionics Isapi Rewriter for web sites running on ASP.NET 4 on IIS 6 to remedy the problems caused by the breaking change introduced with ASP.NET 4 :
RewriteRule ^(.*)/eurl.axd/[a-f0-9]{32}(.*)$ $1$2
This let me again use extensionless urls.
Note that the second group captures the querystring if present and restitutes it to the rewritten url.
And yes, it's a feature, not a bug.
Are you sure it's default.aspx not default.asp in the list of default documents?
You will also get this error on ASP.NET 2.0 virtual directories in IIS6 if you have another virtual directory on the same site that is set to 4.0 and the DefaultWebSite is set to use ASP.NET 4.0.
The solution is to change the DefaultWebSite back to the ASP.NET 2.0. Your 4.0 virtual directory will still do fine underneath that web site.
I am building a .NET 3.5 Winforms app that uses WCF services (wsHttp binding) to communicate to my server which gets data from SQL Server and passes it back to the Winforms app (Smart Client). I noticed since running Windows 7 RTM there is about a 30 second delay the first time the WCF communicates, from that point forward it's normal as before.
I noticed another application (Desaware licensing system) that uses ASMX services also experiences this same problem, a startup delay then all is fine.
This first time startup is not a .NET complilation/JIT issue, I can close the app right away and do it again. The server is running Windows 2003/IIS 6. All was fine prior to Windows 7.
I tried removing my anti-virus software, same issue. I cannot figure out why there is this initial delay, a significant one at that. I notice too in the Debug window as the application is starting up a delay as the System.IdentityModel line, it looks as if there is a security/authentication change on Windows 7 I presume that is causing this delay.
Anyone have any suggestions on how to resolve this issue? VS 2008 / .NET 3.5.
Thank you.
I added the following entry into the binding configuration and it appears to have solved the issue.
useDefaultWebProxy="false"
I was experiencing the same problem. I create my proxy using a ChannelFactory object, and found that in addition to specifying useDefaultWebProxy for the binding server-side, it was also necessary to specify the option client-side:
HttpTransportBindingElement httpTransport = new HttpTransportBindingElement
{
MaxBufferPoolSize = int.MaxValue,
MaxBufferSize = int.MaxValue,
MaxReceivedMessageSize = int.MaxValue,
AuthenticationScheme = System.Net.AuthenticationSchemes.Ntlm,
UseDefaultWebProxy = false
}
I found that the issue only occured when using the current Windows credentials. If you pass specific credentials then the performance was as expected. However, setting the UseDefaultWebProxy client side fixed the problem.
Hope this helps someone, somewhere!
A 30 second delay, sounds like it is waiting for something and then timing out after 30 seconds.
It is probably something to do with the authentication between your windows 7 machine and the server. Checking the event log would be a good place to start.
This worked for my Windows 7 and connecting to a WebServer
useDefaultWebProxy="false"
Thank You
Douglas