Shopping cart AspNetSqlProfileProvider

D

dcawkwell

Hello,

I am new to asp .net programming and have been using the book ASP.net
3.5 for dummies.

I had the shopping cart on chapter 18 working it seems to use a class
to store cart items using a profile but now I am getting an error. I
show the error and the entry in web.config.
Any ideas what has changed on my system to stop this working. I did
install SQL Server 2008 on my PC but the website code is straight from
the book downloaded and not changed.


A network-related or instance-specific error occurred while
establishing a connection to SQL Server. The server was not found or
was not accessible. Verify that the instance name is correct and that
SQL Server is configured to 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: A network-
related or instance-specific error occurred while establishing a
connection to SQL Server. The server was not found or was not
accessible. Verify that the instance name is correct and that SQL
Server is configured to allow remote connections. (provider: SQL
Network Interfaces, error: 26 - Error Locating Server/Instance
Specified)

Source Error:


Line 22: Public Overridable Property ShoppingCart() As
ShoppingCart
Line 23: Get
Line 24: Return
CType(Me.GetPropertyValue("ShoppingCart"),ShoppingCart)
Line 25: End Get
Line 26: Set
------------------
web.config entry

<profile enabled="true" defaultProvider="AspNetSqlProfileProvider">
<properties>
<add name="ShoppingCart" type="ShoppingCart"
serializeAs="Xml" allowAnonymous="true"/>
</properties>
</profile>


<anonymousIdentification enabled="true"
cookieless="UseCookies"
cookieName=".ASPXANONYMOUS" cookieTimeout="100000"
cookiePath="/" cookieRequireSSL="false"
cookieSlidingExpiration = "true" cookieProtection="None"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top