1

I have an ASP.NET website (not web application) and I publish it using the 'publish' option (to five Windows Servers (2003)).

My development PC contains version 11 of Oracle (DataAccess.dll) and the web servers use version 10. I cannot downgrade my development machine because it has Windows 7 and this is incompatible with version 10. I cannot upgrade the server to version 11 because whilst Windows Server 2003 is compatible it doesn't seem to work very well with Oracle 11. I have ensured that the server is patched up.

Therefore when publishing the website I have the following line in the web.config:

<add assembly="Oracle.DataAccess, Version=10.2.0.100, Culture=neutral, PublicKeyToken=89B483F429C47342"/>

Then once the web app is published, I manually change the web.config. Is there an automated way of doing this, perhaps using the build scripts? Would it help if I converted into a web application?

w0051977
  • 15,099
  • 32
  • 152
  • 329

1 Answers1

1

What you need is web.config transformation available in Visual Studio 2010.

You can find "how to" here

Davor Zlotrg
  • 6,020
  • 2
  • 33
  • 51
  • Thanks, but I am using Visual Studio 2008. – w0051977 Mar 04 '13 at 20:15
  • 1
    @jrummell yes it does, it is a bit trickier though [Using Web.config Transformation in Web Site Projects](http://andrewtwest.com/2010/02/25/using-web-config-transformations-in-web-site-projects/) – Davor Zlotrg Mar 04 '13 at 20:19
  • @DZL, is there a solution for visual studio 2008? – w0051977 Mar 04 '13 at 20:28
  • @w0051977 I haven't tried it with vs2008 but here is a similar question that might help you http://stackoverflow.com/questions/4024401/web-config-transformations-in-vs2008 – Davor Zlotrg Mar 04 '13 at 20:30
  • @DZL, I have downloaded WDP. Can you specify what I should specify in web config section replacements for add assembly? – w0051977 Mar 04 '13 at 23:25
  • @w0051977 What have you come up with so far? Edit the question to include that information. You should create something like AppSettings.config and and AppSettings.Live.config and use it in a web.config like and – Davor Zlotrg Mar 05 '13 at 15:28
  • Thanks, the like was quite useful. +1. Are you able to answer my other deployment question here: http://stackoverflow.com/questions/15244028/net-microsoft-common-targets-namespace? – w0051977 Mar 06 '13 at 20:51