egarim / egarim/XpoWebApi-for-AspNetCore-GettingStarted
HttpStatusException: Non successful Http Status Code: 500. Request Uri: https://localhost:44318/api/XpoWebApi
- Dominant language
- C#
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
HttpStatusException: Non successful Http Status Code: 500.
Request Uri: https://localhost:44318/api/XpoWebApi
static void Main(string[] args)
{
//Console.WriteLine("Hello World!");
//Register XpoWebApiProvider
XpoWebApiProvider.Register();
var XpoWebApiAspNetCore = XpoWebApiProvider.GetConnectionString("https://localhost:44318/", "api/XpoWebApi", string.Empty, "ConnectionString");
XpoInitializer xpoInitializer = new XpoInitializer(XpoWebApiAspNetCore, typeof(Department));
xpoInitializer.InitSchema();
//var UoW = xpoInitializer.CreateUnitOfWork();
//Person JocheOjeda = new Person(UoW) { Name = "Jose Manuel Ojeda Melgar" };
//Person RoccoOjeda = new Person(UoW) { Name = "Rocco Ojeda Melgar" };
//if (UoW.InTransaction)
// UoW.CommitChanges();
var unitOfWork = xpoInitializer.CreateUnitOfWork();
var departments = unitOfWork.Query(); //new XPCollection(UoWRead);
foreach (Department department in departments)
{
Console.WriteLine(department.DepartmentName);
}
Console.ReadKey();
}
Exception here
public IDataResult ExecuteFunction(IDataParameters Parameters)
{
var TaskValue = Task.Run(async () => await ExecuteFunctionAsync(Parameters));
TaskValue.Wait();
return TaskValue.Result;
}
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the failing call in the shown Main method, including XpoWebApiProvider registration, schema initialization, and the Department query. Then inspect the ExecuteFunction entry point and the server-side request handling to locate the source of the HTTP 500. Done means identifying the failure cause, applying a confirmed fix, and verifying that the request and department query complete successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 24/100