|
-
Sep 6th, 2012, 11:46 AM
#1
Thread Starter
New Member
Connection string to use Windows Authentication for iSeries in Visual Basic.net 2010
Hello,
I have created an application in visual basic.net 2010 using iSeries ODBC. Application works fine, but other users from different PC are unable to run the program due to user ID is invalid and password invalid. Error 2800. I am using file DSN below partial snap shot of the App. Config.
<connectionStrings>
<add name="SeminarUploadWindowsApplication.My.MySettings.ConnectionStringFileDSN"
connectionString="Driver={iSeries Access ODBC Driver};system=S10B1163;dftpkglib=QGPL;languageid=ENU;pkg=QGPL/DEFAULT(IBM),2,0,1,0,512;qrystglmt=-1;libview=1;conntype=2"
providerName="System.Data.Odbc" />
</connectionStrings>
The connection string I am using doesn't seems to use Windows Authentication (below)
Driver={iSeries Access ODBC Driver};system=S10B1163;dftpkglib=QGPL;languageid=ENU;pkg=QGPL/DEFAULT(IBM),2,0,1,0,512;qrystglmt=-1;libview=1;conntype=2
I have looked at various websites for string connection, but all with specified user ID and password.
If anybody can give me the proper connection for Windows Authentication from iSeries I would appreciate the help. Thank you.
-
Sep 7th, 2012, 01:06 AM
#2
Re: Connection string to use Windows Authentication for iSeries in Visual Basic.net 2
Have you installed iseries odbc drivers on all users? Perhaps you could look into the isearies db user configuration. There might be an issue with that.
Cheers..
-
Sep 7th, 2012, 09:58 AM
#3
Thread Starter
New Member
Re: Connection string to use Windows Authentication for iSeries in Visual Basic.net 2
KGComputers,
Thanks for your tip. My user have iSeries odbc and works properly, I created Excel programs using odbc and works fine, my VB program works fine in my PC, but the user can't run the program in their PC due to invaild user ID and incorrect password.
-
Sep 7th, 2012, 12:42 PM
#4
Re: Connection string to use Windows Authentication for iSeries in Visual Basic.net 2
If you're using DSN, then the username & password configuration would be in that DSN configuration... based on your description, it sounds like it's using a coded user/password and you want to use Windows Authentication. Can I assume that the database has the authentication already configured properly? I know nothing about iSeries... so I'm only going by what is in this post... but I wonder if the "conntype=2" parameter in your connection string means anything in this case (like maybe 2 is database authentication and 1 means windows???? ) just a guess.
-tg
-
Sep 7th, 2012, 12:53 PM
#5
Re: Connection string to use Windows Authentication for iSeries in Visual Basic.net 2
Ok... after now having done a little research... you're right, it does seem all of the examples out there use an explicit username & password in the connection string. I don't know that there's a solution though. There doesn't seem to be a way to indicate to use the existing Windows User and pass it on through. It may have something to do with crossing over to the AS400, or it maybe something else entirely. I want through 4 pages of google results, didn't see anythign that was promissing.
-tg
-
Sep 10th, 2012, 01:22 PM
#6
Thread Starter
New Member
Re: Connection string to use Windows Authentication for iSeries in Visual Basic.net 2
Thanks techgnome,
Yes, there are many examples, but with only explicit username and password. I am glad you confirm that with me I was going mad. Thanks for your thoughts.
-
Sep 12th, 2012, 06:14 AM
#7
New Member
Re: Connection string to use Windows Authentication for iSeries in Visual Basic.net 2
Not having ever used iSeries ODBC drivers before, the following may or may not help. The fact that these drivers support both 32 bit and 64 bit operating systems complicates the issue somewhat. If the application is 32 bit, the 32 bit divers are automatically selected, and if the application is 64 bit, the 64 bit drivers are automatically selected. The way to check is to examine the registry entries for ODBC. System DSN's for 32 bit systems are located in HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI, whereas User DSN's for 32 bit systems are located in HKEY_CURRENT_USER\Software\ODBC\ODBC.INI.
For 64 bit systems, 64 bit DSN's are located in the same place as above, but 32 bit applications will find these entries in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\ and HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\. System DSN's can only be updated if the user is logged in as an Adminstrator, and of course User DSN's are only accessible to the appropriate logged in user. I have never used password protected Access files before, but there is provision for a default login/password for each DSN.
Hope this helps.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|