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

Комментарии • 10

  • @fabiorogeriomamede8718
    @fabiorogeriomamede8718 5 лет назад

    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!

  • @KanOfWhoopass
    @KanOfWhoopass 7 лет назад

    Good stuff. Thanks for posting it!

  • @badmistervaper
    @badmistervaper 4 года назад

    That helped me a lot. Thanks!

  • @mehtabrehman1756
    @mehtabrehman1756 7 лет назад

    thnks for posting this video .....

  • @resoluteforce
    @resoluteforce 4 года назад +1

    Hi randall, have similar issue as the connection manager not picking up the connection string

    • @fuzzylilpeach6591
      @fuzzylilpeach6591 4 года назад

      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

  • @vivekmaru2557
    @vivekmaru2557 Год назад

    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

  • @udaysinghtanwar3768
    @udaysinghtanwar3768 11 месяцев назад

    Hi sir
    sir configuration error not solved in help me sir.

  • @imtiajahammad3586
    @imtiajahammad3586 4 года назад

    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