PDA

View Full Version : Framework Error on Page Load


JErnewein
05-04-2011, 06:47 PM
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?

JErnewein
05-04-2011, 07:18 PM
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.

JErnewein
05-04-2011, 07:45 PM
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.

bruce
05-05-2011, 10:22 AM
what dll do you have in the bin directory?

did you upload System.Web.Helpers.dll?

JErnewein
05-05-2011, 06:14 PM
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?

wisemx
05-06-2011, 04:25 AM
...Does your Conn string actually look like that?

JErnewein
05-06-2011, 01:01 PM
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)

wisemx
05-06-2011, 05:01 PM
...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>

JErnewein
05-06-2011, 09:30 PM
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.

wisemx
05-07-2011, 04:41 AM
...Awesome.