We just got the second database server and plan to divide users into two two servers. Unless the tool can utilize both servers, we will go with own solution. What product do you recommend? Thanks!
vicky457
Posts
-
Dynamic DB Connection based on user type -
Dynamic DB Connection based on user typeI need to create an application: upon user login, check the user type and decide the database that application will use for that user. Here is what I have: 1: Master database: stores user information and application configuration data, such as which db to use and connection string 2: Database I on server 1: contains all the application data for user group I. 3: Database II on server 2: contains all the application data for user group II. 4: Database I backup on server 2: as backup for user group 1 in case server 1 fails. 5: Database II backup on server 1: as backup for user group 2 in case server 2 fails. 6: Through log shipping between server 1 and server 2 to keep DB I and I and their backup up-to-date. 7: The web site is running on web farm. The session state management is using SQL server session state management, which is on the same server as Master DB. My questions are: 1: How do I determine if server 1 or server 2 is down and it's time for application switching to use the DB backup on the other server. 2: What to do if the master DB server is down? 3: Is there a better approach than the above design to achieve the same goals: using different DB for different users, and achieving fast recovery by using the backup server? I would really appreciate any suggestion and help! Thanks in advance!
-
Dynamic DB Connection based on user typeI need to create an application: upon user login, check the user type and decide the database that application will use for that user. Here is what I have: 1: Master database: stores user information and application configuration data, such as which db to use and connection string 2: Database I on server 1: contains all the application data for user group I. 3: Database II on server 2: contains all the application data for user group II. 4: Database I backup on server 2: as backup for user group 1 in case server 1 fails. 5: Database II backup on server 1: as backup for user group 2 in case server 2 fails. 6: Through log shipping between server 1 and server 2 to keep DB I and I and their backup up-to-date. 7: The web site is running on web farm. The session state management is using SQL server session state management, which is on the same server as Master DB. My questions are: 1: How do I determine if server 1 or server 2 is down and it's time for application switching to use the DB backup on the other server. 2: What to do if the master DB server is down? 3: Is there a better approach than the above design to achieve the same goals: using different DB for different users, and achieving fast recovery by using the backup server? I would really appreciate any suggestion and help! Thanks in advance!
-
HELP! Dynamic DB Connection based on user typeI need to create an application: upon user login, check the user type and decide the database that application will use for that user. Here is what I have: 1: Master database: stores user information and application configuration data, such as which db to use and connection string 2: Database I on server 1: contains all the application data for user group I. 3: Database II on server 2: contains all the application data for user group II. 4: Database I backup on server 2: as backup for user group 1 in case server 1 fails. 5: Database II backup on server 1: as backup for user group 2 in case server 2 fails. 6: Through log shipping between server 1 and server 2 to keep DB I and I and their backup up-to-date. 7: The web site is running on web farm. The session state management is using SQL server session state management, which is on the same server as Master DB. My questions are: 1: How do I determine if server 1 or server 2 is down and it's time for application switching to use the DB backup on the other server. 2: What to do if the master DB server is down? 3: Is there a better approach than the above design to achieve the same goals: using different DB for different users, and achieving fast recovery by using the backup server? I would really appreciate any suggestion and help! Thanks in advance!
-
How to create a progress bar for button_click?Thank you very much! It looks very promising. I will give it try and see if it works.
-
How to create a progress bar for button_click?Thanks for responses! Do you know any examples that I can reference?
-
How to create a progress bar for button_click?I want to add a progress bar to my button click event, since the Button_Click event in code-behind does a lot of data process and sometime takes 3-4 minutes to finish. Does anyone have ideas how to do it? Any help would be very appreciated! Thanks!!
-
How to fire repeater table onresize event?Hi, I use repeater to list data from database. Once the repeater is populated, I want to get the column width for each column in the repeater table in javascript function. I am trying to do in table's onresize event. The code is shown as below: ... function getColumnWidth() { alert("List the width of each table column"); //get the width of column and do something }
Field1 value
Field2 value
Field3 value
... However, onresize event doesn't fire at all. If I use onmousemove, instead of onresize, the javascript function getColumnWidth() will get executed. But if the page is loaded, but the user doesn't move the mouse, then the javascript function will not be able to executed. Does anyone know what I need to do to make it work? Thanks in advance!
-
how to call DLL function in generic method?Thank you so much! That's exactly what I need. I mean both interface and polymorphism. Thank you for enlightening me! I will try both ways and let you know how it goes. Thanks again!
-
How to set the value for dropdownlist of AJAX autocomplete control?Hi, I am using Microsoft AJAX autocomplete to lookup some product from database. I am wondering if it's possible to access onSelected event of the dropdownlist. Actually, what I want to do is only display product name in dropdownlist, and keep product ID in value field of the dropdownlist. When a user select an item from the dropdownlist, I will retrieve the product ID from the dropdown control for futher action. But since the webservice only return one string and that string is populated into dropdownlist automatically. I couldn't find how to set the text and value for dropdownlist using diffrerent values.... Did anyone have idea how to achieve it? Any help would be really appreciated! Thanks!
-
how to call DLL function in generic method?Hi, I am trying to get my first generic method work. Here is what I want to do: Based on diffent type of users, we need to use different DLL. The DLL is COM object wrapper, which expose a function that can be called. The original code looks like the following: using System.Runtime.InteropServices; using AsynchWrapper1; using AsynchWrapper2; using AsynchWrapper3; .... namespace MyNameSpace { public class Unility { public static void CallAsynchWrapper(int clientType, int clientId) { if (clientType ==0) { clsAsynchWrapper1 asynchWrapper = new clsAsynchWrapper1(); asynchWrapper.XYZ(clientId); Marshal.ReleaseComObject(asynchWrapper); asynchWrapper = null; } else if (clientType ==1) { clsAsynchWrapper2 asynchWrapper = new clsAsynchWrapper2(); asynchWrapper.XYZ(clientId); Marshal.ReleaseComObject(asynchWrapper); asynchWrapper = null; } else { clsAsynchWrapper3 asynchWrapper = new clsAsynchWrapper3(); asynchWrapper.XYZ(clientId); Marshal.ReleaseComObject(asynchWrapper); asynchWrapper = null; } } } Where XYZ is the function that all 3 DLLs expose. I want to make a generic method by modifying the CallAsynchWrapper function doing the following: public static void CallAsynchWrapper(int clientType, int clientId) { if (clientType ==0) { clsAsynchWrapper1 asynchWrapper = new clsAsynchWrapper1(); genericCallAsynchWrapper(asynchWrapper, clientId); } else if (clientType ==1) { clsAsynchWrapper2 asynchWrapper = new clsAsynchWrapper2(); genericCallAsynchWrapper(asynchWrapper, clientId); } else { clsAsynchWrapper3 asynchWrapper = new clsAsynchWrapper3(); genericCallAsynchWrapper(asynchWrapper, clientId); } } and add a generic method: static void genericCallAsynchWrapper(T asynchWrapper, int clientId) { asynchWrapper.XYZ(clientId); Marshal.ReleaseComObject(asynchWrapper); asynchWrapper = default(T); } When I compile it, I got error message” T doesn’t have a definition of XYZ.”
-
Show/hide Div tag in popup window???I just found out the problem is caused by a stupid mistake. There is duplicated CssClass is defined, one is in Master page and is called CssHideDiv, the other is in .css file and is called CssHiddenDiv. The open widnow is not using master page, but is using CssHideDiv. This is a mistake introduced by multiple developers defining the same css class. Thanks for everybody's help! I appreciate it!
-
Show/hide Div tag in popup window???I have the following in .aspx page:
The OpenSuin .js file function OpenSummaryPage() { with(aspnetForm) { var url ="summary.aspx?comment=" + hdShowComment.value; window.open(url); } } The function in ascx.cs page is actually like this: public string ReturnVisibility() { string divCssClass= "CssShowDiv"; if (Page.Request.Url.ToString().IndexOf("page1.aspx") > 0) { divCssClass= "CssHideDiv"; } return divCssClass; } In .css file: .CssShowDiv{DISPLAY: true} .CssHideDiv{DISPLAY: none} Thanks for help!
-
Show/hide Div tag in popup window???Hi all, I have a div tag in my user control, and I want to show/hide this div based on which page I am on. So here is what I have now. in .ascx page,
....content
in ascx.cs page: public string ReturnVisibility() { string class= "CssShowDiv"; if (Page.Request.Url.ToString().IndexOf("page1.aspx") > 0) { class= "CssHideDiv"; } return class; } The result is that it works fine in a normal window. But if I open the page in a popup window using javascript, the div tag content always shows on the page, even though the class is CssHideDiv. Can anybody give me a hint what's wrong with my code? Thank you very much!
-
Show/hide Div tag in popup window???Hi all, I have a div tag in my user control, and I want to show/hide this div based on which page I am on. So here is what I have now. in .ascx page,
....content
in ascx.cs page: public string ReturnVisibility() { string class= "CssShowDiv"; if (Page.Request.Url.ToString().IndexOf("page1.aspx") > 0) { class= "CssHideDiv"; } return class; } The result is that it works fine in a normal window. But if I open the page in a popup window using javascript, the div tag content always shows on the page, even though the class is CssHideDiv. Can anybody give me a hint what's wrong with my code? Thank you very much!
-
Session timeout doesn't work when sessionState mode is SQL serverHi, Did anybody have experience the same issue? I am using SQLserver session state with trusted connection as shown below: sessionState mode="SQLServer" sqlConnectionString="data source=MydatabaseServername;integrated security=SSPI" cookieless="false" timeout="5" and form authentication After I login, I wait until sesssion timeout reachs, like 10 minutes, then click on other pages, I still can access. But if I wait for a much longer time, like 30 minutes, then click on other pages, I was logged out. It looks like the session timeout is still using default value 20 minutes, even though I set it as 5 minutes. But I couldn't confirm it. Does anyone have any ideas on it? Thanks in advance!
-
Fragment Cache questions???any suggestion would be appreciated!
-
Fragment Cache questions???Does anybody have experiences with Fragment cache? I have some trouble here... Basically, I have 3 dropdownlists, ddlAccountGroupType, ddlGroupName and ddlAccountID in a user control. The reason I use cache varybycontrol because ddlAccountID could contain over 8000 accounts. Once the selected index is changed in ddlAccountID, it will raise event handler to trigger the parent page to retrieve Order list and allow user to edit the order details. So, I have <%@OutputCache duration="600" varybycontrol="ddlAccountGroupType;ddlGroupName;ddlAccountID" %> on my .ascx file. The problem is , sometimes, when parent page do a postback, the second dropdownlist ddlGroupname become empty when it was supposed to have one single item "--ALL--". I couldn't figure out why it happens. I read about some discussion said, under memory pressure, the cached data could be removed before it reaches its expire date. Did anyone have similiar issue? I know you can set programmatic cache NotRemovable. Is there a way to set fragement cache NotRemovable? By the way, I read something about Cache does not work with Web Farms. Although my problem happens on my local development server, but my production server does use web farm. Do anyone have any thoughts or suggestions about this? Any help would be very appreciated! Thanks in advance!
-
Go to the top of the page after GridView rowcommand in UpdatePanel?I am using AJAX UpdatePanel for a GridView. The GridView has serveral row commands. Most of the row commands prefer to have the page staying at the same posistion after the command, except one command. That command will display a panel at the top of the page and the user will do something on the panel. It works fine when the list is short because the user can directly see the panel being displayed. However, when the list is very long, it doesn't work well. The reason is when a user click on that row command, the page still stay at the same position because UpdatePanel only does partial page postback. So the panel being display on the top of page won't be seen by the user. I think, probablly, to use javascript to reset the page position when that row command is clicked, but I don't know how to do it. Could everybody give me some hints, or does anybody have better ideas to do it? Thanks in advance!
-
select data from two tables ...???Hi, Thank you for your help! I have gotten the answer from other site: SELECT IsNull(T1.AccountID, T2.AccountID) AS AccountID, ISNull(T1.Symbol, T2.Symbol) AS Symbol, T1.Fee, T1.Price, T2.Share, T2.Dollar FROM Table1 AS T1 FULL OUTER JOIN Table2 AS T2 ON T1.AccountID = T2.AccountID AND T1.Symbol = T2.Symbol ORDER BY AccountID, Symbol It's basically the same as the post from jose.