Hi there,
I am just getting to grips with WebApi and how to use them with the MVC wrappers. But I am at a loss on how to ensure that the authentication is working correctly as part of the project.
My scenario is I have front end website (www.myfrontendwebsite.com) which is running on one server and then I have the service website with all my Business logic running on a webapi back end website (www.mywebapiwebsite.com) this may/ may not be running on a separate website.
I am forcing my users to log in to ensure that they can access only the parts of the sites they should have.
Obviously with the web api project this needs to be protected as well so I need the user to be authenticated.
Now I am trying to do something like this with a combobox:
Html.Kendo().ComboBox()
.Name("DateSetup")
.Suggest(true)
.Filter(FilterType.Contains)
.DataSource(data =>
{
data.Read(read => read.Url("http://localhost:59236/api/GenericReport/GetDateFilterTypes"));
})
.Placeholder("Select date setup")
so I know I need to add some additional information to the header that is being provided but how can I do that from the read.Url method? Do I do this via adding .Data afterwards or is there another way of do it.
I have already enabled CORS to work as this works when I an using allow annoynomous.
Thanks in advance.
.HtmlAttributes(new { style = "min-width:100%;" })
I am just getting to grips with WebApi and how to use them with the MVC wrappers. But I am at a loss on how to ensure that the authentication is working correctly as part of the project.
My scenario is I have front end website (www.myfrontendwebsite.com) which is running on one server and then I have the service website with all my Business logic running on a webapi back end website (www.mywebapiwebsite.com) this may/ may not be running on a separate website.
I am forcing my users to log in to ensure that they can access only the parts of the sites they should have.
Obviously with the web api project this needs to be protected as well so I need the user to be authenticated.
Now I am trying to do something like this with a combobox:
Html.Kendo().ComboBox()
.Name("DateSetup")
.Suggest(true)
.Filter(FilterType.Contains)
.DataSource(data =>
{
data.Read(read => read.Url("http://localhost:59236/api/GenericReport/GetDateFilterTypes"));
})
.Placeholder("Select date setup")
so I know I need to add some additional information to the header that is being provided but how can I do that from the read.Url method? Do I do this via adding .Data afterwards or is there another way of do it.
I have already enabled CORS to work as this works when I an using allow annoynomous.
Thanks in advance.
.HtmlAttributes(new { style = "min-width:100%;" })