none
Unable to connect to Oracle database while Building application for Windows Azure Cloud ???

    Question


  • We have an application developed in ASP.Net and running on Oracle Database. Now, we have decided to port it to Windows Azure Cloud. Since the major portion of the application is based on Oracle, so we are trying to keep the database same as Oracle, concentrating on migrating the application as cloud service. Initially we are trying to modify the application in such a way so that it can run on local Development Fabrick. Bur while doing so, we are not able to establish connection to the Oracle database.

    Now, my question is can we build a cloud-based application to run on local development fabrick connecting Oracle database or to be more precise does Windows Azure support Oracle as a database?
    • Moved by SrikumarV Wednesday, September 29, 2010 12:00 AM Migration (From:Windows Azure AppFabric)
    Monday, January 18, 2010 1:33 PM

Answers

  • Hi,

    This is a CAS (Code Access Security) related exception. Could you please right click the WebRole in Roles folder of Cloud Service that appears in the Solution Explorer window and click "Properties"? Then check ".NET trust level" and make sure full trust is selected.

    A solution that can definitely work is to create an intermediate WCF service running on your intranet. You can use Service Bus in AppFabric to do so. Then the way to access data would be:

    ASP.NET--through Service Bus--> WCF Data Services running locally-> ADO.NET Entity Data Model for Oracle-> Oracle DB


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Friday, January 22, 2010 1:50 AM
  • Hello,
    After you run the application in Full Trust, you can try installing, configuring and Using PortBridge (it will save you from writing your own WCF Service, Allen Chen it talking about) from:

    http://blogs.msdn.com/clemensv/archive/2009/11/18/port-bridge.aspx

    The sample is with SQL Azure, but the idea is that you shall be to connect to any service outside Azure.
    I would have suggested SocketShifter which was a project like portbridge, but is no longer maintained since PortBridge is more mature:
    http://socketshifter.codeplex.com/

    Hope this will help you!
    Saturday, January 23, 2010 10:33 AM

All replies

  • Hi,

    I haven't tested myself but in theory it should work, at least, in dev fabirc. What error did you get? Do you mean the same ASP.NET application works but when you add it as a Web Role of a Cloud service project it doesn't work? Did you test on the same machine?
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Wednesday, January 20, 2010 1:14 PM
  • Yes , I tested on the same machine. It 's giving error like

    Request for the permission of type 'System.Data.OracleClient.OraclePermission, System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

    but the same application is working fine if I don't add as cloud service.

    What could be the reason ?

    Now my intention is hosting the application in cloud as  service keeping the Oracle database outside the cloud environment. Microsoft , no where mentioned that they would  support the Oracle DB as a hosted service .

    Thanks.

    Thursday, January 21, 2010 2:38 PM
  • Hi,

    This is a CAS (Code Access Security) related exception. Could you please right click the WebRole in Roles folder of Cloud Service that appears in the Solution Explorer window and click "Properties"? Then check ".NET trust level" and make sure full trust is selected.

    A solution that can definitely work is to create an intermediate WCF service running on your intranet. You can use Service Bus in AppFabric to do so. Then the way to access data would be:

    ASP.NET--through Service Bus--> WCF Data Services running locally-> ADO.NET Entity Data Model for Oracle-> Oracle DB


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Friday, January 22, 2010 1:50 AM
  • Hello,
    After you run the application in Full Trust, you can try installing, configuring and Using PortBridge (it will save you from writing your own WCF Service, Allen Chen it talking about) from:

    http://blogs.msdn.com/clemensv/archive/2009/11/18/port-bridge.aspx

    The sample is with SQL Azure, but the idea is that you shall be to connect to any service outside Azure.
    I would have suggested SocketShifter which was a project like portbridge, but is no longer maintained since PortBridge is more mature:
    http://socketshifter.codeplex.com/

    Hope this will help you!
    Saturday, January 23, 2010 10:33 AM
  • Allen and Anton ,

    Thanks a lot  for your suggestion. It worked but I am still not able to connect the hosted application with on-premise Oracle database. I need to figure it out ..might be some connection & configuration related issues.


    Thanks again !


    Monday, January 25, 2010 1:00 PM