c# - How to connect to base from sub domain? SQLiteConnector, connectionString -


my web site c# asp.net , sqlite. in main domeine www. mysite. com work fine in web.config...

 <connectionstrings>         <add name="sqliteconnector" connectionstring="data source=|datadirectory|mybase.db3;"  providername="system.data.sqlite"/>           </connectionstrings> 

mybase.db3 in app_data folder. have web site in domain www. newsubdomain . mysite .com , don't know how make connecton base in main domeine www.mysite.com must put in web.config need more or else make connection? help!!!

since web.config file common sites, can add multiple connection strings each sub domain :

<connectionstrings>         <add connectionstring="" name="subdomain1"/>         <add connectionstring="" name="subdomain2"/> </connectionstrings> 

then can check current url using

httpcontext.current.request.url.absoluteuri 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -