SACommand cmd = new SACommand( "SET TEMPORARY OPTION connection_authentication='Company=XXX Inc;Application=XXXX;Signature=010fa55157edb8e14z813eb4fe3db41447846f1571g6470c2dce685f48eae9e472027825d02d41gc206';", connPC); cmd.ExecuteNonQuery();

above is how I have my .net app attempting to authenticate.... I always get a -218 error..

This is pretty much identical to the example in the Sybase documentation.....

Any ideas what is wrong...

Note: The Signiture above has been changed from my actual one.... I use copy and paste to get the proper one into my application thus I am sure I do not have a typo...

asked 04 Jan '12, 01:44

TPS's gravatar image

TPS
196111320
accept rate: 0%

edited 04 Jan '12, 03:44

Volker%20Barth's gravatar image

Volker Barth
30.0k294448654

IMHO, the string looks resaonable. What happens when you use that statement to authenticate within DBISQL or dbisqlc?

Have you checked that the database itself is authenticated correctly, say with

select db_property('Authenticated')
(04 Jan '12, 03:43) Volker Barth
1

To authenticate the connexion, I use the InitString property of the connexion object. Something as :

myConn = new SAConnection("my_connexion_string");

myConn.InitString = "SET TEMPORARY OPTION CONNECTION_AUTHENTICATION = 'my_authentication_string'";

myConn.Open();

(04 Jan '12, 07:07) Costa

Which build of 12 are you using? We also had authentication issues because our Application name has a single quote on it. This was addressed in a later build of SA12.

(04 Jan '12, 09:15) Derli Marcochi

The error -218 indicates that there is some problem with the authentication string. Try the following:

  • restart the database after the DATABASE_AUTHENTICATION has been set
  • verify the authentication option values match those provided in the email (without additional characters or truncation)
  • ensure proper formatting of special characters such as quotation marks for the application development environment

If you continue to have problems, you will likely need to work with support who can review the option values in more detail.

permanent link

answered 04 Jan '12, 10:48

Chris%20Keating's gravatar image

Chris Keating
2.6k1647
accept rate: 27%

Comment Text Removed

I think this was my bad:

After going through this over again 3 times : being much more careful on the copy / paste. It appears to work. At least 3 test cases without error.

Keeping myfingers crossed....

It is definitly extreamly sensitive to being exact format........

Thanks for the feedback....

permanent link

answered 04 Jan '12, 11:40

TPS's gravatar image

TPS
196111320
accept rate: 0%

Been there, too - I remember to have fiddled around with a DSN with the authentication string as part of the InitString - and then to find out that I just had silently omitted the last character while copying the authentication string...

(04 Jan '12, 11:53) Volker Barth

We have also seen times where copying and pasting from a program where the text went more than one line copied the line breaks, which are not part of the string.

(04 Jan '12, 14:40) Siger Matt
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×22
×19

question asked: 04 Jan '12, 01:44

question was seen: 1,013 times

last updated: 04 Jan '12, 14:40