473,834 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ADO.NET - Transparent Client Redirect (not working?)

I have a database setup using SQL Server Mirroring. My database
servers are running SQL Server 2005 SP1, Enterprise Edition.

I have created a windows application that will insert a record into my
mirrored database by clicking a button. (connection string below)

If I run my test application I can successfully insert a record into
the database as expected. However, if I take down the principal (the
mirror becomes the principal) and if I try to insert another record it
does not succeed. I get a SQL timeout exception. If I close the
application and restart it I can successfully insert a new record
(where the old mirror is now principal). What do I need to do to be
able to not close the application to take advantage of the "transparen t
client redirect" that ADO.NET boasts about?

SqlConnection.C onnectionString :
Server=sql1; Failover Partner=sql2; Database=TestMi rror;
Network=dbmssoc n; uid=sa; pwd=mypass

Thanks,
- Ian

Jun 1 '06 #1
1 4688
I found the answer to my own question.

See this KB article:
http://support.microsoft.com/kb/912151

If you don't obtain the hotfix and wait for the service pack you can
switch your code to use use System.Data.Ole Db instead of
System.Data.Sql Client.

Make sure your connection string looks similar to this:
"Provider=SQLNC LI;Server=sql1; Failover Partner=sql2;
Database=TestMi rror; Network=dbmssoc n; uid=sa; pwd=mypass"

Hope this helps!

Thanks,
Ian

Ian Jenkins, MCSD wrote:
I have a database setup using SQL Server Mirroring. My database
servers are running SQL Server 2005 SP1, Enterprise Edition.

I have created a windows application that will insert a record into my
mirrored database by clicking a button. (connection string below)

If I run my test application I can successfully insert a record into
the database as expected. However, if I take down the principal (the
mirror becomes the principal) and if I try to insert another record it
does not succeed. I get a SQL timeout exception. If I close the
application and restart it I can successfully insert a new record
(where the old mirror is now principal). What do I need to do to be
able to not close the application to take advantage of the "transparen t
client redirect" that ADO.NET boasts about?

SqlConnection.C onnectionString :
Server=sql1; Failover Partner=sql2; Database=TestMi rror;
Network=dbmssoc n; uid=sa; pwd=mypass

Thanks,
- Ian


Jun 1 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
4803
by: paul koelle | last post by:
Hi list, My ultimate goal is to have a small HTTP proxy which is able to show a message specific to clients name/ip/status then handle the original request normally either by redirecting the client, or acting as a proxy. I started with a modified version of TinyHTTPProxy postet by Suzuki Hisao somewhere in 2003 to this list and tried to extend it to my needs. It works quite well if I configure my client to use it, but using iptables...
0
1093
by: mazda_88 | last post by:
I working on a project where there is a lot of legacy asp code and it is uses encryption and server redirect to hide the url from the end user. Since server.transfer does not allow query strings, perl was used to implement the server redirect. Basically the perl script decrypts the query string, creates a web client, accesses the web page based on the query string and then displays the page to the user. I know that there are a number of...
4
5072
by: Sharon | last post by:
Hi all, Can any one explain the relationship between real & transparent proxy? I couldn't fully understand it from the explanation at MSDN. Thanks, Sharon.
8
2155
by: MikeB | last post by:
Hi, I created a picturebox with a map as an image. I want to make certain areas on the map clickable hotspots and the way I'm trying to do this is to create a transparent label with a different cursor (hand) and then I code the click_event for that label. However, I cannot make the label transparent, even if I choose the Transparent option for the attribute for the background color of the label. Any ideas or suggestions? Thanks
4
10251
by: Dale | last post by:
I am creating GIF images with transparent backgrounds on-the-fly for a web app and rendering them by using System.Drawing.Image.Save(Response.OutputStream, ImageType.GIF). I am confident that the transparency is working properly because if I save the created image to the local hard disk and then view it in a web page or an image editor, the transparency is correct. I can also view the transparency on-the-fly in a Windows.Forms...
0
1598
by: Martin | last post by:
In server-side code of Page1.aspx, in the click eventhandler for an imagebutton, I branch to another page: Response.Redirect("Page2.aspx") But the client-side javascript on Page2.aspx is breaking because it cannot find my function.
7
2793
by: Electric Co. | last post by:
Hello, note: This is for a Faculty web site that is undergoing a migration to an open source solution so my motives are legit. I need to build a relay from IIS handling URL_A to a PHP server (URL_B), get the content from the PHP server (if it exists) and then serve it out via IIS. If the content does not exist then I need to pass the request through to the IIS server and serve the pages from there. All of this needs to be done...
2
4414
by: Hannibal | last post by:
Hi All, The below code use to work on my Win2K3 IIS6. for for some unknown reason it`s no longer working. here the code. Session("LOGIN_USER_ID") = UserID ' Update the cookie if the login is successful Response.Buffer = True Response.Cookies(strAppRoot).Domain = strHelpdeskServer
33
2670
by: rvj | last post by:
if you redirect on an IIS , must the client url address bar always be updated with the new address. what options are? Q1 if a user requests http://old.com , is there a method of ASP redirection to http://new.com which does not update the client browser's address bar Q2 ... or is this one of the main benefits of the IIS URL rewriter ??
0
9643
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10789
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10214
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9327
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7755
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6951
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5624
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5790
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3079
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.