Help needed with legacy app with shared web.config
Hello All,
I have recently taken on an existing application at work which is a bit odd. It's an asp.net mvc app built for 4.6.1. The base app was just a dashboard with a report built in. A second application was made. At code review, it was suggested that the two didn't need separate repos, and to take the new project and add it as a second project in the dashboard solution. Something went wrong, and no one seems to know how or why it's behaving this way.
So we have dashboard app and new app. The way it's setup is the web.config for dashboard has the connection string for new app. But in new app's web.config we have the various settings for like the parts of an email, etc. If I remove the connection string from the dashboard app, and put it in new app's config, it doesn't work. Also, when I tried to add a logging utility to both as each should be considered different applications when reporting errors, I got a build error that the key could not be duplicated. So if I removed the logging info in the config of one, it would build. It also gets ugly with this, as when I try to add this logging utility to either alone, neither works. But for kicks, I temporarily deleted new app, put the logging utility on dashboard like I had done before, and now it works flawlessly.
Somehow, each project is having their web.config file merged with the other. I'm not familiar with this, as the prior multiple projects on one solution I've had have been batch applications with app.configs and none of them behave this way. Anyone have any ideas or suggestions on what may be causing this?
I'm to the point that I'm considering making a new project in the dashboard solution, and creating each file separately, copying in the code for each file from new app and seeing if that fixes it but that's quite a bit of work which I'd like to avoid if possible.
0 comments:
Post a Comment