I have somewhat of a problem. My old webserver (windows 2003) have been replaced, with a 2008 R2. I have been given an admin account on it, and can do whatever I want, but I am no expert on this area. I configured the roles to have application developement and Web server (iis7).
BUT, my website runs .NET4, and the role only installed 3.5. So I have attempted to install .NET4 manually, on the server. My problem is, my website will not work on it, due to the System.ServiceModel section in my web.config. I have made sure it runs in .NET4 application pool.
I assume this is a WCF problem, but I can't grasp how to solve it. I have tried everything I found on google. aspnet_regis, ServiceModelReg.exe and so on. I have even tried re-installing the webserver role, but I still get this error, everytime I try to enter the sites setup.
I'm hoping there are some experts here, who know how to fix this.
I had the same error message, and it was because I was missing the .NET 3.5.1 framework on that server. Enabling that fixed my problem: http://blogs.msdn.com/b/sqlblog/archive/2010/01/08/how-to-install-net-framework-3-5-sp1-on-windows-server-2008-r2-environments.aspx
Go to the application pools in IIS and select the "Set Applicaiton Pool Default" [available in the right top corner], and check the version of .net framework.
Note: It'ld be selected as .net 4.0 version by default
Apparently IIS7 needs a System.WebServer section, even if it is empty. Adding the following to my web.config file fixed my problem.
<system.webServer>
</system.webServer>
I had a different reason for getting this error.
This happened during migration of an MVC project from .Net 4.0 to 4.5, where the Microsoft.IdentityModel library is replaced with System.identityModel. In my case I had done all the necessary Web.Config migration steps listed here, but had forgotten to change the section name in configSections section:
<configSections>
<section name="microsoft.identityModel" type="Microsoft.IdentityModel.Configuration.MicrosoftIdentityModelSection, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</configSections>
As written here, the section definition should be:
<section name="system.identityModel" type="System.IdentityModel.Configuration.SystemIdentityModelSection, System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
The issue for me was that WCF Services wasn't installed. Installing that fixed the problem for me: IS7: WCF Services - .SVC do not work.
Note that changing the application pool .NET version from 2.0 to 4.0 wasn't an option for me because the site needed to run on 2.0.
Because my project need run in .net 2.0 I must follow this link and it work for me with solution 3 : run file.js
http://blogs.msdn.com/b/wenlong/archive/2010/11/23/why-does-machine-config-contain-invalid-xml-content-after-installing-net-3-5-patches.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With