Connection string hell in .NET / LINQ-SQL / ASP.NET

后端 未结 13 1154
渐次进展
渐次进展 2021-01-30 14:29

I have a web application that comprises the following:

  • A web project (with a web.config file containing a connection string - but no data access code in the web pr
13条回答
  •  臣服心动
    2021-01-30 14:55

    Your application will only use the config entries in the web.config file. You can put dll config setting in the web.config file as long as they are structure properly. My example is VB specific using the My Namespace, but it gives you the general idea.

    In the configSections paret of the config file you will need an entry:

    
        
            

    Then in the applicationSettings part of the config file you put the entries for each dll:

        
          
            
                False
            
          
          
    

提交回复
热议问题