Deploying Web API with a setup - deployment

Is there a manual for deploying an asp.net web api project?
Do I have to deploy the web api dll's or are they included in .Net 4.5?
That about JSON.NET? It seems not to be a component of .Net 4.5. Do I have to copy this ddl's on my own and what can you say me about the licensing of JSON.NET?
JSON.NET has a MIT license. What do I have to do if I want to use JSON.NET in my web api?

Related

Why was SF Stateless Web API template removed?

In the picture below we can see in the year 2018 in VS2017 there is no Stateless Web API template in Service Fabric templates in VS. Why was this removed and what are it's replacements?
Because at the time you took the first screenshot, probably using .NET SDK 2.8 or earlier and SF tools for VS 1.7 and earlier, Service Fabric and the WebApi templates were based on dot net framework only.
The releases that came after Service Fabric .NET SDK 3.0 and SF tools for VS 2.0 , like the one in the screenshot, started a migration to .net standard 2, now you can target dot net framework or dot net core using the same libraries targeting .Net Standard. For A while you had both templates available, now everything is based on core.
The main difference between the old and the new is that the previous templates you used dot net framework 4.6.2 + Owin, now you use AspNet Core with any framework compatible with the .Net Standard 2.
You might get more info from these release notes:
https://blogs.msdn.microsoft.com/azureservicefabric/2017/09/25/service-fabric-6-0-release/
https://blogs.msdn.microsoft.com/azureservicefabric/2018/01/26/service-fabric-6-1-release/

Stateless worker service and api service both referencing same project

I have a service fabric solution that contains the following:
Worker service (.net framework 4.7)
Api Service (.net core 2.0 as VS 2017 does not provide a template for framework api services)
Infrastructure project (.net standard) referencing EntityFrameworkCore
Both services reference infrastructure project.
This gives me issues as the framework service will not load EntityFrameworkCore reference due to it being core.
How do I go about resolving this issue?
Can I force the core to load EF 6.2?
Can I force 4.7 to load EFCore?
Entiy Framework Core is .NET Standard as well, it should load fine on .NET Framework 4.7.
You may need to add the EF Core NuGet packages to the worker service if it doesn't yet use the transitive NuGet package reference style.

How to make ASP.NET Core RC1 work with the GA SDK?

The previous non-GA versions of Service Fabric came with support (and template) for ASP.NET Core RC1. GA removed this support.
I have a project that depends on ASP.NET Core RC1. I would also like to update to the new SDK now.
I can get the asp.net service to run with the latest SDK without any significant changes to code. However creating a ActorProxy or ServiceProxy in the asp.net project fails with exception "The config package was not found". So my asp.net service is unable to communicate with the rest of the services in the application.
How can i fix the issue with ActorProxy and ServiceProxy on ASP.NET Core RC1 service?
Someone else discussed the same problem in the comments of Service Fabric documentation. Vaclav came up with workaround to the bug. Basically the client project requires ConfigurationPackage named "Config". Projects based on the old ASP.NET Core template didn't have the ConfigurationPackage.
For details of implementing the workaround, see:
https://azure.microsoft.com/en-us/documentation/articles/service-fabric-get-started/#comment-2601127160

How to secure an existing Asp.Net project with ADFS

I have a big project in asp.net and I want to embed ADFS in it for authentication purpose.
Please suggest some links.
Thanks
Just to clarify:
You don't embed ADFS in an ASP.NET application. You add WIF or OWIN to the application and bind this with ADFS which sits on a Windows server. The latest version is ADFS 3.0 on Windows Server 2012 R2.
How To: Build Claims-Aware ASP.NET Web Forms Application Using WIF
WS-Federation in Microsoft OWIN Components–a quick start
OWIN is the newer technology.
And then you bind your application to ADFS.
Building a test claims-aware ASP.NET application and integrating it with ADFS 2.0 Security Token Service (STS)

Deploy MVC 4 application 4.5 Framework 1and1 hosting

I'm trying to deploy an mvc 4 project in vs2012 via FTP on 1and1.com
This is what I'm getting.
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
Are there settings on 1and1 I need to set somewhere because it's an MVC proj or changes in webconfig?
#dright, Are you still encountering the problem? It appears 1and1.com has updated their hosting package to support 4/4.5 Framework with their Basic Windows hosting plans (https://www.1and1.com/windows-hosting?linkId=hd.subnav.windowshosting). I purchased a plan as a sandbox for deploying little apps that I develop.
I have successfully deployed a Asp.Net application using the WebMatrix IDE. But I have struggled using VS2013 template/default applications' Web.Config. I was curious if you have had any luck.
Thanks!
1and1 windows package doesn't support MVC. You would need to update to their server package. ~59/month