I have a query while hosting my web application in IIS:
* whether we need .net framework to be installed in the hosting machine with IIS?
SHort answer - yes, you need the .NET Framework installed. A .NET application won't run without the Framework.
You'll also want to make sure you set the correct framework for the web application under the ASP.NET tab, depending on what version the application was written in.
Yes, as the .NET framework is what allows a .NET application to be utilized. Here is a complete guide from Microsoft: http://msdn.microsoft.com/en-us/library/ms178477.aspx
Related
I have a server that is currently hosting ASP.NET Framework applications and I have an ASP.NET Core application that I want to host on the same server. Will downloading ASP.NET Core Module (for hosting) cause any issues with the existing .NET Framework apps? And after that will hosting the new .NET Core application cause issues with the existing .NET Framework apps?
I know that you can develop .NET Core and .NET Framework at the same time since Core is self-contained, but can you host them on the same server at the same time?
Note: If you can include documentation from somewhere that supports your answer that would be greatly appreciated.
Thanks in advance.
I am aware that WCF is available in .NET 3.0 and higher.
However I was wondering if it's possible to creating working WCF service Service.svc within ASP.NET 2.0 website ?
There is a reason why we have ASP.NET website in .NET 2.0, It's an old app with tons of code, built on top of 3rd party .NET 2.0 CMS system.
Now, I was able with no problem to add WCF service to the website, the following files have been created:
MyWebsite/App_Code/Service1.cs
MyWebsite/App_Code/IService1.cs
MyWebsite/Service1.svc
Everything compiles just fine, I was able to add all required endpoints and node was created successfully.
But when I navigate to the service:
http://localhost/MyWebsite/Service1.svc
I get this error message:
Server Error in '/MyWebsite' Application.
Service 'Service1' has zero application (non-infrastructure) endpoints. This might be because no configuration file was found for your application, or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element.
The error message is confusing, because I have everything defined.
Could it be because the website is running in IIS as .NET 2.0 app ?
Or is it still possible to have WCF service inside the website that runs as .NET 2.0 app ?
Clarification
The IIS virtual directory for the website is configured with ASP.NET 2.0 version.
But we do have .NET 4.0 installed.
Did you configure the service in the web.config? It's also possible that you're missing the right machine / global web configuration files because you didn't install .NET 3.0 or 3.5. Why not install .NET 3.5 on that machine in that case? It should be compatible with 2.0.
Do not confuse AppPool .NET version (because it's 2.0 for .NET 20, 3.0 and 3.5, it refers to the base class library version) and the used framework version of .NET.
The other solution is just the configuration of WCF in your web.config. Did you changed something in there?
for what it's worth, see this requirements-page: http://msdn.microsoft.com/en-us/library/ms733890.aspx
if you look under 'other versions' it only goes back to 3.0...
there might be other links that could help.
This is an existing asp.net application (VS 2008) which makes calls to web services. Everything was working fine. Recently, the IIS (ver 6) was changed to use ASP.net 4.0(from asp.net 2.0) and all the web service calls are failing now.
The error in the application log states 'Forms authentication failed for the request. Reason: The ticket supplied was invalid'
I am new to this application and just dont know how to fix the issue.
Any help is appreciated.
so your application is a .net 2.0 application, and you changed the site version to .net 4? Why was your website upgraded to .Net 4? Either upgrade your application to .Net 4, or downgrade your site to .Net 2. You can't have them mismatching.
Did you try something? Have a look at here. Apparently it's to do with IIS 7.5
You will have to upgrade your application too. Basically, you need to change your reference from .net 2.0 to the net 4 dll's.
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
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.