Menu

how to protect db userid and password in xml?

2005-06-02
2013-03-07
  • Nobody/Anonymous

    I am trying to use this framework in a web-based project. and just realize that the xml file may be opened by others ...

     
    • Richard Banks

      Richard Banks - 2005-06-02

      The database user id and password can be removed from the XML file as long as you handle the PersistenceBroker.LogOnDetailsNeeded event.

      Alternatively (if you wish to hide the schema as well) you can rename the file to have a .config file extension (which IIRC is an extension that is never served by IIS to clients - but I could be wrong).  You will need to supply the correct file name to the PersistenceBroker.Init() method to do this.

       
    • Nobody/Anonymous

      Protected WithEvents persistenceBroker As AToMSFramework.CPersistenceBroker

      Protected Sub persistenceBroker_LoginDetailsNeeded(ByVal sender As Object, ByRef User As String, ByRef Password As String) Handles persistenceBroker.LoginDetailsNeeded
              User = "userid"
              Password = "password"
      End Sub

       
    • Nobody/Anonymous

      LoginDetailsNeeded not triggered in case of broker.Init(<xmfile>) use.
      In this case the framework search for a default "AtomsFramework.xml" file, and raise an exception  :
      Could not open the XML Mapping file at ..........\bin\AtomsFramework.XML
      just as if it looks first for a default file to complete missing details.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.