Console App (.NET Core) Issue

Jared Severson 1 Reputation point
2020-12-03T14:35:58.73+00:00

My new organization has an internal web app for product maintenance and reporting. A server was changed out and parts of the app need to point to the new data source. I updated the IP address of the existing connection to point to the new server in Server Explorer. But, the change hasn't taken hold and a certain field on one of the forms keeps freezing the program when data is typed. Normally it searches on the old server DB to let you know if the item code already existed. I didn't build the app, and have very limited experience using Visual Studio. I'm guessing we need to push the change to the production version in IIS on the server hosting the app? How do I get the new IP address update to take hold on the production app?

Any insight will be greatly appreciated!
Thank You

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,165 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,606 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,247 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Taylor 48,281 Reputation points
    2020-12-03T14:57:28.307+00:00

    Server Explorer in Visual Studio? That has nothing to do with code you're running in your app. Server Explorer is a tool in VS to allow you to browse server resources on your network. Personally I never use it.

    You are being a little vague on what the actual problem is beyond a moved server. If you are referencing a database in your app and you moved the database then the database connection string needs to be changed. If you follow standard practice then the connection string is stored in your app's appsettings.json (and environment-specific files). Update the connection string in those files and your app will use the new database.

    If you hard coded the connection string in your code then move it to the appsettings.json file and then fix the connection string as mentioned earlier.

    Note that changing appsettings.json does not require a rebuild of your app. You can technically go to your hosted app in IIS and change the settings in the file and restart the site and it'll use the new settings.

    0 comments No comments