Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 12th, 2008, 05:30 AM
Authorized User
 
Join Date: Mar 2008
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default testing locally but using remote connection string

Is it possible to test my site locally but use remote connection strings?

I need to run some tests involving freetext but using the online database on the remote server. Is this possible?

I could make a new site and upload to that to test or purchase sql2005 with full text search facillities and test the code on that but both are not idea.

Any ideas?

The error code I get when running on the local host using the remote connection strings is:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)




 
Old August 12th, 2008, 06:03 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

Jez,

yep this is entirely possible and the connection string is literally the same string that you use remotely. as an example, here's the one that i use for a site for my originaltalent database from my local machine:

    <connectionStrings>
        <remove name="OriginalLocalSqlServer"/>

        <add name="OriginalLocalSqlServer" connectionString="Server=sql381.mysite4now.com;Dat abase=originaltalent;uid=accountuserid;pwd=account password;" providerName="System.Data.SqlClient"/>
    </connectionStrings>

if i need to use the local installation, i just remove the comment lines on the 1st entry and comment out the 'remote' line.

this works 100% for me but i suppose it will depend on your hosting provider regarding incoming connections etc...



jimi

http://www.originaltalent.com
 
Old August 12th, 2008, 06:20 AM
Authorized User
 
Join Date: Mar 2008
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the quick response.

I have tried using my remote string. As you stated maybe my hosts don't allow access to it. This seems odd as I can access the remote database via my sqlexpress using the same log in.
I have play with it and see it the hosts can help, if not its time to test online which is a bit of a hassle. Wish I had the full sql2005.

 
Old August 12th, 2008, 06:44 AM
Authorized User
 
Join Date: Mar 2008
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Jimi,

Solved it!!

I had a look at your connection string and relised I didn't have the full path to the online database! anyway, I'm grateful for your response and happy that i can now test my code and stored procedures to my hearts content.

:D

 
Old August 12th, 2008, 07:28 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

Jez,

glad you got it sorted. it's usually a dotting the i's crossing the t's type thing :)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote Desktop Connection hari raghav Windows Server 3 June 9th, 2008 12:46 PM
Testing a String gabster XSLT 2 August 15th, 2007 12:13 PM
Testing a string for digits bonekrusher XSLT 2 March 18th, 2007 02:48 PM
Testing connection andrejv Java Databases 2 September 23rd, 2003 09:33 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.