Last post Nov 07, 2017 10:25 AM by AngelinaJolie
Nov 06, 2017 06:01 AM|IamGuy84|LINK
I have created Aps.net Core 2 with Angular template project by default project type.
And I have added Context Data, Connection String and another controller file called PersonController.cs as below:
public class PersonDataController : Controller
private readonly PersonDBContext _context;
public PersonDataController(PersonDBContext context)
_context = context;
public IEnumerable<PersonInfo> Persons()
In Sql Server Management Studio (SSMS):
It seems good. Now I have created a new site from IIS (localhost/bpa/webapi).
For Weather Data (Non-database):
For Person Data (Database):
I do not understand why i am not getting person data. My Connection string is as below:
"PersonConnection": "Server=(localdb)\\mssqllocaldb;Database=PersonDB;User ID=sa; Password=********;"
What am I missing? Any Idea?
I am waiting for your response.
Thanks in advance!
Nov 07, 2017 10:25 AM|AngelinaJolie|LINK
May I know that it means that
http://localhost:5002/api/persondata/persons works well, but after deploying, it doesn't work now?
if so, I suggest that you could use remotely debug tool for published .net core project.
Here is tourist on how to remote debug in details,
Please let me know if any question on remote debug;
With regards, Angelina Jolie