Developing with Android behind a http proxy


I wanted to create a small android app that made REST requests and then showed the output.  I wrote the code and tried running the AVD.  In the debugger I saw the http request run but it acted like it was timing out.  I quickly realized that I needed two things.

    1. I needed to add INTERNET access to the AndroidManifest.xml.
    2. I needed to make my Android Virtual Device (AVD) know that it was behind a proxy.

Sites I used for help

Updating the AndroidManifest.xml file

  • Open the AndroidManifest.xml file in Eclipse
    image
  • Click on the Permissions tab at the bottom
    image
  • Click the “Add” button => choose Uses Permission => Click “OK”
    image
  • Type “android.permission.INTERNET” in the textbox and then click on the “Uses Permission” item on the left.  You will see your new permission has been added.
    image image

Setting up the HTTP proxy for your AVD

  • In Eclipse, click Run on the menu and choose Run Configurations
    image
  • Click the Target tab, find the Additional Emulator Command Line Options textbox and put in your proxy.  An example would be –http-proxy http://myproxyaddress.com:8080.  The colon and port number at the end are optional.
    image
  • Click Apply and then Close.

How to install Oracle Data Provider (ODP) 10 on Windows 7


I recently found myself in an unfortunate situation.  I needed to support a .NET site that used ODP 10.  The problem is that I use Windows 7 and Oracle Data Provider 10 doesn’t want to install.  It comes back with error “Checking operating system version:  must be 4.0, 5.0, 5.1, 5.2 or 6.0.  Actual 6.1”. (see error image below)

image

If only there was a way to get it to install on OS version 6.1…  Follow the steps below to get it to install.  Let me be clear about a few things first:

  • I did not discover this solution on my own.  I usually try and link to any sites that helped me along the way but in this instance the fix comes from something I learned while trying to fix another problem awhile ago.  I really wish I knew  to whom the real credit should go.
  • I don’t believe this is a supported solution.  I needed this to work with ODP 10 and for various reasons, installing ODP 11 which is supported on Windows 7 was not an option.

Problem Summary

  • I want to install ODP 10.2.0.2.21 on Windows 7 64-bit.  You can find the ODP 10 file about halfway down the page here.

Solution

  • Find and edit the Oraparam.ini file. (located inside the “install” folder after the ODP 10 is extracted)
    image
  • Find the line that says Windows=4.0,5.0,5.1,5.2,6.0 and edit it to say Windows=4.0,5.0,5.1,5.2,6.0,6.1 instead. 
    image
  • Save the file and start the installation process using setup.exe.  Don’t forget to run the setup file as an Administrator (right-click file => Run as Administrator)
  • After everything installs correctly make sure you do the following tasks so that it will work in IIS
    • Make sure you create a proper tnsnames.ora file inside folder C:\oracle\product\10.2.0\client_1\NETWORK\ADMIN
    • Make sure that the userid that runs your website’s IIS app pool has read access to C:\oracle\product\10.2.0\client_1\BIN
    • This one drove me crazy until I figured it out… The ODP 10 that I installed is 32 bit. Make sure you set your app pool in IIS to also be in 32 bit mode. You may skip this step if your windows 7 is not 64-bit.
      • Open up IIS and find the application pool that runs your site
      • Right-click the app pool and choose Advanced Settings…
      • Change property Enable 32-bit Applications to be True
        image

That’s all there is to it. I hope it helps you as much as it did me.

Add a New Server to an Existing Windows Server 2008 Domain


In an earlier post I showed how to create a new domain in my virtual machine farm that i called “jovinus”.  This post will show how to add another computer into that domain.

Assumptions

  • You have an existing Windows Server 2008 domain already set up.
  • You have a newly installed server that needs to be joined to the existing domain.

Join the domain

On the new server open up the Server Manager, choose the Change System Properties link on the right, click the Change button, choose the Domain radio button, type in the name of the domain you wish to join, and click OK.  I chose “jovinus”.

image image

You should get a username/password prompt that pops up.

image

You should type in the username and password of an account that is a member of the Domain Admins group.  For me I used the Administrator username/password of my Domain Controller.  This will allow a new computer account to be set up in the domain.

image

After I clicked OK I got the following error – “An attempt to resolve the DNS name of a domain controller in the domain being joined has failed.  Please verify this client is configured to reach a DNS server that can resolve DNS names in the target domain.

image

I got the error because my router provides DHCP for my machines and the router doesn’t know how to resolve the “jovinus” domain to an IP.  Below are the steps I took to solve this problem…

  1. On my new server I opened up the Network and Sharing Center and changed my network from a public on to a Work Network.
    image
  2. I still want my router to provide DHCP services to my virtual servers, however, I want it to assign a static IP address to my Domain Controller.  So, I reserved the IP address for it.  In my case this was 192.168.1.209.
  3. On my new server I opened up the properties of my Network Adapter, chose to edit the properties for TCP/IPv4, and defined the IP address of my Domain Controller manually.
    image

After I performed the steps above I click OK on the error message and tried again.  It took a little while but I got a box that popped up welcoming me to the domain.
image

 

Login to the new domain

I was asked to restart my PC and after that I saw my usual login prompt.  That’s not what I wanted.  You need to choose Switch User and select Other User.  Now you’ll see that you’re attempting to log on to the “jovinus” domain.
image

There’s just one problem… I haven’t set up any users in my Active Directory so I don’t have anyone to log on with.  To see how to set up a new user in Active Directory check out my post here.  After you have a domain user created you’ll be able to log on with it.

Design a site like this with WordPress.com
Get started