0

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/"
    }
  }
}
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Breezy
  • 13
  • 6
  • Tell us the exact error message, please. – Robert Harvey Jul 15 '18 at 15:36
  • @RobertHarvey edited with error and a few other pieces of information. – Breezy Jul 15 '18 at 16:05
  • I'm guessing something is blowing up in IIS, so you'd want to see the error messages from IIS Express. They'll be either here: https://stackoverflow.com/questions/5798264/iisexpress-log-file-location or in the windows event logs in the application section. – MatthewMartin Jul 16 '18 at 00:55

0 Answers0