Microsoft IIS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsSystem AdministrationMicrosoft IIS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old March 28th, 2005, 07:27 PM
Slangle Slangle is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 4 Slangle User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 6 m 23 sec
Reputation Power: 0
Unhappy IIS Problem. VB.NET web application cannot bind database.

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


Reply With Quote
  #2  
Old March 28th, 2005, 09:47 PM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
ASP Free God 14th Plane (11500 - 11999 posts)
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 11,776 Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 8 h 27 m 42 sec
Reputation Power: 470
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.

Reply With Quote
  #3  
Old March 29th, 2005, 11:53 AM
Slangle Slangle is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 4 Slangle User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 6 m 23 sec
Reputation Power: 0
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.

Reply With Quote
  #4  
Old March 29th, 2005, 12:21 PM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
ASP Free God 14th Plane (11500 - 11999 posts)
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 11,776 Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 8 h 27 m 42 sec
Reputation Power: 470
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.

Reply With Quote
  #5  
Old March 30th, 2005, 03:57 PM
Slangle Slangle is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 4 Slangle User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 6 m 23 sec
Reputation Power: 0
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

Reply With Quote
  #6  
Old March 30th, 2005, 04:47 PM
Slangle Slangle is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 4 Slangle User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 6 m 23 sec
Reputation Power: 0
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

Reply With Quote
  #7  
Old March 30th, 2005, 04:55 PM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
ASP Free God 14th Plane (11500 - 11999 posts)
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 11,776 Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 8 h 27 m 42 sec
Reputation Power: 470
I'm glad you got it working.
And, yes...I must...I can't fight it.....
Quote:
Originally Posted by slangle
THIS WAS A DATABASE ISSUE!!!!

I told you so....

Reply With Quote
Reply

Viewing: ASP Free ForumsSystem AdministrationMicrosoft IIS > IIS Problem. VB.NET web application cannot bind database.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT