Welcome to HostingForumz.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

Database Connection Problem?

 
   Web Hosting Problem Solving Community! (Home) -> IIS RSS
Author Message
youhadtoask

External


Since: Sep 09, 2003
Posts: 1



(Msg. 1) Posted: Tue Sep 09, 2003 3:47 pm
Post subject: Database Connection Problem?
Archived from groups: microsoft>public>inetserver>iis (more info?)

Have a web (database front end) running on a member 2000 server. The backend
to the database is on the domain server. Both same network. When accessing
the default.aspx I get the page we want, you then need to logon and give the
password (maintained by the access database). I get errors see below. The
web.config file has the proper unc to the backend. I have created a virtual
dir within the site still same error. Any clues? What am I doing wrong?

BTW: If I place the backend locally in the same dir as the web and adjust
the web.config file all is well.

TIA
Dirk-Thomas

Server Error in '/dciw' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set
to an instance of an object.

Source Error:

Line 25: If Page.IsValid Then
Line 26: Dim ds As DataSet = db.GetData("SELECT UserID FROM Users
WHERE Username='" & username.text & "' AND Password='" & password.text &
"'")
Line 27: Dim dv As DataView = ds.Tables(0).DefaultView
Line 28: Dim i as integer
Line 29:

Source File: C:\Inetpub\wwwroot\dciw\Default.aspx Line: 27

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an
object.]
ASP.Default_aspx.Login_Click(Object Sender, EventArgs E) in
C:\Inetpub\wwwroot\dciw\Default.aspx:27
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108

System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePo
stBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277

Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
Version:1.1.4322.573

 >> Stay informed about: Database Connection Problem? 
Back to top
Login to vote
qbernard

External


Since: Sep 05, 2003
Posts: 407



(Msg. 2) Posted: Wed Sep 10, 2003 1:35 pm
Post subject: Re: Database Connection Problem? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

You will get better response if you post it to aspnet group.

--
Regards,
Bernard Cheah
<a style='text-decoration: underline;' href="http://support.microsoft.com/" target="_blank">http://support.microsoft.com/</a>
Please respond to newsgroups only ...


"Dirk-Thomas Brown" <youhadtoask.DeleteThis@hotmail.com> wrote in message
news:OTwOFtwdDHA.1448@TK2MSFTNGP12.phx.gbl...
 > Have a web (database front end) running on a member 2000 server. The
backend
 > to the database is on the domain server. Both same network. When accessing
 > the default.aspx I get the page we want, you then need to logon and give
the
 > password (maintained by the access database). I get errors see below. The
 > web.config file has the proper unc to the backend. I have created a
virtual
 > dir within the site still same error. Any clues? What am I doing wrong?
 >
 > BTW: If I place the backend locally in the same dir as the web and adjust
 > the web.config file all is well.
 >
 > TIA
 > Dirk-Thomas
 >
 > Server Error in '/dciw' Application.
 > Object reference not set to an instance of an object.
 > Description: An unhandled exception occurred during the execution of the
 > current web request. Please review the stack trace for more information
 > about the error and where it originated in the code.
 >
 > Exception Details: System.NullReferenceException: Object reference not set
 > to an instance of an object.
 >
 > Source Error:
 >
 > Line 25: If Page.IsValid Then
 > Line 26: Dim ds As DataSet = db.GetData("SELECT UserID FROM Users
 > WHERE Username='" & username.text & "' AND Password='" & password.text &
 > "'")
 > Line 27: Dim dv As DataView = ds.Tables(0).DefaultView
 > Line 28: Dim i as integer
 > Line 29:
 >
 > Source File: C:\Inetpub\wwwroot\dciw\Default.aspx Line: 27
 >
 > Stack Trace:
 >
 > [NullReferenceException: Object reference not set to an instance of an
 > object.]
 > ASP.Default_aspx.Login_Click(Object Sender, EventArgs E) in
 > C:\Inetpub\wwwroot\dciw\Default.aspx:27
 > System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
 >
 >
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePo
 > stBackEvent(String eventArgument) +57
 > System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
 > sourceControl, String eventArgument) +18
 > System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
 > System.Web.UI.Page.ProcessRequestMain() +1277
 >
 > Version Information: Microsoft .NET Framework Version:1.1.4322.573;
ASP.NET
 > Version:1.1.4322.573
 >
 ><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Database Connection Problem? 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting Problem Solving Community! (Home) -> IIS All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]