Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Unable to get shopping cart working on shared hosting site

Posted on 2013-01-10
6
Medium Priority
?
713 Views
Last Modified: 2013-01-14
I created a simple shopping cart for a restaurant and when I test it locally it works fine on my computer.  However when I upload it to the server I receive the following error

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)

Line 19:     public virtual ShoppingCart.Cart SCart {
Line 20:         get {
Line 21:             return ((ShoppingCart.Cart)(this.GetPropertyValue("SCart")));
Line 22:         }
Line 23:         set {



I do feel that my connection settings in the config file are correct since I am able to view information from the database, and insert information.

The problem occurs when I click on the "Add to Shopping Cart" button which calls on a temporary class and for some reason it does not work when I try it on the hosting server

Can someone please help me I've looked at this for awhile now and I can't figure it out.

Also it seems that on the source file that the code is trying to create a temporary class.  It seems that is what is throwing the error

Source File: c:\windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a4671715\bf5a33a7\App_Code.8nkl1ye6.5.cs    Line: 21

I think part of it might have to do with my web.config file which has the following settings
<system.web>
     <webParts enableExport="true"></webParts>
    <customErrors mode="Off"/>
      <authorization>
          <allow users="?"/>
          <allow roles="admin"/>
      </authorization>
      <roleManager enabled="true"/>
      <authentication mode="Forms"/>
    <anonymousIdentification enabled="true"/>
    <profile enabled="true">
      <properties>
        <add name="SCart" serializeAs="Binary" type="ShoppingCart.Cart" allowAnonymous="true" />
        
      </properties>
    </profile>
      <compilation targetFramework="4.0" debug="true">
          <assemblies>
              <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
              <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
              <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
              <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
              <add assembly="System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
              <add assembly="System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
          </assemblies>
      </compilation>
      <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
          <namespaces>
              <clear />
              <add namespace="System" />
              <add namespace="System.Collections" />
              <add namespace="System.Collections.Generic" />
              <add namespace="System.Collections.Specialized" />
              <add namespace="System.Configuration" />
              <add namespace="System.Text" />
              <add namespace="System.Text.RegularExpressions" />
              <add namespace="System.Linq" />
              <add namespace="System.Xml.Linq" />
              <add namespace="System.Web" />
              <add namespace="System.Web.Caching" />
              <add namespace="System.Web.SessionState" />
              <add namespace="System.Web.Security" />
              <add namespace="System.Web.Profile" />
              <add namespace="System.Web.UI" />
              <add namespace="System.Web.UI.WebControls" />
              <add namespace="System.Web.UI.WebControls.WebParts" />
              <add namespace="System.Web.UI.HtmlControls" />
          </namespaces>
      </pages>
  </system.web>

Open in new window


BTW - I'm using GoDaddy Shared Hosting Plan
0
Comment
Question by:Ru1995
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 23

Assisted Solution

by:Roopesh Reddy
Roopesh Reddy earned 2000 total points
ID: 38765996
0
 

Author Comment

by:Ru1995
ID: 38766046
Yes I did see that page earlier and I followed the advice that was given but then I received a " Login failed for user 'PHX3\Iusr_9046331'." error

I couldn't find anything on that.  Do you have any other suggestions?
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 38766105
Godaddy database servers are not on the same machine as your web hosting files, they are on their own dedicated machines.  You need to go to your hosting admin page and look for the correct info for your SQL server hostname and login.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 23

Accepted Solution

by:
Roopesh Reddy earned 2000 total points
ID: 38769322
0
 

Author Comment

by:Ru1995
ID: 38775976
Sorry I haven't posted on this for awhile I had to take a break.  I'll see if roopeshreddy post works and get back to everyone
0
 

Author Closing Comment

by:Ru1995
ID: 38776860
Thanks for all the help it turned out the configuration setting for the aspnetdb were wrong and I just reconfigured it to point towards the main sql server database instead
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question