Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8124605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:30:30+00:00 2026-06-06T06:30:30+00:00

As a learning exercise i want to create a simple web api and consume

  • 0

As a learning exercise i want to create a simple web api and consume it using a web client(asp.net mvc) and a desktop client(winform).
The web api must handle categories, products and of course users/roles as follows:

  • everybody can browse categories and products
  • regular users can insert/update/remove products
  • administrators can insert/update/remove categories and products

Regarding first consumer, the asp.net mvc application, i have the following questions:

  1. In controllers, will be anything else than ViewResults, because from what i understood all http requests are made from javascript?

  2. What about authentication and authorization?Since we are talking about a RESTFUL service, there is no connection between calls and the user must send in every request some piece of data to identify himself.

    2.1 Is there any point in using HTTPVerbs ( in ASP.NET MVC apllication) ?

    2.2 What about FormsAuthentication?

    2.3 How do i safely send the credentials to the web.api?

Everything is so blurry for me, is there any example with some web api, hosted in the iis independently and consumed by an website (ASP.NET WebForms or ASP.NET MVC) because all examples i have seen weren’t that clear.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T06:30:33+00:00Added an answer on June 6, 2026 at 6:30 am

    1) In controllers, will be anything else than ViewResults, because from
    what i understood all HTTP requests are made from JavaScript?

    Not necessarily. You could perfectly fine use the HttpClient (the Web API Client classes) to consume your RESTful actions directly from your standard ASP.NET MVC actions. For example you could perfectly fine have a repository which uses the HttpClient to consume an ASP.NET MVC Web API method to fetch the data instead of querying a relational database. You should not necessarily expose your WEB API methods to client side JavaScript. They could serve as a gateway to your data access. There are many possible scenarios of course.

    2) What about authentication?Since we are talking about a RESTFUL
    service, there is no connection between calls and the user must send
    in every request some piece of data to identify himself.

    There are many ways to perform authentication. One of them is to use Forms Authentication which is a well established mechanism involving cookies. So the piece of data that will be sent from the client to identify himself is actually a cookie in this case.

    2.1) Is there any point in using HTTPVerbs?

    Of course. REST is all about HTTP verbs. In the case of ASP.NET Web API it is the HTTP verb that determines which API controller action to invoke by convention. You could of course violate this convention by overriding the default routes setup.

    2.2) What about FormsAuthentication?

    See point 2)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As a learning exercise I'm building a basic scientific computation environment based on .NET.
I'm working on building a pretty simple site mainly as an exercise in learning
I'm trying (as a self-learning exercise) to create a Clojure macro that will generate
I'm trying to learn JPA and I want create a simple Java command line
i'm starting up learning prolog (i use SWI-prolog) and i did a simple exercise
I'm developing a Python web app as a learning exercise, and I am looking
As a learning exercise, I'm writing a web scraper in Common Lisp. The (rough)
I'm new to Corona and as a learning exercise I'm creating a simple game
As a learning exercise I'm using parsec to look for values in a test
So I'm working on my own little MVC framework as a learning exercise. It's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.