Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Trying to target ASP.NET 2.0 in Visual Studio 2010

Avatar of al-w-b
al-w-b asked on
ASP.NET.NET App ServersWindows 7
3 Comments1 Solution966 ViewsLast Modified:
My present application is in limbo....  It works great in IIS 5.5 targeted for .NET 4.0.  It does not work in IIS 7 targeted for .NET 4.0.

So to keep things safe I need to target it in ASP.NET 2.0, which should work.  It is an old stable application, but when I installed Visual Studio 2010 in configured the app for .NET 4.0.  I get numerous errors when I try to rollback to 2.0.

For starters... in Visual Studio 2010, under the website properties tab... the Target Framework drop down only lets me select ASP.NET 4.0... I can't change it to 2.0 here, so I guess I have to do it by hand.

My web config is below.  The errors I get in the 2.0 environment revolve around the ScriptManger.  However, I have the AJAX library in the bin and I am only using UpdatePanels and UpdateProgress panels in a very simple way.  It all used to work in the 2.0 environment before visual studio 2010 changed my web.config.

*note: In the code below I did not expose sensitive data.  IF you see something like [This works] it means that the value of that particular node has been tested and works in both IIS 7.0 and IIS 2.0.  

Based on this web.config file which direction would it be easier to take the app... ASP.NET 2.0 on IIS 6.0 or ASP.NET 4.0 on IIS 7.0?

What changes do I have to make to this web.config file to make it work in ASP.NET 2.0 again?

How can I add ASP.NET 2.0 to the Visual Studio 2010 Target Framework Drop Down list?

<?xml version="1.0" encoding="UTF-8"?>
		<sectionGroup name="system.web">
			<section name="urlrewrites" type="ThunderMain.URLRewriter.Rewriter, ThunderMain.URLRewriter, Version=1.0.783.30976, Culture=neutral, PublicKeyToken=7a95f6f4820c8dc3" />
		<sectionGroup name="EWS">
			<sectionGroup name="EWSControls">
				<section name="CurrencyCodes" type="System.Configuration.NameValueSectionHandler" />
				<section name="CountryCodes" type="System.Configuration.NameValueSectionHandler" />
		<section name="WebBusiness" type="WebBusiness.WebContent.ConfigurationSections.WebConfiguration" />
		<clear />
		<!-- ABDC Local (LPTABDC)
		<add name="LocalSQLServer" connectionString="[This works]" providerName="System.Data.SqlClient"/>
		<add name="CNX" connectionString="[This works]" providerName="System.Data.SqlClient"/>-->
		<!-- HTPAC Production Live Database (www.howtoplayanysong.com)-->
		<add name="LocalSQLServer" connectionString="[This works]" providerName="System.Data.SqlClient" />
		<add name="CNX" connectionString="[This works]" providerName="System.Data.SqlClient" />
		<Redirects />
			<add Type="Title" Content="" />
			<add Type="Description" Content="" />
			<add Type="Keywords" Content="" />
			<add Type="Author" Content="" />
			<add Type="ResourceType" Content="document" />
			<add Type="Expires" Content="0" />
			<add Type="Copyright" Content="" />
			<add Type="Revisit" Content="1 days" />
			<add Type="Distribution" Content="Global" />
			<add Type="Rating" Content="General" />
		<PreloadImages />
		<Errors mode="Off">
				<add Type="Timeout" Location="Any" />
			<ErrorPages Default="~/Error.aspx">
				<add Type="Timeout" Location="~/Timeout.aspx" />
				<add Type="Any" Location="Default.aspx" User="[Email Address works]" />
			<Analytics mode="On" trackingNumber="[Analytics ID Works]" />
			<AdWords mode="Off" />
			<Maps mode="On" key="[Maps Key works]" />
				<add name="HttpPost" />
				<add name="HttpGet" />
		<httpRuntime maxRequestLength="104857600" executionTimeout="360000" />
		<sessionState mode="InProc" cookieless="false"></sessionState>
		<siteMap defaultProvider="XmlSiteMapProvider">
				<add name="XmlSiteMapProvider" type="System.Web.XmlSiteMapProvider" siteMapFile="~/Web.sitemap" />
		<authentication mode="Forms">
			<forms loginUrl="Login.aspx" defaultUrl="Login.aspx" timeout="60" slidingExpiration="false" cookieless="UseCookies" />
			<allow users="*" />
		<machineKey validationKey="AutoGenerate,IsolateApps" decryptionKey="AutoGenerate,IsolateApps" />
		<membership defaultProvider="WebMembershipProvider" userIsOnlineTimeWindow="30">
				<add requiresQuestionAndAnswer="true" connectionStringName="CNX" name="WebMembershipProvider" type="WebMembershipProvider" enablePasswordRetrieval="true" passwordFormat="Clear" enablePasswordReset="true" writeExceptionsToEventLog="false" />
		<roleManager cacheRolesInCookie="true" defaultProvider="WebBusinessRoleProvider" enabled="true" cookieName=".ASPROLES" cookieTimeout="30" cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration="true" cookieProtection="All">
				<clear />
				<add name="WebBusinessRoleProvider" type="WebBusiness.WebMembers.WebBusinessRoleProvider" connectionStringName="CNX" applicationName="ABDC" writeExceptionsToEventLog="false" />
		<pages masterPageFile="~/Templates/Default.master" theme="Default" controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
 [The Controls are ok, they work in ASP.NET 2.0]
          Set compilation debug="true" to insert debugging
          symbols into the compiled page. Because this
          affects performance, set this value to true only
          during development.
		<compilation debug="true" defaultLanguage="c#" targetFramework="4.0">
				<add assembly="System.Design, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
				<add assembly="System.Windows.Forms, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
				<add assembly="System.Security, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
				<add assembly="Accessibility, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
				<add assembly="System.Web.Extensions.Design, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /></assemblies>
			<add verb="*" path=".*" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
			<add name="SessionEndModule" type="WebBusiness.Modules.SessionEndModule" />
			<!--<add name="IIS5XWildCardExtensionFix" type="IIS5XWildCardExtensionFix"/>-->
			<add name="RedirectModule" type="WebBusiness.WebContent.Modules.RedirectModule" />
			<add name="MetaDataModule" type="WebBusiness.WebContent.Modules.MetaDataModule" />
			<!--<add name="PreloadImageModule" type="WebBusiness.WebContent.Modules.PreloadImageModule"/>-->
			<add name="ScriptManagerModule" type="WebBusiness.WebContent.Modules.ScriptManagerModule" />
			<add name="GoogleScriptModule" type="WebBusiness.WebContent.Modules.GoogleScriptModule" />
	<location path="Documents">
				<deny users="?" />
		<validation validateIntegratedModeConfiguration="false" />
                <remove value="default.aspx" />
                <remove value="iisstart.htm" />
                <remove value="index.html" />
                <remove value="index.htm" />
                <remove value="Default.asp" />
                <remove value="Default.htm" />
                <add value="ComingSoon.htm" />
			[Mail Settings Work]
		<bindings />
		<client />
Avatar of Kumaraswamy R
Kumaraswamy RFlag of India image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answers