1

Good day!

After watching a video I was able to summarize the steps I needed as such:

Steps in configuring and deploying to IIS ASP.NET 1. Create directory

example:

C:/inetpub/wwwroot/mvcauction

  1. Open internet information services Manager
  2. Right-click default website
  3. Add application.
  4. Choose website name. example mvcauction
  5. Paste the directory you created in step 1.
  6. Click select button.
  7. Make sure that the property has .net framework version 4.0
  8. Click ok.

  9. Go to your visual studio IDE.

  10. Righ-click on the project file in the solution explorer.
  11. CLick publish
  12. Click publish profile drop down and select new. Add a profile name. Example: Local IIS Website
  13. Choose publish method File System
  14. Use step one's directory for the Target location
  15. configuarion: Release
  16. Choose local IIS Website.

  17. Expect an error.

  18. Open visual studio command prompt.
  19. Execute this command: sqllocaldb share v11.0 IIS_DB
  20. Update your web config. Refer to the paint screenshot.
  21. Publish again in iis manager.

if not yet ok:

  1. Go to visual studio again.
  2. Open data base explorer.
  3. Right-Click to data connections to add connection.
  4. For the server name: Enter the value that we are using in the config file data source. Example (LocalDB).\IIS_DB
  5. Click ok
  6. Righ-Click on the new connection added.'
  7. Choose new query.
  8. Execute the shown commands.
  9. Go to the browser and refresh.

However I cannot finish step 21 which I conclude is because the tutorial did not use oracle database as its data source. I cannot publish my visual studio project successfully. So, please, does anyone here know what to put in the web config file?

This is my web config file:

<configuration>
<system.web>
  <compilation debug="true" strict="false" explicit="true" targetFramework="4.5" />
  <httpRuntime targetFramework="4.5"  />
</system.web>



<connectionStrings>
    <add name="OracleConnectionString" connectionString="Data Source=localhost;USER ID=userid;PASSWORD=password"
      providerName="Oracle.DataAccess.Client" />
    <add name="ConnectionString" connectionString="Provider=MSDAORA;Data Source=localhost;Password=password;User ID=userid"
      providerName="System.Data.OleDb" />
  </connectionStrings>

  <appSettings>
    <add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />
  </appSettings>


</configuration>
TDL
  • 126
  • 2
  • 13
  • Just edited my post. – TDL Nov 20 '15 at 13:59
  • You could try using the connect strings format as the `TNS` way like: `Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=service_name)));USER ID=user;PASSWORD=passwd;` – kayess Nov 20 '15 at 14:19
  • 1
    What does "cannot publish successfully" mean and why can't you edit a web.config file? Do you get a runtime error? That would be useful information to include. – mason Nov 20 '15 at 14:20
  • As the question is unclear to me at more points, but you will need to install/reference the ODP.NET [x86](https://www.nuget.org/packages/odp.net.x86/) or the [x64](https://www.nuget.org/packages/odp.net.x64/) package in order to be able to connect to an Oracle instance. – kayess Nov 20 '15 at 14:24
  • @kayess I will try that. I get this error There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "Oracle.DataAccess, Version=4.112.2.0, Culture=neutral – TDL Nov 20 '15 at 14:26
  • @TDL edit additional info to your question. But the problem shows that your projects `Target CPU` doesn't match the ODP version, check for x86 or x64. – kayess Nov 20 '15 at 14:51
  • @kayess That is not necessarily true. The managed Oracle client is available which has no external dependencies. I described it in [this answer](http://stackoverflow.com/questions/3935808/how-can-i-deploy-a-net-application-that-uses-odac-without-installing-the-whole/23746644#23746644). – mason Nov 20 '15 at 14:54

0 Answers0