|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am in the process on learning VB.NET. I installed MSDE on my computer. I tried to run a sample "How to use Simple Web Controls" enclosed with MDSE. The sample accesses “Northwind” database that I installed on MSDE. All it does it creates a connection string and loads some data to the controls on the screen. There are two versions on this application. Windows and Web version.
Web version gives me an error 'Login failed for user 'my server\ASPNET'. I have the similar problem with accessing MS Access database.It gives me an error message "The Microsoft Jet database engine cannot open the file 'C:\vbnet03sbs\chap19\Students.mdb'. It is already opened exclusively by another user, or you need permission to view its data". It always happens during binding for both Ms Access and MSDE. OleDbDataAdapter1.Fill(DataSet11) Windows version loads the data without any problems for Ms Access and for MSDE. So I figured that it must be IIS problem while controlling access to the database. I changed in the "IIS Manager" settings by removing a password in "Authentification methods - enable annonymous password" and removed a check "Allow IIS to control password". It did not change the outcome. I am running XP Pro with IIS 5.1 I don't know what to do next. I tried every possible combination of settings in IIS I could think of. Nothing works. Somebody, please help!!! Slangle |
|
#2
|
||||
|
||||
|
This isn't an IIS problem, it's a database problem.
Your application is trying to connect to the database using this login ('my server\ASPNET'), which obviously isn't setup as a user on the database. Create a new username/password in your database, then change your connection string to use the newly created username/password to connect to the database. |
|
#3
|
|||
|
|||
|
I entered "my user" on the message but I guess I have to be explicit on it. I have a server and user name "stefania". If the user and a password was wrong it wouldn't work for windows application. Also the problem with the wrong user and the password is not the case for MS Access.
In short if it works for windows application and it does not work for web application i don't believe this is a database. |
|
#4
|
||||
|
||||
|
MSDE is probably setup to use Windows Authentication only. Try changing it to allow mixed authentication (Windows and SQL Users)
How is the website configured to handle authentication? Integrated Windows? Anonymous?? I guarantee it's a database issue. |
|
#5
|
|||
|
|||
|
You might be right. This is something to do with database. I tried everything I could think of with security access to MSDE. (I have SQL server tools to access MSDE).
I cannot have both windows and server authentification for the same user. I tried with two different users with different authentification. The one with SQL server authentification has a password that I inserted into connection string. This did not work. My web site (localhost) in IIS manager was set to "enable annonymous access". This did not work. Then I found out on one web site that if "authentification mode" in Web.Config is set to "Windows" annonymous access had to be disabled. So I disabled and left only "Integrated Windows Authentification". Without "Integrated Windows Authentification" in IIS program cannot be even compiled. Disabling "annonymous access" did not work. I also changed in Web.config authentification from "windows" to "none". This did not work either. I run this program with different combination of settings probably hundred times. Any ideas? Stefania |
|
#6
|
|||
|
|||
|
THIS WAS A DATABASE ISSUE!!!!
I resolved the problem. I followed somebody's advice and added a new user that was listed in the error message: "STEFANIA\ASPNET" to the database in MSDE and it worked. Thank you for your help. Stefania |
|
#7
|
||||
|
||||
|
I'm glad you got it working.
And, yes...I must...I can't fight it..... Quote:
I told you so.... ![]() |
![]() |
| Viewing: ASP Free Forums > System Administration > Microsoft IIS > IIS Problem. VB.NET web application cannot bind database. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|