Here is my conncetion string for 1and1. I am styarting over; I have 2 MS SQL databases that I can use but I am lost and want to use this personal web kit.
Here is how they say I need to connect to my MS SQL DB
<%@ Page Language="VB" %>
<script runat="server">
Sub Page_Data
Dim oDR as System.Data.SQLClient.SQLDataReader
Dim oCom As System.Data.SQLClient.SqlCommand
Dim oConn as System.Data.SQLClient.SQLConnection
try
oConn = New System.Data.SQLClient.SQLConnection ("server=mssqlxxx.1and1.com; initial catalog=dbxxxxxxxxx;uid=dboxxxxxxxxx;pwd=xxxxxxxx")
oConn.Open()
oCom = New System.Data.SQLClient.SqlCommand()
oCom.Connection = oConn
oCom.CommandText = "SELECT * FROM products"
oDR = oCom.ExecuteReader()
While oDR.Read
Response.Write(oDR.Item("id") & ", " & oDR.Item("price"))
Response.Write("<BR/>")
End While
catch
Response.Write("Error:" & err.Description)
Finally
oDR = Nothing
oCom = Nothing
oConn.Close()
oConn = Nothing
end try
End Sub
</script>
<html>
<title>Queries from the MS-SQL database with ASP.NET</title>
<body bgcolor="FFFFFF">
<h2>Query from table <b>products</b> with ASP.NET</h2>
<%Page_Data()%>
</body>
</html> HELP PLEASE .
I started from scratch again; I have been with 1and1 for a few years just using HTMLwith no problems. I have the deveolper package: there has to be a way to make this work.
When I log into my online access to my MS SQL it hace a conncetion string of: Provider=sqloledb;Data Source=mssqlXX.1and1.com,1433;Initial Catalog=db21XXXXXXXX;User Id=dbo2153XXXXX;Password=*****;
Thanks for looking at it.
Russ
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)
Description:
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: 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)
Source Error:
Line 194: Using command As New SqlCommand("GetNonEmptyAlbums", connection)
Line 195: command.CommandType = CommandType.StoredProcedure
Line 196: connection.Open()
Line 197: Dim list As New Generic.List(Of Album)()
Line 198: Using reader As SqlDataReader = command.ExecuteReader
in the UK 1and1 do not allow web pages running/executing locally (ie on yr PC) to access MS SQL on their server. what is required is that you load yr page up to the live server and test it there.
for development purposes have 2 web.config files with two seperate connection strings. 1 that connects to your local MSSQL and one that connects to the one in yr hosting package.
I have a business account with 1and1 and I've been trying to setup the same website template but I've been experiencing the same problem. I spoke with a Customer Support rep, who told me that they do not support SQL Express. The being the case, I'm going
to try delpoying to a SQL Server 2005 database instead. Also, we'll have to modify the the connection string by replacing the |DataDirectory|
with the path provided by 1and1.
None
0 Points
9 Posts
Trying to connect and set up database using 1and1.com
Aug 31, 2007 08:37 PM|rgkimball|LINK
Here is my conncetion string for 1and1. I am styarting over; I have 2 MS SQL databases that I can use but I am lost and want to use this personal web kit.
Here is the connection string they give:
Current connection string :
Provider=sqloledb;Data Source=mssql07.1and1.com,1433;Initial Catalog=dbxxxxxxx;User Id=dbo2xxxxxxxx;Password=*****;
Here is how they say I need to connect to my MS SQL DB
<%@ Page Language="VB" %>
<script runat="server">
Sub Page_Data
Dim oDR as System.Data.SQLClient.SQLDataReader
Dim oCom As System.Data.SQLClient.SqlCommand
Dim oConn as System.Data.SQLClient.SQLConnection
try
oConn = New System.Data.SQLClient.SQLConnection ("server=mssqlxxx.1and1.com; initial catalog=dbxxxxxxxxx;uid=dboxxxxxxxxx;pwd=xxxxxxxx")
oConn.Open()
oCom = New System.Data.SQLClient.SqlCommand()
oCom.Connection = oConn
oCom.CommandText = "SELECT * FROM products"
oDR = oCom.ExecuteReader()
While oDR.Read
Response.Write(oDR.Item("id") & ", " & oDR.Item("price"))
Response.Write("<BR/>")
End While
catch
Response.Write("Error:" & err.Description)
Finally
oDR = Nothing
oCom = Nothing
oConn.Close()
oConn = Nothing
end try
End Sub
</script>
<html>
<title>Queries from the MS-SQL database with ASP.NET</title>
<body bgcolor="FFFFFF">
<h2>Query from table <b>products</b> with ASP.NET</h2>
<%Page_Data()%>
</body>
</html>
HELP PLEASE .
Member
130 Points
542 Posts
Re: Trying to connect and set up database using 1and1.com
Aug 31, 2007 11:00 PM|jwadsworth|LINK
What error are you getting?
Extended Personal Site Starter kit
None
0 Points
9 Posts
Re: Trying to connect and set up database using 1and1.com
Aug 31, 2007 11:21 PM|rgkimball|LINK
I started from scratch again; I have been with 1and1 for a few years just using HTMLwith no problems. I have the deveolper package: there has to be a way to make this work.
When I log into my online access to my MS SQL it hace a conncetion string of: Provider=sqloledb;Data Source=mssqlXX.1and1.com,1433;Initial Catalog=db21XXXXXXXX;User Id=dbo2153XXXXX;Password=*****;
Thanks for looking at it.
Russ
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)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Data.SqlClient.SqlException: 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)
Source Error:
Source File: E:\kunden\homepages\43\d103481118\App_Code\PhotoManager.vb Line: 196
Stack Trace:
Member
2 Points
34 Posts
Re: Trying to connect and set up database using 1and1.com
Oct 01, 2007 11:38 AM|mahfield|LINK
Hi,
in the UK 1and1 do not allow web pages running/executing locally (ie on yr PC) to access MS SQL on their server. what is required is that you load yr page up to the live server and test it there.
for development purposes have 2 web.config files with two seperate connection strings. 1 that connects to your local MSSQL and one that connects to the one in yr hosting package.
hope this helps, let me know.
matt a
None
0 Points
10 Posts
Re: Trying to connect and set up database using 1and1.com
Oct 04, 2007 01:38 AM|PizzaStick|LINK
Did you get this working rgkimball?
Member
1 Points
7 Posts
Re: Trying to connect and set up database using 1and1.com
Nov 17, 2007 01:13 PM|ftest|LINK
Dear rgkimball,
I am using 1and1 as well and I am having the same issue.
How did you resolve your?
Thanks
Flaubert
Member
1 Points
7 Posts
Re: Trying to connect and set up database using 1and1.com
Nov 17, 2007 01:40 PM|ftest|LINK
Matt,
Please help me,
this the web.config file that comes with the personal web kit,
please guide me step by step on what to change in the config file to make this work.
<
configuration> <connectionStrings><
add name="Personal" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Personal.mdf" providerName="System.Data.SqlClient" /> <remove name="LocalSqlServer"/><
add name="LocalSqlServer" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|aspnetdb.mdf" /> </connectionStrings><
system.web> <pages styleSheetTheme="White"/><
customErrors mode="RemoteOnly"/> <compilation debug="false"/><
authentication mode="Forms"> <forms loginUrl="Default.aspx" protection="Validation" timeout="300" /></
authentication> <authorization><
allow users="*"/> </authorization><
globalization requestEncoding="utf-8" responseEncoding="utf-8"/> <roleManager enabled="true"/><
siteMap defaultProvider="XmlSiteMapProvider" enabled="true"> <providers><
add name="XmlSiteMapProvider" description="SiteMap provider which reads in .sitemap XML files." type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="web.sitemap" securityTrimmingEnabled="true"/></
providers> </siteMap></
system.web> <location path="Admin"><
system.web> <authorization><
allow roles="Administrators"/> <deny users="*"/></
authorization> </system.web> </location></
configuration>Member
1 Points
7 Posts
Re: Trying to connect and set up database using 1and1.com
Nov 17, 2007 01:40 PM|ftest|LINK
Matt,
Please help me,
this the web.config file that comes with the personal web kit,
please guide me step by step on what to change in the config file to make this work.
<
configuration> <connectionStrings><
add name="Personal" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Personal.mdf" providerName="System.Data.SqlClient" /> <remove name="LocalSqlServer"/><
add name="LocalSqlServer" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|aspnetdb.mdf" /> </connectionStrings><
system.web> <pages styleSheetTheme="White"/><
customErrors mode="RemoteOnly"/> <compilation debug="false"/><
authentication mode="Forms"> <forms loginUrl="Default.aspx" protection="Validation" timeout="300" /></
authentication> <authorization><
allow users="*"/> </authorization><
globalization requestEncoding="utf-8" responseEncoding="utf-8"/> <roleManager enabled="true"/><
siteMap defaultProvider="XmlSiteMapProvider" enabled="true"> <providers><
add name="XmlSiteMapProvider" description="SiteMap provider which reads in .sitemap XML files." type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="web.sitemap" securityTrimmingEnabled="true"/></
providers> </siteMap></
system.web> <location path="Admin"><
system.web> <authorization><
allow roles="Administrators"/> <deny users="*"/></
authorization> </system.web> </location></
configuration>None
0 Points
3 Posts
Re: Trying to connect and set up database using 1and1.com
Nov 28, 2007 05:07 PM|mzwetk|LINK
Hi,
I have a business account with 1and1 and I've been trying to setup the same website template but I've been experiencing the same problem. I spoke with a Customer Support rep, who told me that they do not support SQL Express. The being the case, I'm going to try delpoying to a SQL Server 2005 database instead. Also, we'll have to modify the the connection string by replacing the |DataDirectory| with the path provided by 1and1.
Mike