From: dcawkwell on 30 Aug 2010 08:56 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"
|
Pages: 1 Prev: embed a third party's page in my page Next: Energy Saving Tips |