Tuesday, April 5, 2011

Getting Novell SSL VPN working on Windows 7

I use the Novell Access Manager SSL VPN to connect to one of my customer's networks. It is a browser-based VPN client which means that you have to login via the browser and then keep the browser window open to maintain the VPN connection.

According to the documentation it will work with both Windows and Mac, and with IE, Firefox and Safari. Well it doesn't for me! Initially the only combination I could get working was IE under Windows XP. With a bit of fiddling I've finally managed to get it working for Windows 7. I write these notes for when I need to set this up again!

Attempting to launch the VPN client from IE on Windows 7 initially gives this error message:

AM.1804 : Connection to service failed.


Consulting the Novell Access Manager SSL VPN manual says that you should watch the <Users> folder. If you are quick enough, you'll see these files appear:


novl-sslvpn-service-install.exe
cacert.pem
openvpnclient.msi
PrivilegeDetector.exe
vplogin.dll


...along with a few log files. You do have to be quick though because they are deleted almost immediately.

The manual instructs you to shutdown your browser, run the novl-sslvpn-service-install.exe EXE manually and then start the browser and all should be working.

Instead, I took a simpler (and probably far less secure) route. I removed the User Account Access Control restrictions. I changed them from "Notify me when programs try to make changes to my computer" to "Never notify me". This can be done via Control Panel-User Accounts-Change User Account Control Settings

User Account Control Settings

Change from Default to "Never Notify" and click OK. After confirming this change you will be prompted to restart your computer. Once it has restarted, the SSL VPN should work! Note that it does take a while to connect and you'll have to confirm to install some insecure driver software, but it works.

Monday, March 21, 2011

Using log4net with shared DLLs


I've got a C# DLL that is used from a number of different places, including .Net EXEs, VB6 EXEs, Work and Outlook COMAddIns and also Outlook forms. It uses log4net for tracing and debugging.

I'd found log4net to be pretty reliable BUT sometimes messages weren't ending up in my log file (usually when I really needed them!). Most recently this happened today when I was trying to trace a problem in my Outlook form. I'd drag the appointment in Outlook which would fire the Item Write event on the form and, although I could loo kin the DB and see that my DLL was working, nothing was showing up in the log4net log file.



How to Investigate the Problem


To find out what was really happening, I used log4net's internal debugging. In the case of an Outlook Form, I switched it on like this:




  1. Started Outlook

  2. Started Visual Studio and opened my DLL project

  3. Switched on log4net internal debugging by modifying my log4net configuration file and changed the <log4net> to read <log4net debug="true">

  4. Used "Tools-Attach to Process" and attached to the Outlook.exe process

  5. Placed a breakpoint in the project on a line that I knew it should encounter

  6. Ran the test again...



The Problem


When I ran the test again with log4net debugging switched on, I could clearly see that log4net was unable to write to my logfile because it was locked. I didn't obviously have it locked (I had it open in TextPad but closing that didn't fix the problem). A quick scout around revealed that log4net with the RollingFileAppender by default will lock the file and keep it locked. Clearly this was the problem in my case where multiple programs all use my DLL which writes to the same logfile.



The Solution


I do want all of the instances of my DLL to write to the same log file, but I don't want them to lock the file and keep each other out. The solution was to add the following to the appender section of my log4net configuration file:




<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />



This instructs log4net to get the lock, write and release the lock every time - so it doesn't keep the file locked. With this in place, all of my DLL instances now write to the logfile, ALL of the time! There is a slight performance overhead to this approach, but then I'd rather than it works slowly, than not working quickly!

Tuesday, July 27, 2010

ORA-06508 error calling package in different schema


