Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I had an app that used an MVC template, prescaffolded with authentication (the one with bootstrap). I am migrating the project over to Web API and a React Client, but I still need this same functionality. The MVC authentication used SQL Server. I really want to do all I can the same, unless something better is possible. How can I implement authentication/authorization with Web API? I guess I can store the password in React's state/props, and then maybe pass that into the HTTP calls?
You can generate token using web api and then store it on react front-end in local storage. And whenever you do http call put that token in authorization header and match it from web api backend.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I have one HTTP Post API (build in ASP.NET Core), that API is responsible to add Customer in database.I would like to send an email using Azure function at the time of HTTP Post request. Azure function should automatically get triggered. How to achieve this?
Why is it important to you that this is achieved by an Azure function? Azure Logic Apps were designed with such workflows in mind.
However, if it's important to you that this is implemented by an Azure Function then you'll need to create a new Azure Function with a Http Trigger. You'll need to implement the e-mail sending functionality yourself using a library such as MailKit.
Here's a good resource on using MailKit to send e-mails.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I have an android application which fetch its information from a web-service which itself apply some rules to information read from database and returns it to android application.
Currently I'm going to develop a web application which mimics android application and use it temporarily for iOS users.
I'm going to use an ASP.NET MVC application for this purpose (since I know ASP.NET MVC) and implement it like architecture represented in below picture:
Prior to this I have developed web-api and asp.net MVC application but both of theme were reading information from database but currently I'm going to read information from a remote webservice and I don't know how to do this?
I want to know which method or APIs should I use to fetch information from remote database and populate my models.
For the actual retrieval of data, you can use HttpClient to send requests to your remote web service and get data from it.
For accessing the data internally, you can do this by implementing the Repository pattern to create the internal interface(s) for getting data to your controllers (or services first if needed).
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm trying to implement ADFS Login on a MVC application.
The ADFS service is from a third party company and the only thing I got from them is the Metadata URL. I've tried a lot of examples from internet, but any of them is working.
Can someone please tell me how I should do this, if I need something more besides the metadata link(?) or give me the link to a good tutorial to implement ADFS login.
I don't know a lot about ADFS services or authentication and this is my very first time asking something here.
To use ADFS, the client side must implement WS-Federation, SAML 2.0 or OpenID Connect.
OIDC is ADFS 4.0 only.
There is a NuGet OWIN WS-Fed package as well as one for OIDC.
The easiest way to do this in VS for a new MVC project is "Change Authentication" / "Work or School" / select "On-Premises" from the drop down.
Then enter the parameters from the metadata.
They will have to add your application to ADFS as a Relying Party.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
In my solution folder there are two projects
Myproject.API
Myproject.Web
API will server all the request to My Mvc web or android or IOS client.
Now Here I'm confused, Where should I Implement Authentication process.
At API or
At API and MVC both
As MVC identity uses Cookie based authentication where as API used token based.
Now What I want In Web Project, If any user try to open a page which is only for Authorize user, and if he is not logged in then he should be redirect to Login page, And It is possible when I'll MVC Identity.
If I'll Implement At API then How I'll manage cookies at Web Project.
and How I'll Send that token in every request from WEB to API
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I bumped into OWIN and Katana and I am now trying to understand what this is really about. From what I understand is that it simply tries to separate the web application from the web host.
So it basically says that when you build an ASP.NET MVC web application that your tied to IIS when you deploy the web application. With OWIN/Katana you don't have that problem. That's what I understand from it, is this correct?
If so, then why would I want to use OWIN/Katana in my project when I could simply use "mod_mono" to deploy my ASP.NET web application to a server like NGINX, Apache etc.
Because that's basically the goal of the OWIN project right? But I find it more trouble to implement OWIN/Katana into my web application then to just simply use the Web API of MVC and later on deploy it to a Mono environment. I could even run it in Linux if i want.
So when should one choose OWIN/Katana over Mod Mono? Does it really makes a difference in the end?