Why Does My ConfigurationManager Connection String Not Work
HTML-код
- Опубликовано: 7 окт 2024
- If you are having trouble getting a connection string to read from your configuration file, check this out.
Common Error: Object reference not set to an instance of an object
Thanks Randal. This tip solve a problem with my project lesson. I removed and put again System.Configuration library on reference project and now it works! Thanks a lot!
Good stuff. Thanks for posting it!
That helped me a lot. Thanks!
thnks for posting this video .....
Hi randall, have similar issue as the connection manager not picking up the connection string
asp.net core no longer uses the xml based web.config system. I think you just need to pass the connection string into the library using the new appsettings.json system
it works only if you use the string from dataconnection by copying it rather than typing it
i know it sounds stupid but mine works like thata only after 4hours
Hi sir
sir configuration error not solved in help me sir.
Hi,
your video makes sense.
But i have a question-
I have used a web application with empty template(added connectionStrings in web.config) and used its reference to my api project in the same solution.
But I am still getting the same error.
According to your advice, If i add connectionStrings to web.config of my api project, i gets the connectionstrings.
But i can see from the bin folder that it gets the web config from emptry template project.
Can you please give explanation?
If you need, you can find my project on github.com/imtiajahammad/MyPortfolioDemo