I've gone throught the MSDN walkthrough "Creating a Web Application Using
Visual C# or Visual Basic". When I run the sample I get "Login failed for
user 'dbuser'" at the line with "SqlDataAdapter 1.Fill(dSet)". The SQL server
is setup for mixed mode and I have a login in Enterprise Manager for the
dbuser account. I've setup a system DSN in ODBC on the client which tested
succesfully. In Visual Studio 2003 I've chosen "Preview Data..." for the
SqlDataAdapter1 , which successfully fills the dataset. I don't understand why
those two methods can access the database, but the aspx page doesn't. I've
triple checked the username and password for each method. Is there something
I've overlooked? I'm attempting this while logged in as the local admin on
the client computer instead of as a domain account, but I wouldn't think this
would make a difference since it's a SQL server login and the other two
methods work under this login. Any help would be appreciated. 14 3344
Show your connection string.
Eliyahu
"David Tilman" <Da*********@di scussions.micro soft.com> wrote in message
news:A3******** *************** ***********@mic rosoft.com... I've gone throught the MSDN walkthrough "Creating a Web Application Using Visual C# or Visual Basic". When I run the sample I get "Login failed for user 'dbuser'" at the line with "SqlDataAdapter 1.Fill(dSet)". The SQL
server is setup for mixed mode and I have a login in Enterprise Manager for the dbuser account. I've setup a system DSN in ODBC on the client which tested succesfully. In Visual Studio 2003 I've chosen "Preview Data..." for the SqlDataAdapter1 , which successfully fills the dataset. I don't understand
why those two methods can access the database, but the aspx page doesn't. I've triple checked the username and password for each method. Is there
something I've overlooked? I'm attempting this while logged in as the local admin on the client computer instead of as a domain account, but I wouldn't think
this would make a difference since it's a SQL server login and the other two methods work under this login. Any help would be appreciated.
Your Sql Server is probably set to use Windows Authentication and not
Mixed Mode.
if you are running MSDE then try the following.
MSDE 2000 (without Enterprise Manage)
Start -> Run -> regedit ->
HKLM/Software/Microsoft/MSSQLServer/MSSQLServer/LoginMode
The value will be 1 and needs to be changed to 2.
for SQL Server with Enterprirse Manager
SQL Server 2000 (using Enterprise Manager)
· Open The SQL Server Enterprise Manager
Start menu > Programs > Microsoft SQL Server > Enterprise Manager)
· Expand the tree-control until you can your server
· Right click on the server name and "SQL Server Properties
(Configure)" window will open
· Select the Security tab
· For "Authentication ", select "SQL Server and Windows"
I'm Using SQL Server 2000, not MSDE and it is setup for mixed mode. If it
wasn't mixed mode, I think the ODBC or "show date" in VS would have failed,
but I could be wrong. The "dbuser" acount was created in Enterprise Manager,
not Active Directory.
"re****@communi ty.nospam" wrote: Your Sql Server is probably set to use Windows Authentication and not Mixed Mode. if you are running MSDE then try the following. MSDE 2000 (without Enterprise Manage) Start -> Run -> regedit -> HKLM/Software/Microsoft/MSSQLServer/MSSQLServer/LoginMode The value will be 1 and needs to be changed to 2.
for SQL Server with Enterprirse Manager SQL Server 2000 (using Enterprise Manager) · Open The SQL Server Enterprise Manager Start menu > Programs > Microsoft SQL Server > Enterprise Manager) · Expand the tree-control until you can your server · Right click on the server name and "SQL Server Properties (Configure)" window will open · Select the Security tab · For "Authentication ", select "SQL Server and Windows"
So where is the connection string?
Eliyahu
"David Tilman" <Da*********@di scussions.micro soft.com> wrote in message
news:7F******** *************** ***********@mic rosoft.com... I'm Using SQL Server 2000, not MSDE and it is setup for mixed mode. If it wasn't mixed mode, I think the ODBC or "show date" in VS would have
failed, but I could be wrong. The "dbuser" acount was created in Enterprise
Manager, not Active Directory.
"re****@communi ty.nospam" wrote:
Your Sql Server is probably set to use Windows Authentication and not Mixed Mode. if you are running MSDE then try the following. MSDE 2000 (without Enterprise Manage) Start -> Run -> regedit -> HKLM/Software/Microsoft/MSSQLServer/MSSQLServer/LoginMode The value will be 1 and needs to be changed to 2.
for SQL Server with Enterprirse Manager SQL Server 2000 (using Enterprise Manager) · Open The SQL Server Enterprise Manager Start menu > Programs > Microsoft SQL Server > Enterprise Manager) · Expand the tree-control until you can your server · Right click on the server name and "SQL Server Properties (Configure)" window will open · Select the Security tab · For "Authentication ", select "SQL Server and Windows"
Sorry, but I'm at work now and didn't remember to bring the project in with
me from home (I should have done that). I'll be able to respond again in a
few hours with the info. I didn't have to explicitly create a connection
string (I'm not sure if VS did that in the background). I did the walkthrough
step by step from my local MSDN source, but here is the link to the exact
same one online: http://msdn.microsoft.com/library/de...isualBasic.asp
"Eliyahu Goldin" wrote: So where is the connection string?
Eliyahu
David Eliyahu was asking for your connectionstrin g cos that was the only
way he could see the way u were connecting!
But after going through the step u took from MSDN i guess you didn't go
here to:- http://msdn.microsoft.com/library/de.../en-us/vsintro
7/html/vxwlkusingtermi nalserverssqlse rversonothermac hines.asp
Click on the link :-Using SQL Server in Web Applications.
from the page u posted.
Hope that helps
Patrick
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Actually I had missed that. I changed the IIS settings as it stated (cleared
anonymous, Integrated Windows authentication was checked) and edited the
web.config file (already had <authenticati on mode="Windows" /> and inserted
<identity impersonate="tr ue" />). The problem persists though. I've restarted
the machine and tried running from the local admin account and a domain admin
account with the same results. Could there be anything else I'm missing. Can
any other settings have an effect, whether IIS, DNS, or anything else? I've
been reading through numerous resources that don't hint to other causes.
"Patrick Olurotimi Ige" wrote: David Eliyahu was asking for your connectionstrin g cos that was the only way he could see the way u were connecting! But after going through the step u took from MSDN i guess you didn't go here to:-
http://msdn.microsoft.com/library/de.../en-us/vsintro 7/html/vxwlkusingtermi nalserverssqlse rversonothermac hines.asp
Click on the link :-Using SQL Server in Web Applications. from the page u posted.
Hope that helps Patrick *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
Also, the only connectionstrin g I can see in the project is in web.config:
<sessionState
mode="InProc"
stateConnection String="tcpip=1 27.0.0.1:42424"
sqlConnectionSt ring="data source=127.0.0. 1;Trusted_Conne ction=yes"
cookieless="fal se"
timeout="20"
/>
Does this connection string need to point to the SQL Server? I thought it
was for simply storing the session info (which would be stored locally).
"Patrick Olurotimi Ige" wrote: David Eliyahu was asking for your connectionstrin g cos that was the only way he could see the way u were connecting! But after going through the step u took from MSDN i guess you didn't go here to:-
http://msdn.microsoft.com/library/de.../en-us/vsintro 7/html/vxwlkusingtermi nalserverssqlse rversonothermac hines.asp
Click on the link :-Using SQL Server in Web Applications. from the page u posted.
Hope that helps Patrick *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
No, this connection string has nothing to do with your problem.
You are getting a logon failed message. That is likely because of a problem
with your connection parameters. If you set a breakpoint before Fill
statement and check the connection string, you have a good chance of
spotting the problem straight away.
Eliyahu
"David Tilman" <Da*********@di scussions.micro soft.com> wrote in message
news:D4******** *************** ***********@mic rosoft.com... Also, the only connectionstrin g I can see in the project is in web.config:
<sessionState mode="InProc" stateConnection String="tcpip=1 27.0.0.1:42424" sqlConnectionSt ring="data
source=127.0.0. 1;Trusted_Conne ction=yes" cookieless="fal se" timeout="20" />
Does this connection string need to point to the SQL Server? I thought it was for simply storing the session info (which would be stored locally).
"Patrick Olurotimi Ige" wrote:
David Eliyahu was asking for your connectionstrin g cos that was the only way he could see the way u were connecting! But after going through the step u took from MSDN i guess you didn't go here to:-
http://msdn.microsoft.com/library/de.../en-us/vsintro 7/html/vxwlkusingtermi nalserverssqlse rversonothermac hines.asp
Click on the link :-Using SQL Server in Web Applications. from the page u posted.
Hope that helps Patrick *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Bob Skutnick |
last post by:
Help....
I've created an ADO.NET dataset in Visual Studio (a web
project). I build the project and then try to create a
Crystal Report using the dataset.
When I try to use the ADO.NET dataset in Crystal Report
(selected from Project Data) by double clicking the
dataset name (yes, it does at least show up) I get a
consistent error: Logon...
|
by: Max |
last post by:
Hi wise people,
Has anyone encountered the Crystal Reports problem I describe below?
If so, how did you solve it? It seems that every article posted on
google regarding CR and logon problems is still unanswered. I think
I'm cursed.
I originally created a crystal report which connects to a sql server
server db on the same dev machine and it...
|
by: James |
last post by:
Hello group:
I guessing there is no way to create an OLEDB linked table in Access
to SQL Server, am I correct? Basically, I've currently migrated one of
my Access database tables to SQL Server, and they are linked via an
ODBC connection. I'm am attempting to make the logon to SQL server
transparent so the users are never prompted to logon....
|
by: John J. Hughes II |
last post by:
I have "Computer A" which is running Win2K3 and MS SQL server. And
"Computer B" which is running a service that I have created. If I change
the service on "Computer B" to run as a user my program is able to connect
to the SQL server on "Computer A" correctly. But if I set the service on
"Computer B" to run as a local system then I get an...
|
by: Maellic |
last post by:
Hi,
The website I am working on is built with ASP.NET and connects to a
SQL Server 2000 database. The web server and database are on the same
machine. I have recently tried to modify the timeout of the website
from 20 mn to 60 mn. I changed the timeout setting in IIS. Now the
website itself doesn't time out, however after 20 mn, when I try...
| |
by: Milan Todorovic |
last post by:
Hello,
I need help. I have experience in ASP.NET programming, but this is my first
dealing with Crystal Reports. I'm trying to make the most basic report
purely for testing purposes: connect to the remote SQL DB and create a
report on one of the tables. Every time I do it, I get the Logon Failed
error...
|
by: John Dalberg |
last post by:
Running Crystal Reports with the hotfixes and patches & VS 2003.
I created a CR report on my development server which has SQL Server. The
report runs fine inside Visual Studio. When I switched the source of the DB
to the production server using the 'set location' option in CR and ran the
app again, I get "Logon Failed" error message. The...
|
by: bonita |
last post by:
I come across the error
"CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed."
After I move my asp.net code from the development platform (XP
professional) to the production web server (windows 2003 server) by
generating the msi file from the setup and deployment project and
adding the merge modules. The msi file is installed...
|
by: Lee T. Hawkins |
last post by:
I am having a number of problems over the last two full days trying to get
an ASP.NET 2.0 application to connect to a SQL Server 2005 database...
First off, I built this application w/ Visual Studio 2005 SP1 and had it
working perfectly on my Windows XP machine on SQL Server 2005 Express. I
decided to publish this application to a test...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |