I have upgraded my asp.net application from framework 2.0 to 4.0 and with this stated I am also running one web service which is in framework 2.0.
On deploying to the server, I am not able to get the output of the web service while application is running alright
Do I need to upgrade the version of web service too?
And any change in app.config file required?
The easiest way forward is going to be to upgrade the web service to v4.x as well. Each application pool can only be tied to a single version of the .Net framework. It is technically possible to host a 2.x application inside of a 4.x site, but it will save a lot of trouble in the long term to standardize on a single version of the framework.
As This article describes:
If an IIS Web application that targets the .NET Framework 3.5 or
earlier is nested inside an IIS Web application that targets the .NET
Framework 4, the compiler might report errors when it compiles the
nested application. This is because Web.config files inherit settings
from files that are higher in the configuration file hierarchy.
If you don't want to upgrade the service, your best bet is to prevent web.config inheritance. This blog post has details on a few different ways to accomplish this.
Related
We have a big ASP.NET Framework application hosted in IIS and we are considering a progressive migration to ASP.NET Core using YARP, as explained here: https://devblogs.microsoft.com/dotnet/incremental-asp-net-to-asp-net-core-migration/
The basic idea is to deploy a ASP.NET Core app that will proxy all the requests to the old application, and then move the code progressively from the legacy app to the proxy, until the legacy app is empty and can be removed.
We are wondering about the hosting of the ASP.NET Core proxy app. In priciple there is no limitation, it could be deployed in IIS alongside with the legacy app or be deployed with Docker/Kubernetes. However, we don't know if that second option will cause a performance penalty or any other kind of problem. So before doing a POC, we'd like to ask if somebody has experience with this problem and some advice about it.
I am currently attempting to take an application that I have already created as a .Net CORE Application and connect it to Sharepoint Online in the form of a Provider Hosted Sharepoint Add In.
It seems that Sharepoint add ins can only recognise .Net Framework web applications which would result in having to port the .Net CORE application to a .Net Application.
I am seeking the easiest and cleanest way to proceed with this.
Is there a way that I can create a Provider Hosted app using .Net core or should I port the .NET Core application to a .Net Framework web application?
If so, how would you go about doing this?
Even we were trying to achieve the same thing. But we ended up in .net framework. To be on the safer side, you can create a provider hosted app using visual studio, which gives better connectivity to the Sharepoint App.
.Net core to .Net framework conversion would be so simple, since the framework holds most of the libraries and functionalities when compared to .Net core. You can just copy paste the code from your.net core and you can do modifications to fit in the framework.
Otherwise, you can use oauth tokens by using SharePoint Rest API's. If you have already built the provider hosted app and installed it in your site collection, you can just use the existing client id, client secret to get the access token like this. So that you can perform everything using your existing .Net core app.
I am tasked to to build a Web API application. The app will be hosted inside an existing web site - a pre-ASP.NET 5 web application with a WCF web service.
I wonder - can I build the web-api application using ASP.NET Core 1 in a way that it can happily exists as a sub application inside the already existing site in IIS?
Thanks!
Yes, this is possible, I'm doing the opposite of this scenario but conceptually its the same thing. You need to create your subsite as a separate application in IIS with its own app pool. That app pool needs to be configured No Managed Code per the instructions on the Docs site https://docs.asp.net/en/latest/publishing/iis.html
The only other thing you need to watch out for is that the web.config in the subsite will inherit some settings from the root web.config, so you need to remove or clear things sometimes like handlers, modules, etc.
If I understand you correctly it is not possible what you want. Please refer to the following documentation about hosting ASP.NET Core on IIS: https://docs.asp.net/en/latest/publishing/iis.html.
If you specifically look at the .NET CLR version in the application pool it should be "No Managed Code" while your current website is set to a .NET framework version I assume. This is because ASP.NET Core is now cross plaform and completely web server agnostic. It even needs a little 'trick' (the ASP.NET Core Module) to work on IIS. See: "The module creates the reverse-proxy between IIS and the Kestrel server."
But if you follow the link provided above I think you'll manage to work it out.
Is it possible to deploy ;
1- a web-api project
2- a website written in Asp.net
3- a WCF service as windows service
in one msi file using/in Windows Web Installer Project (preferably) or in Wix ?
Yes, it is possible using WiX. I maintain an open source project called IsWiX that even makes it somewhat easy. See:
Create and Package a Windows Service using IsWiX
IsWiX Web Site Demo
The concept behind IsWiX is project templates (scaffolding) and graphical designers that give you a project structure and most heavy lifting for your WiX MSI project. The template already contains examples of IIS configuration that merely need to be uncommented out. If you need a Web API and a Web Site you'll have to clone that part of the code and make a few adjustments. For example a static website typically won't be a web application where a web-api will be. Then you'll use the services designer to define the windows service. The fact that the service hosts a WCF endpoint really doesn't matter.
For that matter, one of the really cool things about WCF is it's possible to eliminate your dependencies on IIS. I've seen solutions using this with no dependency on IIS and this really makes creating installers a lot simpler.
I've developed a small site with ASP.NET MVC3, I will have to deploy in the next few days, and I would like to know which prerequisite the server should have(like this I can contact their IT service to be sure they have everything).
They already have IIS 7.5, the last .net framework installed, but should they have something installed/configured for ASP.NET MVC 3? I searched, but I found only non relevant links :(
In general, ASP.NET should be installed and configured on IIS.
There're the two general methods that ASP.NET MVC application can be deployed with:
Bin Deploy - it means that you will include the asp.net mvc dlls with the published web site. This time nothing else is required, just the published web site files. Read more about it on Phil Haack's blog post
PreInstall ASP.NET MVC on server - using Microsoft Web Installer or the standalone downloader. Both links taken from ASP.NET MVC3 Home. This will install all the required dlls on server, so they will not be required to be passed along the published web site.
That's just it, nothing more. ASP.NET MVC is known to have some problems when deployed to iis 6, but for the version you are deploying to, problems are solved. Read about those problems here
You can bin deploy an MVC3 app so that it doesn't require anything other than IIS with ASP.NET and .NET 4 installed.
http://www.hanselman.com/blog/BINDeployingASPNETMVC3WithRazorToAWindowsServerWithoutMVCInstalled.aspx