I had a PL/SQL package (let's call it PACKAGE_A) in schema SCHEMA_A which called a procedure in PACKAGE_B in SCHEMA_B. When I added a new parameter to the procedure in PACKAGE_B, I got some very strange errors showing up in PACKAGE_A. After trying all combinations of compiling PACKAGE_A and PACKAGE_B and REVOKEing and GRANTing EXECUTE rights to PACKAGE_B, I was consistently coming up with this Oracle error when I ran PACKAGE_A:



ORA-06508: PL/SQL: could not find program unit being called


Note that PACKAGE_A would compile fine, it just wouldn't run. I finally managed to get rid of this error by logging off my PL/SQL session in SCHEMA_A and then logging back in. After that, my PACKAGE_A call worked fine. "When in doubt, reboot!" A pretty old-school solution but it was the answer in this case!



NB. Oracle Version 10g Enterprise Edition 10.2.0.2.0

Monday, February 22, 2010

"The form required to view this message cannot be displayed" error accessing Organizational Forms Library in Outlook 2003


I had a VB6 program running on a server using Outlook 2003 client to create appointments. The appointments used a custom Outlook form stored in the Organizational Forms Library. Suddenly the program started spitting out this error:



"The form required to view this message cannot be display. Contact your administrator."



If I used the Outlook Client (on the server) to try to design the form via Tools-Forms-Design Form-Organizational Forms Library-{shift}+Open then I got the following error message:



"The form you selected cannot be displayed. The form required to view this message cannot be display. Contact your administrator."



The solution was to clear the Outlook Forms cache. This can be done via:





  1. Click on the "Tools" menu

  2. Click on "Options"

  3. Click on the "Other" tab

  4. Click the "Advanced Options" button

  5. Click the "Custom Forms" button

  6. Click the "Manage Forms" button

  7. Click the "Clear Cache" button

  8. Close and OK through all Outlook Property/Option windows




Credit for these steps from http://www.experts-exchange.com/Software/Server_Software/Email_Servers/Exchange/Q_24342937.html

Wednesday, February 17, 2010

Compile All Invalid Oracle objects

If you add a column to a table that invalidates lots of packages, triggers, views etc then you'll need to compile all of these invalidated objects. And each of these objects might in turn invalidate more - so this can take a few cycles.





I use the SQL statement below to generate the COMPILE statements for all invalid objects. I then copy and paste the COMPILE statements into a SQL session and run them (compiling them). Then I run the code below again (and compile again...etc) until no more are found.


SELECT 'ALTER '
||decode(object_type,'PACKAGE BODY','PACKAGE', object_type)
||' '||object_name||' COMPILE'
||decode(object_type,'PACKAGE BODY',' BODY', '')||';'
FROM user_objects
WHERE status = 'INVALID'
AND object_type <> 'SYNONYM'


The output from this (which I paste into a SQL window to run) will be something like:


ALTER TRIGGER CUST_AUI COMPILE;
ALTER PACKAGE CUST_PKG COMPILE;
ALTER PACKAGE CUST_PKG COMPILE BODY;
ALTER VIEW CUST_VW COMPILE;
ALTER PACKAGE CUST_AUDIT_PKG COMPILE BODY;

Monday, October 5, 2009

Adding HTTP Authentication for a user in Subversion

If you've already got your HTTP Authentication setup (instructions for that can be found here) then you can add a new user (eg. xyz) like this:


$htpasswd2 -m /etc/svn-auth-file xyz


Note that for Apache 2, you use the htpasswd2 command, NOT htpasswd.

Monday, May 4, 2009

Solution to the ORABEL-08021 "partnerlink not found" problem!

I was seeing an ORABPEL-08021 error when calling a Oracle BPEL web service via C# in .Net. Specifically, the error returned was:


<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<env:Fault xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode xmlns="">env:Server</faultcode>
<faultstring xmlns="">ORABPEL-08021 Cannot find partner wsdl. parnterLink "MyService" is not found in process "MyService" (revision "1.0") Please check the deployment descriptor of the process to find the correct partnerLink name.
</faultstring>
<faultactor xmlns=""></faultactor>
</env:Fault>
</env:Body>
</env:Envelope>


The problem was that I was using the wrong URI to access the service. I was using:

http://myserver:8888/orabpel/default/MyService/1.0/MyService

and I should have been using:

http://myserver:8888/orabpel/default/MyService/1.0

So, my own silly fault really! Normally I can take the WSDL address (eg. http://myserver:8888/orabpel/default/MyService/1.0/MyService?wsdl) and just drop the "?wsdl" off the end to get the service endpoint. Not with these Oracle BPEL services though. If I had bothered to read the WSDL, I would have seen that the endpoint address is clearly specified. One more thing to note: with an Oracle BPEL service, you can also drop the version number off the end and it will still work, calling the latest version by default. eg:

http://myserver:8888/orabpel/default/MyService