I am new at using Visual Web Developer Express (C#). I understand how to create a website and to test it on my local computer, but I am having trouble understanding what is needed for to publish to website.
1. I have a test website called www.weddingdayplanner.net that I am using to test my VWD website. It is being hosted by
www.1and1.net . I it a business package with one SQL database included. The business package supports ASP.NET 2 but does not offer direct support for VWD Expresses templates (Personal or Club, etc...). My first question
is? Can I use www.1and1.net to publish my VWD website or should I look for a provider that offers direct support for VWD templates?
2. I have uploaded my webpages to the
www.weddingdayplanner.net for testing, and I have uploaded the aspnetdb.mdf to the db_database folder. I get the following error message.
Line 10: </connectionStrings>-->
Line 11:
Line 12: <connectionStrings>
Line 13: <add name="LocalSqlServer" connectionString="data source='mssql08.1and1.com';User ID='dboxxxxxxxxx';Password=xxxxxxxxx;database='zzzzzzzzz'" />
Line 14: </connectionStrings>
Thanks for replying. When I type in
www.weddingdayplanner.net the only error message is see is the one above. However, I did notice that it was showing my user name and password. I have changed the web.config file to prevent it from showing.
I am not sure where or what the full error message is?
<b> Description: </b>An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed
by browsers running on the local server machine.
<br><br>
<b>Details:</b> To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web
application. This <customErrors> tag should then have its "mode" attribute set to "Off".<br><br>
<b>Notes:</b> The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.<br><br>
CustomErrors should be Off. Is this IIS or the development server? Have you configured a virtual directory? If so, is it an application? Did you set the correct version of the framework if IIS?
Thanks for the reply. I have changed the CustomErrors to Off. For testing I am using my local computer with SQL Express running. For Publishing I am using a server that
www.1and1.com has setup for MS web hosting. I am not sure what a virtual directory or version of framework is?
Let me back track for a second. I am wanting to set up a personal website using MS VWD Express. My main interest in having the ability to create user accounts and set roles. I have created a website that works fine on the local computer. I have several
accounts with www.1and1.com using simple html pages for publishing. The account that I am using for testing is a business account that supports 2 SQL Databases and asp.net version 2.0.
What I am not sure of is that I can even set up users account with password access and roles on the
www.1and1.com account. Their tech support is conflicting and lacking good assistance at best.
What I do know is that I have to change the web.config file to have it point to the SQL database on
www.1and1.com server.
I have to upload the database to the SQL Server as a BAK file. Not sure how to do this.
I might have to inter information into the SQL database. Not sure what.
I'm not familiar with 1 and 1, but most web hosts have SQL Server 2005 and not Express. You need to run aspnet_regsql.exe to use the membership database on standard SQL, that may not be possible on your host. Uploading existing data depens on the tools
provided by your host. You may be able to upload the database file and attach it, do a backup/restore or even control their database directly with Enterprise Manager. Those are options you need to talk to 1 and 1 about.
RichardHite
0 Points
7 Posts
I need Help Getting publishing my website.
Mar 21, 2007 04:37 PM|LINK
I am new at using Visual Web Developer Express (C#). I understand how to create a website and to test it on my local computer, but I am having trouble understanding what is needed for to publish to website.
1. I have a test website called www.weddingdayplanner.net that I am using to test my VWD website. It is being hosted by www.1and1.net . I it a business package with one SQL database included. The business package supports ASP.NET 2 but does not offer direct support for VWD Expresses templates (Personal or Club, etc...). My first question is? Can I use www.1and1.net to publish my VWD website or should I look for a provider that offers direct support for VWD templates?
2. I have uploaded my webpages to the www.weddingdayplanner.net for testing, and I have uploaded the aspnetdb.mdf to the db_database folder. I get the following error message.
The following is my web.config file.
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<system.web>
<customErrors mode="Off"/>
<!--<connectionStrings>
<add name="LocalSqlServer"
connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
providerName="System.Data.SqlClient"/>
</connectionStrings>-->
<connectionStrings>
<add name="LocalSqlServer"
connectionString="data source='mssql08.1and1.com';User ID='dboxxxxxxxxx';Password=xxxxxxxxx;database='dbxxxxxxxxx'" />
</connectionStrings>
<roleManager enabled="true" />
<authentication mode="Forms" />
<membership>
<providers>
<remove name="AspNetSqlMembershipProvider"/>
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider" connectionStringName="LocalSqlServer" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="0" passwordStrengthRegularExpression=""/></
providers></
membership></
system.web></
configuration>____________________________________________
1and1.net offers the following inforamtion for connecting to a SQL database.
2.2 Accessing Your MS SQL Database Using ASP.NET
(This option is not supported for all packages.)
Log in to the 1&1 Control Panel, and on the My Account page choose the package you
would like to work on by clicking on it. This will bring you to the Package Administration
page. There, go to
'Applications' > 'MS SQL Administration' and retrieve the followingaccess data:
database name
user name
host name
password.
Make a note of this information. Use the following script to connect to your SQL database
and query a table.
<%@ 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
114
Windows
® Hosting Manual, 1&1 Internet Inc.MICROSOFT® DATABASES: MICROSOFT® SQL SERVER
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</title>
<body bgcolor="FFFFFF">
<h2>Query from table <b>products</b> with ASP.NET</h2>
<%Page_Data()%>
</body>
</html>
Highlighted code contains crucial information:
server
is the hostname.initial catalog
is the database name.uid
is the user name.pwd
is the password._________________________________
Any help would be appreciated.
Rick
jeff@zina.co...
All-Star
87677 Points
11637 Posts
Moderator
Re: I need Help Getting publishing my website.
Mar 21, 2007 08:07 PM|LINK
You just gave us the code causing the error. What was the FULL error message?
Jeff
JackBurton
Member
2 Points
3 Posts
Re: I need Help Getting publishing my website.
Mar 22, 2007 03:10 AM|LINK
Jeff:
Thanks for replying. When I type in www.weddingdayplanner.net the only error message is see is the one above. However, I did notice that it was showing my user name and password. I have changed the web.config file to prevent it from showing.
I am not sure where or what the full error message is?
Rick
jeff@zina.co...
All-Star
87677 Points
11637 Posts
Moderator
Re: I need Help Getting publishing my website.
Mar 22, 2007 10:05 AM|LINK
I've never seen an error message that just displays the code block. Copy and post the entire error page.
Jeff
ruckme
Member
159 Points
56 Posts
Re: I need Help Getting publishing my website.
Mar 22, 2007 02:26 PM|LINK
Change the section that your error msg shows from
And you should see the full error msgRichardHite
0 Points
7 Posts
Re: I need Help Getting publishing my website.
Mar 22, 2007 04:05 PM|LINK
Jeff:
I am not sure this is what you are looking for concerning the complete error message?
<html>
<head>
<title>Runtime Error</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
<script language='javascript' src='http://127.0.0.1:1029/js.cgi?pcaw&r=24221'></script>
</head>
<body bgcolor="white">
<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>
<h2> <i>Runtime Error</i> </h2></span>
<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">
<b> Description: </b>An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
<br><br>
<b>Details:</b> To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".<br><br>
<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration></pre></code>
</td>
</tr>
</table>
<br>
<b>Notes:</b> The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.<br><br>
<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration></pre></code>
</td>
</tr>
</table>
<br>
</body>
</html>
<script language='javascript'>postamble();</script>
Rick
RichardHite
0 Points
7 Posts
Re: I need Help Getting publishing my website.
Mar 22, 2007 04:09 PM|LINK
Jeff:
The following is the web.config file.
- <?
xml version="1.0" encoding="utf-8"?>I have also turned on the customerror mode to on.
Rick
jeff@zina.co...
All-Star
87677 Points
11637 Posts
Moderator
Re: I need Help Getting publishing my website.
Mar 26, 2007 03:53 AM|LINK
CustomErrors should be Off. Is this IIS or the development server? Have you configured a virtual directory? If so, is it an application? Did you set the correct version of the framework if IIS?
Jeff
RichardHite
0 Points
7 Posts
Re: I need Help publishing my website.
Mar 27, 2007 08:43 PM|LINK
Jeff:
Thanks for the reply. I have changed the CustomErrors to Off. For testing I am using my local computer with SQL Express running. For Publishing I am using a server that www.1and1.com has setup for MS web hosting. I am not sure what a virtual directory or version of framework is?
Let me back track for a second. I am wanting to set up a personal website using MS VWD Express. My main interest in having the ability to create user accounts and set roles. I have created a website that works fine on the local computer. I have several accounts with www.1and1.com using simple html pages for publishing. The account that I am using for testing is a business account that supports 2 SQL Databases and asp.net version 2.0.
What I am not sure of is that I can even set up users account with password access and roles on the www.1and1.com account. Their tech support is conflicting and lacking good assistance at best.
What I do know is that I have to change the web.config file to have it point to the SQL database on www.1and1.com server.
I have to upload the database to the SQL Server as a BAK file. Not sure how to do this.
I might have to inter information into the SQL database. Not sure what.
Not sure where to go from here.
Rick
jeff@zina.co...
All-Star
87677 Points
11637 Posts
Moderator
Re: I need Help publishing my website.
Mar 28, 2007 11:05 AM|LINK
I'm not familiar with 1 and 1, but most web hosts have SQL Server 2005 and not Express. You need to run aspnet_regsql.exe to use the membership database on standard SQL, that may not be possible on your host. Uploading existing data depens on the tools provided by your host. You may be able to upload the database file and attach it, do a backup/restore or even control their database directly with Enterprise Manager. Those are options you need to talk to 1 and 1 about.
Jeff