ASP.NET IIS and framework - asp.net

I have one ASP.NET web application projrct, created in Visual Studio 2008, .NET 3.5 Framework, IIS 6.1 and I'm using Ajax updatepanel, cache options for caching the datatable in a gridview. This project is working good in local, but when I deployed in a cert environment (.NET Framework 2.0 and IIS 6.0) I faced that caching issue.
So that, now I'm trying to change the project from 3.5 to 2.0 framework. But I'm facing an Ajax update panel error.
How can this problem be fixed?

You mean the target framework? You can right click the application name and then click on Property Pages, in that go to Build and then choose the target framework to 2.0.
Also, have a look at this:
http://msdn2.microsoft.com/en-us/library/bb398791(VS.90).aspx
reference : http://forums.asp.net/t/1194067.aspx
It will not be very straight forward though. As there may be some language features that are only available in 3.5.

The ASP.NEt AJAX framework for ASP.NET 2.0 has a separate DLL you have to install manually from this link: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=ca9d90fa-e8c9-42e3-aa19-08e2c027f5d6&displaylang=en
You'll have to use an older version of the AJAX control toolkit too; the latest is only supported on 3.5 and 4.0.
HTH.

Related

How to create a .Net version 2.0 website using Visual Studio 2012?

I have created a website using Visual Studio 2012. It is working just fine. The problem is I have to deploy it on a server that has .Net Framework 2.0 only. So I created another website using Visual Studio 2012 and set its version to 2.0. After copying the code of just a single page I tried to run it. But I am getting the errors "Unknown server tag asp:ScriptManager" and "Unknown server tag asp:UpdatePanel". I need them both as I have to use PageMethods in my page. How can I create a .Net Framework 2.0 website with ScriptManager and UpdatePanel without any error? Thanks in advance.
You didn't have to recreate your project. Go to the project settings, application, then change the "Target Framework".
To clearly answer your question, the answer is : you can't.
As Jamie Keeling suggested, Script Manager and Update Panel came with .Net Framework version 3.5.
You will have to find other components or some kind of workaround.
You might have to install ASP.NET 2.0 AJAX Extensions 1.0 if you are planning to use scriptmanager and update panel in .NET 2.0. Prior to .NET 3.5, Ajax was available as a separate library.

Run webapi without installing .net4.5

I have a website running aspx pages, under asp.net4.0.
I also have some DevExpress controls, that I purchased 4 years ago.
I now want to add an API to the web application, however I understand that needs .net4.5 to be running.
The DevExpress controls don't work under 4.5 - so I would need to renew them at considerable cost.
it possible, after installing .net4.5, for my site to continue to
use .net4 - and not the new 4.5? so that I can have the site
operate under 4.0, and the API under 4.5?
Or is it possible to have the API (using the Entity Framework)
run under .net 4.0
Thank you,
Mark
You can use both web-api and entity framework without installing .net4.5.
You can add web-api to an existing project by installing the nuget package "Microsoft.AspNet.WebApi" (release candidate)
Yes, if you put your Web API in a separate project, you can make it 4.5 and the other projects you have that make up the site can be 4.0. You choose which framework you target when you build your projects:
Right click on project > Application > Target framework dropdown
You can add Web API to any .NET application that uses at least .NET 4.0. Web API doesn't require .NET 4.5. It can be a Web Forms project, MVC project, empty project, console app, WPF app, Metro app etc etc - as long as .NET version is at least 4.0.
But the simplest solution in your case seems to be to just keep everything under 4.0.
You better recreate the web API project using final version of the WepAPI assembly
Tutorial:
http://david.gardiner.net.au/2015/08/aspnet-web-api-for-net-framework-4-in.html

Convert a web app created in VS 2010 ASP.NET 4.0 to ASP.NET 3.5

I've made a web app in VS 2010 and by default, I think it uses the .NET Framework 4.0. Problem is, the server that's going to run it doesn't have 4.0.
Is there a way to downgrade the project? I'm not really knowledgeable with web hosting or web servers so I don't really know which is easier, downgrading the project or upgrading the web server. It's a company web server by the way, so I'm not sure about the legalities and stuff. It's free though, right?
Just right-click on the project in the Solution Explorer and go to properties. Under the "Application" tab, change the "Target Framework" from 4.0 to 3.5. That should do it provided you are not using any code features unique to 4.0.
If you can update the server easily, I would recommend that so that you have the 4.0 framework available to you going forward. The .NET framework is a free download.
Right-click on the project name and select Properties On the Application tab, you should see a Target framework: dropdown.

Experiences deploying ASP.NET 3.5 web site with charting control

Has anyone deployed a web site using the 3.5 framework and the Microsoft charting control?
I know this is built into .NET 4.0, but our client isn't ready to move up to the .NET 4.0 yet.
Specifically, do you need to run the chart install on the server to deploy the control, or is there a way to do this in the deployment (such as dropping the System.Web.DataVisualization [sp?] dll into the BIN directory and updating Web.config?
Thanks,
Tim
EDIT:
I want to add we're using VS 2010 as our IDE...has anyone used the chart control while targeting the 3.5 .NET framework?
I have not used the controls myself so I don't now what major differences there are between versions, if any, but you can try using the .NET 3.5 version of the charting controls.
Edit: You should be able to add the .NET 3.5 control to the VS 2010 Toolbox manually, if it isn't added automatically using the instructions on MSDN.

Can you make a site with ASP.NET MVC Framework using .NET 2.0?

Is it possible to make a site with ASP.NET MVC Framework using .NET 2.0? I am limited to using .NET 2.0 (we use VS 2008, but we have to use the 2.0 Framework) and I really want to try out the MVC Framework.
Scott Hanselman described a way to make it work, with some caveats, in his blog:
Deploying ASP.NET MVC on ASP.NET 2.0
It can be done using Visual Studio 2008, but it can cause headaches...
Create an ASP.NET MVC Web Application
Set Project Target Framework to 2.0
in Project Properties
Add a references to System.Web.MVC (click through warning messages)
Add any additional references you may need (System.Web.Routing, System.Web.Abstractions) again clicking through any warning messages
Start coding!
Not everything you try will work, if you see errors like this on deployment it means that whatever you are doing isn't supported by the 2.0 framework...
"The type or namespace name 'var' could not be found (are you missing a using directive or an assembly reference?)"
Configure your IIS to support MVC Routes and extensions
Copy "C:\windows\assembly\GAC_MSIL\System.Core" from the .NET 3.5 development framework to the /bin folder of the IIS Server running .NET 2.0 SP1.
Much of this can be found in a lot more detail on Scott Hanselman's blog

Resources