Web Deployment problem ... please, need help.

S

shapper

Hello,

I am using VS 2008 and and just downloaded Web Deployment Projects:
http://connect.live.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=319288

I need the connection string in my web site Web.config file to be
replaced.

So I created a new file named ConnectionStrings.config that contains
only the following:

<connectionStrings>
<add name = "MyConn" connectionString = "Provider =
Microsoft.Jet.OLEDB.4.0; Data Source = C:\MyDomain\\wwwroot\App_Data
\DB.mdb; User Id=; Password=;" providerName = "System.Data.OleDb" />
</connectionStrings>

And in my Web Deployment Web.Config File Section Replacements I have:

connectionStrings=ConnectionStrings.config;

I get the following error:
web.config(1): error WDP00002: missing section connectionStrings

What am I doing wrong?

And just another question on the side:
Is it possible to have 2 files: ConnectionStrings.config and
ConnectionStringsServer.config.

The first would have the connectionStrings section to be used in my
computer.
The second would have the connectionStrings section to be used when
deploying the web site to the server.

Thanks,
Miguel
 
M

Mark Rae [MVP]

I get the following error:
web.config(1): error WDP00002: missing section connectionStrings
What am I doing wrong?

Does your web.config *definitely* contain a <connectionStrings> section one
level down from the <configuration> root? E.g.

<configuration>
<connectionStrings>

</connectionStrings>
</configuration>

If I remove it from the web.config in one of my projects and then try to
rebuild the WDP, I get exactly the same error as you...
And just another question on the side:
Is it possible to have 2 files: ConnectionStrings.config and
ConnectionStringsServer.config.

The first would have the connectionStrings section to be used in my
computer.
The second would have the connectionStrings section to be used when
deploying the web site to the server.

Yes, but what would be the point...? WDP is for deployment only...
 
S

shapper

Does your web.config *definitely* contain a <connectionStrings> section one
level down from the <configuration> root? E.g.

<configuration>
<connectionStrings>

</connectionStrings>
</configuration>

If I remove it from the web.config in one of my projects and then try to
rebuild the WDP, I get exactly the same error as you...



Yes, but what would be the point...? WDP is for deployment only...

Hi,

I was able to solve it using the information on the following article:
http://weblogs.asp.net/lkempe/archi...-vs08-released-as-ctp-amp-migration-tips.aspx

What do you think?

Thanks,
Miguel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top