Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 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 April 1st, 2010, 02:37 PM
Friend of Wrox
 
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts
Smile Error while connecting to SQL server

Hello,

When ever I try to connect to server through Microsoft sql server management studio express then an error is generated saying that

Cannot connect to <server name>

Additional Information

A network related or instance specfic error occured while connecting to SQL server. The server not found or not accessible verify that instance name is correct and that SQL server is configured to allow remote connections.(Provider: Named Pipes Provider, error 40-could not open connection to SQL server )(Microsoft SQL server, Error:53)

Also when I try to execute the .sql file to server using control panel then I have the following error.

The following error occured while executing the query:
Server: Msg 208, Level 16, State 1, Line 3
Invalid object name 'sys.foreign_keys'.

script file has the following text

IF EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Picture_PhotoAlbum]') AND parent_object_id = OBJECT_ID(N'[dbo].[Picture]'))

...........................script goes on

I have taken all necessary steps mentioned in book but I always get failure notice.

I am using web host provider and I have all information in hand viz. server name, user name , password and trying to connect through these credentials but I fail while connecting to SQL server.
please try to provide solution to the problem.
Thank you.

Last edited by sophia; April 1st, 2010 at 04:17 PM..
 
Old April 2nd, 2010, 03:20 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Quote:
I am using web host provider and I have all information in hand viz
Are you sure your hosts enables you to connect to your database over the Internet? Maybe the server name and credentials are supposed to be used only within their network? E.g. from the web site you have there to their SQL Server with your database?

You need to talk to your host and find out if they support this. Some do; others don't....

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old April 5th, 2010, 11:16 AM
Friend of Wrox
 
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts
Smile

Hello sir,
when ever I try to run the script in their control panel then it always gets me error. I have run the same script on the local host and it is working fine so I am sure that it is technically valid.
But in their control panel it always get me error.
here is the excerpt of the script

Code:
ÿþ/****** Object:  ForeignKey [FK__aspnet_Me__Appli__145C0A3F]    Script Date: 03/30/2010 22:33:38 ******/


IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK__aspnet_Me__Appli__145C0A3F]') AND parent_object_id = OBJECT_ID(N'[dbo].[aspnet_Membership]'))


ALTER TABLE [dbo].[aspnet_Membership] DROP CONSTRAINT [FK__aspnet_Me__Appli__145C0A3F]


GO

rest of the file goes here....
whenever I upload script file directly in control panel then a symbol ÿþ is added in the starting of file. Even after removing the symbol manually and executing again it reports error as

The following error occured while executing the query:
Server: Msg 2812, Level 16, State 1, Line 3
Invalid object name 'sys.foreign_keys'.

Please help me regarding this because without database it would not be possible to have a site.

thank you sir.
 
Old April 5th, 2010, 04:49 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

I think you'll need to talk to your host, as clearly something is wrong om their side. Maybe you can send them the file so they can run it for you?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old April 6th, 2010, 04:35 AM
Friend of Wrox
 
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts
Smile

Hello Sir,
Thank you for your reply. I have sent them all script files, it may be right for the first time but sub sequentially it takes a lot time as the request is processed and then taken action and it may cause problem when site will be published. So is there possible to request for a different control panel which works fine. Or kindly can you please tell me the name of web host that you use because if problem continues then I have only one option that is to change the web host provider.
Anyways thank you sir.
 
Old April 6th, 2010, 04:44 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I host my own sites, so I always have full control over the server and database engine.

For other hosts, you may want to take a look here: http://www.asp.net/find-a-hoster/

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old April 6th, 2010, 08:59 AM
Friend of Wrox
 
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts
Smile

Thank you sir for giving names of different web host providers
Quote:
I host my own sites, so I always have full control over the server and database engine.
Sir it means you have your own server with high configuration set up so that you can host your sites at your own system/server? just curious. If this is then it is great and keep it up
Thank you
 
Old April 6th, 2010, 09:13 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Not sure what you mean with "high configuration", but yes, I have my own server that hosts most of my web sites...

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
error on connecting to sql server angelboy C# 2005 9 March 29th, 2007 07:56 AM
URGENT:Connecting SQL server through Proxy server abhowal Pro VB Databases 2 January 9th, 2006 01:47 PM
ASP error when connecting to a new SQL server Cinderella Classic ASP Basics 2 June 21st, 2005 10:00 AM
Error in connecting to sql server 2000 using asp method SQL Server 2000 1 March 7th, 2005 11:05 PM
URGENT:Connecting SQL server through Proxy server sankar SQL Server 2000 0 August 26th, 2003 03:50 AM





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