none
Handle custom sql connection string per user RRS feed

  • Question

  • Hello,

    I am developing a asp.net web application and right now i have my connection string setup in the web.config file, so each user is using that. I want now to develop a DEMO database where the user according to his profile will use my standard CN or the CN to the Demo database!!

     My first idea on doing that was to edit dynamically the web.config file when each user login but if the same time are a demo and a standard user i would have trouble!!

    My Second option i sto keep the CN in a session so each user when login will have each own CN (Per User), but i have a problem on passing the session CN to my table adapter (I canno tfin da way to edit or pass through the xsd file). I also use object datasource controls.Does anyone has an idea on how i do that?????

    My last third option is to create another copy of my main site with different web.config CN and to login dynamically the demo user to that!!! But i don't like that....

     Is there any other way to solve that problem??

    Thanks Stefanos

    Friday, July 6, 2007 6:48 AM

All replies

  • Sorry i didnt get u u ant to pass connection or connectionstring to different forms am i right?
    Friday, July 6, 2007 9:24 AM
  • Hi,

     

    Not like that..!!I want each user, according to his profile use the appropriate CN.For example:

     

    Demo user uses CN (To Demo instance)

    Standard user uses CN (To Standard instance).....

     

    I can  store the CN to a session passing at login the right CN for the user according to his profile, but i have a problem on passing that Session CN to my table adapters (By editing the xsd file)

    Friday, July 6, 2007 9:33 AM