473,396 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Trouble connecting to AS/400 with ASP.NET

Hello,

I am writing an ASP.NET application and trying to connect to an as400
using an ADODB connection. I recently completed a Windows application
that connects to the 400. My code works in the Windows world, so
theoretically, it should work for the ASP application as well. But it
doesn't. I keep getting the error CWBSY1006 - User ID is Invalid. I'm
using my Windows login information to automatically log into the 400,
so a userid and password is not required. It does work, however, if I
hard code my userid and password into the connection string. The
only problem with that is that the users need to log in with their
information for security purposes. Here is my code. Any ideas would
be greatly appreciated.

Thanks,
Amaryllis

AS400.Define("MyAS400")
AS400.Connect(cwbx.cwbcoServiceEnum.cwbcoServiceDa taQueues)
conn400 = New ADODB.Connection
conn400.ConnectionString = "Provider=IBMDA400.DataSource.1;" & _
"Data source=MyAS400"
conn400.Open()

Nov 18 '05 #1
2 1464
That is because ASP.NET runs under the ASPNET account. It does not run
under you. So of course, the ASPNET account does not have integrated
security access to your database.

You neither need to give that account rights to the database, or use a
username/password to log in.

"Amaryllis" <am*********@swn-dot-com.no-spam.invalid> wrote in message
news:41**********@Usenet.com...
Hello,

I am writing an ASP.NET application and trying to connect to an as400
using an ADODB connection. I recently completed a Windows application
that connects to the 400. My code works in the Windows world, so
theoretically, it should work for the ASP application as well. But it
doesn't. I keep getting the error CWBSY1006 - User ID is Invalid. I'm
using my Windows login information to automatically log into the 400,
so a userid and password is not required. It does work, however, if I
hard code my userid and password into the connection string. The
only problem with that is that the users need to log in with their
information for security purposes. Here is my code. Any ideas would
be greatly appreciated.

Thanks,
Amaryllis

AS400.Define("MyAS400")
AS400.Connect(cwbx.cwbcoServiceEnum.cwbcoServiceDa taQueues)
conn400 = New ADODB.Connection
conn400.ConnectionString = "Provider=IBMDA400.DataSource.1;" & _
"Data source=MyAS400"
conn400.Open()

Nov 18 '05 #2
I agree, but when you add <impersonate=TRUE /> to the web.config
file, it should pick up your information and use it rather than the
ASPNET account information. I've always been able to connect to SQL
Server using that approach. I'm just not sure what is different
about DB2 on the AS/400.

Amaryllis

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Freddie | last post by:
Hi, I've been mangling python-irclib into an asyncore class, so it fits in nicely with the rest of my app. I ran into a problem with asyncore.dispatcher_with_send (Python 2.3.4), though. Not...
4
by: 21novembre | last post by:
Hi all, I got a quite strange problem when I tried to setup a database backup shell. I put it this way: "bin/mysqldump --opt --user=xxx --password=xxx DB > DB.bak" However, error 1045 came to...
1
by: chris.rust | last post by:
Has anyone else had any trouble setting up a sitemap view to be filtered by roles? We've put a cust role provider in place, and we can verify that it's only being called once for each...
0
by: acwomble | last post by:
I am working with a database on another system via a ssh tunnel using plink. We have setup an alias the local system for the remote database. I am able to connect and work from within Visual...
0
by: laredotornado | last post by:
Hi, I'm using PHP 4.3 on Apache 2, connecting to a VSFTP server running on Fedora Core 5. The Fedora machine is my home computer, which sits behind a router. I have opened up the FTP port, and...
0
by: John Salerno | last post by:
Is anyone else having trouble? It worked for me last night, but now it's saying: C00D11BD: Cannot play the file Windows Media Player cannot play the file because the specified protocol is not...
5
by: Odd Bjørn Andersen | last post by:
I have installed DB2 9 Enterprise Edition on my laptop and created the sample database. Now I'm having truble connecting to the database from Command Editor. If I connect from Command Window it's...
8
by: Claudia Fong | last post by:
Hi, I'm trying to connect to a sql db with my C# applciation but I'm having trouble to connect.. It said - Error accessing the database: Cannot open database "LibDB" requested by the login. The...
0
by: mrchatgroup | last post by:
news from http://www.mrchat.net/myblog/myblog/small-accidents-mean-big-trouble-for-supercollider.html Small Accidents Mean Big Trouble for Supercollider Image Scientists expect startup...
0
by: brum2008 | last post by:
Hello! Below is the Netbeans Mobility source code for my application (The application offers SPP service, and then just hangs waiting for a client to connect (using acceptAndOpen()). The other...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.