views:

23

answers:

0

Hello all,

Here is the problem :

I have a brand new web application in VS 2010, Framework 3.5 I have a very simple web.config with the connectionStrings node :

 <connectionStrings>

The Web.Release.Config is like this :

<?xml version="1.0" encoding="utf-8"?>

Then i create a deployment package using VS 2010. I copy all the zip file along with all other file in a foler on my IIS Server.

I import the package using IIS user interface.

Finally, here is the web.config I have in my app :

  <connectionStrings>
<add name="StockDatabaseConnectionString"
  connectionString="{% token='$(ReplacableToken_#(parameter)_#(tokennumber))' xpathlocator='name' parameter='StockDatabaseConnectionString-Web.config Connection String' description='StockDatabaseConnectionString Chaîne de connexion utilisée dans web.config par l'application pour accéder à la base de données.' defaultValue='Data Source=NDTEST2;Initial Catalog=NatDecStocks;User ID=ND_InternetUser;password=1ND_@Internet_User3;' tags='SqlConnectionString' %}"
  providerName="System.Data.SqlClient"/>

As you can see, the connection string is not replaced as it should.

I have the exact same problem when i deploy the application with Web Deploy.

It is a shame because web.config transformation is a great feature but i can't get it to work.

Tanhks for helping.