|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
i have a problem . please help meI am writing ASP.NET application using SQL Server 2005 Express Edition. my connection string is : "Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\DB.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"; I used connection strings syntax from www.connectionstrings.com. this app work in IIS very well but when i upload it on the host i reiceve this error : 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) please help me if you can ? *** Sent via Developersdex http://www.developersdex.com *** 1. Do you know what is Sql Server Express' USER INSTANCE? If not necessary
study is due. 2. Does your host use SQL Server Express or other version SQL Server (Standard Edition or upper)? USER INSTANCE is only available for SQL Server Express. 3. Do you need to use USER INSTANCE in a web application? Why? Unless your host use SQL Server Express (unlikely if it is comnercial hosing services provider), you would focus your study on: 1. forget USER INSTANCE and study on basic SQL Server security: configure SQL Server logins, database users; 2. Configure ASP.NET security, so that you know which user account is requyired to run the ASP.NET app, hence give needed access permission to SQL Server/database to that user account, or configure ASP.NET to run under given user account. If the SQL Server and your web app are on different computer, you need to staudy a bit more on this topic. 3. change your connection string so that you do not attach/detach datatbase to SQL Server each time the app connects to SQL Server Express. I mean, even the host uses SQL Server Express, you probably do not need to use USER INSTANCE for your web application, the database should be attached to the SQL Server at beginning what you setup the website. Show quote "hamid hashemi" <hamid_h1***@yahoo.com> wrote in message news:e8xqDkJFIHA.5044@TK2MSFTNGP03.phx.gbl... > > > Hello, > I am writing ASP.NET application using SQL Server 2005 Express Edition. > my connection string is : > "Data > Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\DB.mdf;Integrated > Security=True;Connect Timeout=30;User Instance=True"; > > > I used connection strings syntax from www.connectionstrings.com. > this app work in IIS very well > but when i upload it on the host i reiceve this error : > 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) > > please help me if you can ? > > *** Sent via Developersdex http://www.developersdex.com *** On Mon, 22 Oct 2007 03:47:58 -0700, hamid hashemi
<hamid_h1***@yahoo.com> wrote: Show quote > Does the web host have SQL Express installed?> >Hello, >I am writing ASP.NET application using SQL Server 2005 Express Edition. >my connection string is : >"Data >Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\DB.mdf;Integrated >Security=True;Connect Timeout=30;User Instance=True"; > > >I used connection strings syntax from www.connectionstrings.com. > this app work in IIS very well >but when i upload it on the host i reiceve this error : >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) > >please help me if you can ? > >*** Sent via Developersdex http://www.developersdex.com *** |
|||||||||||||||||||||||