views:

329

answers:

3
+1  Q: 

web.config error

i am trying to deploy my website to my host and get following error message on my web. config file:

The configuration section 'connectionStrings' cannot be read because it is missing a section declaration

at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

the connectionstring is declared as follows:

<connectionStrings configSource="ConnectionStrings.config"/>

and in corresponding connectionStrings.config file:

<connectionStrings>
  <add name="" connectionString="Provider=SQLOLEDB; Data Source=dataSource;Initial Catalog=databaseName;User Id=userName;Password=password;Integrated Security=True;Persist Security Info=False;Connect Timeout=120" />
</connectionStrings>

The web.config file is not encrypted and I am at a loss

+1  A: 

Hi!

If your application is configured to run with the .NET framework 1.1 but you developed it for .NET Framework 2.0 (or higher) the web.config file is different and has this "connectionStrings" XML node.

You should check the configuration of your site in the Internet Information Server. Right click on the website, choose properties and look at the ASP.NET tab. If 1.1 is selected, change it to 2.0 instead.

Hope this helps.

jdecuyper
A: 

Simply delete the section declaration and add an "providerName=System.Data.SqlClient" (for instance) attribute

Nissim
A: 

Does your web.config contain at tag? Is there a tag in it? If so, the following might work for you: http://foxsys.blogspot.com/2009/05/iis7-errorgotcha-webconfig.html

Trajanus