dev6546
dev6546

Reputation: 1442

asp site will not work when uploading to web server?

     <?xml version="1.0"?>
<configuration>
  <connectionStrings>
    <add name="rde_410978ConnectionString" connectionString="Data Source=SQL2008.net.dcs.hull.ac.uk;Initial Catalog=rde_410978;Integrated Security=True"
      providerName="System.Data.SqlClient" />
  </connectionStrings>
  <system.web>
    <compilation debug="true" targetFramework="4.0"/>
  </system.web>
</configuration>

Here is my config file. I'm publishing it to the server by going to build > publish website.

None of the errors are due to the server as the university has set it up and it's working correctly for other people.

the error:

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: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.

Source Error: 


Line 16: 
Line 17:   <system.web>
Line 18:     <compilation debug="false" strict="false" explicit="true" targetFramework="4.0" />
Line 19: 
Line 20:     <authentication mode="Forms">


Source File: C:\RDEUsers\NET\410978\web.config    Line: 18 

Upvotes: 0

Views: 4982

Answers (2)

Akina91
Akina91

Reputation: 332

I think its because of the .net version of the Deployment Environment, which I presume is not 4.0.

Check it up with others if they have the same target Framework listed i.e. 4.0.

Upvotes: 1

Internet Engineer
Internet Engineer

Reputation: 2534

Did you check IIS?

Sometimes IIS is set to a different framework.

http://technet.microsoft.com/en-us/library/cc754523(v=ws.10).aspx

Here is a similar problem and solution:

http://forums.asp.net/t/1491204.aspx/1

Upvotes: 3

Related Questions