This is very basic, I know. It has to be, as I'm a beginner completely. Anyway...
The personal web site works fine on my local computer. I did nothing at all to it. It is built completely by the wizard, and looks good:)
I then copied it up to my web host provider. My account is "Windows 2003 Server .NET 2.0 package, from IPowerWeb". It copied without any errors.
I connect my browser to it, and receive an error:
---------------------------------------------------------------------
Server Error in '/' Application.
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 6: { Line 7: SiteMap.SiteMapResolve += new SiteMapResolveEventHandler(AppendQueryString); Line 8: if (!Roles.RoleExists("Administrators")) Roles.CreateRole("Administrators"); Line 9: if (!Roles.RoleExists("Friends")) Roles.CreateRole("Friends"); Line 10: } |
Source File:
c:\Accounts\navisanc\wwwroot\Global.asax
Line: 8
Stack
Trace:
[SqlException (0x80131904): 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)] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +735091
|
Here is my web config, expertly written by Visual Studio 2005:
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<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="Black"/>
<customErrors mode="Off"/>
<compilation debug="true"/>
<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>
Thanks if you can tell me how an unmodified, functional personal web site sample is to be deployed as apparently its not as easy as copying it to the server.