This blog is subject the DISCLAIMER below.
Wednesday, June 17, 2009
The application domain or application pool is currently running version 4.0 or later of the .NET Framework. This can occur if IIS settings have been set to 4.0 or later for this Web application, or if you are using version 4.0 or later of the ASP.NET Web Development Server. The element in the Web.config file for this Web application does not contain the required 'targetFrameworkMoniker' attribute for this version of the .NET Framework (for example, ''). Update the Web.config file with this attribute, or configure the Web application to use a different version of the .NET Framework.
You may get this error if you installed Visual Studio 2010.
Today I published a website (ASP.NET 2.0) and uses Application Pool ASP.NET V2.0, and when I browsed it; it got that error.
Simply I press right click on the virtual directory (My website) under Default Web Site, properties ->ASP.NET, I found it uses ASP.NET Version 4.0, I changed it to ASP.NET 2.0 -> Apply, message box appears says
Changing the Framework version requires a restart of the W3SVC service. Alternatively, you can change the Framework version without restarting the W3SVC service by running: aspnet_regiis.exe -norestart -s IIS-Viirtual-Path
Do you want to continue (this will change the Framework version and restart the W3SVC service)?
I said OK, but it didn't change its version and it needs me to do some action
Start->All programs->Visual studio 2008->Visual Studio Tools->Visual Studio 2008 Command Prompt -> write this command ->
Aspnet_regiis.exe -s W3SVC/1/ROOT/My website
It then works well.
Subscribe to:
Post Comments (Atom)
5 comments:
Hi I found few good tutorails on this blog.
you can see them if you like
http://aspnetcsharp4.blogspot.com/2009/05/first-look-vs2010.html
http://aspnetcsharp4.blogspot.com/2009/05/c40-new-features-list.html
http://aspnetcsharp4.blogspot.com/2009/05/variance-in-c-40.html
http://aspnetcsharp4.blogspot.com/2009/05/whats-new-in-aspnet-40.html
http://aspnetcsharp4.blogspot.com/2009/05/aspnet-40-core-services.html
http://aspnetcsharp4.blogspot.com/2009/05/auto-start-web-applications.html
http://aspnetcsharp4.blogspot.com/2009/05/ajax-and-new-template-engine-in.html
http://aspnetcsharp4.blogspot.com/2009/05/shrinking-session-state.html
http://aspnetcsharp4.blogspot.com/2009/05/routing-of-urls-capability-is-added.html
http://aspnetcsharp4.blogspot.com/2009/06/access-twitter-api-using-c.html
http://aspnetcsharp4.blogspot.com/2009/06/free-aspnet40-hosting-available.html
http://aspnetcsharp4.blogspot.com/2009/06/lazy-evaluation-feature-in-c.html
http://aspnetcsharp4.blogspot.com/2009/06/difference-between-shadowing-and.html
http://aspnetcsharp4.blogspot.com/2009/07/microsoft-aspnet-40-data-access.html
http://aspnetcsharp4.blogspot.com/2009/07/microsoft-aspnet-40-whats-next.html
http://aspnetcsharp4.blogspot.com/2009/07/ajax-client-side-templating-in-aspnet.html
http://aspnetcsharp4.blogspot.com/2009/07/jquery-in-aspnet.html
http://aspnetcsharp4.blogspot.com/2009/07/c-interview-questions.html
http://aspnetcsharp4.blogspot.com/2009/07/using-ajax-control-toolbox-with-jquery.html
http://aspnetcsharp4.blogspot.com/2009/07/microsoft-interview-questions.html
http://aspnetcsharp4.blogspot.com/2009/07/json-and-aspnet.html
http://aspnetcsharp4.blogspot.com/2009/07/aspnet-questions-with-detailed-answers.html
Thanks
Hi! Use this template web development
What a fantastic article. I really like reading these types of articles. I can’t wait to see what others have to say. A lot of useful information here. I’m sending it to some friends.
Great Information. Thanks for sharing
Post a Comment