I'm taking over a project that uses Angular in the front and .net and SQL Server in the backend. I recently graduated from a bootcamp, but we learned node. The old dev, switched from an express backend to .net before he left. Now, the project is mine and I'm completely lost.
Every tutorial/website that I've searched so far references a web.config type file, but this project uses a ConfigHelper.cs
. The local database has data in it and the addresses are correct. So, I'm not sure why it's not working.
I'm not sure what to google or what to else to look for in the code so I can trouble shoot my issue. So, I'm hoping that this question could at least point me in the right direction
ConfigHeler.cs:
namespace WebSiteREST.Utilities
{
public class ConfigHelper
{
private static string defaultConnection = @"Data Source=DESKTOP\SQLEXPRESS;Initial Catalog=CTDB2;Integrated Security=True";
//public static string defaultConnection { get; set; }
internal static string DefaultConnection { get { return defaultConnection; } }
}
}
This is the error I get in my devtools window:
https://i.stack.imgur.com/3AIST.jpg
I can't post images, but it says:
Error 204 (no content) - Options - GetVehicle?start=0&results=200 - localhost:27985
Error 400 (bad request) - GET - GetVehicle?start=0&results=200 - localhost:27985
launchSettings.json
(just in case you need it. I'm using the CTRest option):
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:27984/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "api/values",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"CTREST": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "api/values",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:27985/"
}
}
}