A set of technologies in .NET for building web applications and web services. Miscellaneous topics that do not fit into specific categories.
Could you post the code for the valuescontroller?
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Can you please guide me why i am not getting response from following link
https://otgapi.azurewebsites.net/api/values
This url shows https://otgapi.azurewebsites.net/ api deployed successfully.
A set of technologies in .NET for building web applications and web services. Miscellaneous topics that do not fit into specific categories.
Could you post the code for the valuescontroller?
Hello @A b d u l Wahab ,
Thanks for reaching out to us.
If I understand your problem correctly, you are having issues deploying your web app to Azure App Service. Correct?
If that is the case, Can you elaborate how you are trying to deploy the code ?
Follow the below documents which will guide you through the deployment process if you haven't followed earlier .
I hope this information helps. Please feel free to reach back out for any further questions or clarifications.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using OTG.BusinessService;
namespace OTGWebAPI.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class ValuesController : Controller
{
private IAuthService _authService;
public ValuesController(IAuthService authService)
{
_authService = authService;
}
// GET api/values
[HttpGet]
public IEnumerable<string> Get()
{
return new string[] { "value1", "value2" };
}
// GET api/values/5
[HttpGet("{id}")]
public string Get(int id)
{
return "value";
}
// POST api/values
[HttpPost]
public void Post([FromBody] string value)
{
}
// PUT api/values/5
[HttpPut("{id}")]
public void Put(int id, [FromBody] string value)
{
}
// DELETE api/values/5
[HttpDelete("{id}")]
public void Delete(int id)
{
}
}
}