Framework Error on Page Load

Discussion in 'Getting started' started by JErnewein, May 4, 2011.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. This is the first time I've ever tried publishing a site. I'm getting an error
    "<compilation debug="true" targetFramework="4.0">"
    when I try to access my website. Work fine locally. What is going on?
     
  2. I have found the solution here. I just had to change my framework from 3.5 to 4 in the control panel. Now I have a new issue.

    Configuration Error

    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

    Parser Error Message: Could not load file or assembly 'System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
     
  3. After reading some posts online they said I need to set the Copy Local Property of the References to True. I did that and I still have this issue.

    When I connect to the server with filezilla I can see the .dlls in the bin directory.
     
  4. Bruce

    Bruce DiscountASP.NET Staff

    what dll do you have in the bin directory?

    did you upload System.Web.Helpers.dll?
     
  5. I have figured it out. It was trying to look in a sub directory for the file.

    I just have one more issue if you could help me out with it Bruce.

    I'm using the connection string (password removed)

    <add name="MyDBEntities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=tcp:sql2k804.discountasp.net;Initial Catalog=SQL2008R2_816188_ernewein;User ID=SQL2008R2_816188_ernewein_user;Password=******;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />

    It works fine when i run locally, connects to the remote SQL server fine, but after i publish the site and try to login on the site, it doesn't work. It gives me the Error 26
    "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)"

    Any idea?
     
  6. ...Does your Conn string actually look like that?
     
  7. It does, is there something wrong with that? It was auto generated for me when connected to the DASP SQL server and setting up an ADO model (using the default name Model1)
     
  8. ...That is indeed messed up.
    Use this example but replace the server settings:
    <connectionStrings>
    <clear />
    <add name="MyDBEntities" connectionString="Data Source=tcp:sql.discountasp.net;Initial Catalog=SQL_user;User ID=SQLuser;Password=*******" providerName="System.Data.SqlClient" />
    </connectionStrings>
     
  9. All done! Thanks for your help. I ended up needing two connection strings, one for the ADO.net objects and one for the sql connection.
     
  10. ...Awesome.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page