473,378 Members | 1,133 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,378 software developers and data experts.

Urgent Help for release...

Can someone please tell me why I keep getting the following error for some of
my web application users but not others??? Even though the application runs
from a central webserver???
Thanks for any help...

Error:
-----

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

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an
object.]
cpncms_v1.editor.GetDocument() +277
cpncms_v1.editor.Page_Load(Object sender, EventArgs e) +122
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

Code:
---------

Private Function GetDocument() As String
Dim ds As DataSet

If Request.ServerVariables("HTTP_REFERER") =
"http://localhost/cpncms_v1/cms/viewpage.aspx" Then
ds = GetDataSet(("SELECT content FROM tblPageContent WHERE
pageID=" + rowID.ToString()))
Cache("iNews") = "False"
ElseIf Request.ServerVariables("HTTP_REFERER") =
"http://localhost/cpncms_v1/cms/news/pgeEditor.aspx" Then
ds = GetDataSet(("SELECT content FROM tblNewsArchive WHERE
newsID=" + rowID.ToString()))
Cache.Remove("iNews")
End If
Dim table As DataTable = ds.Tables(0)
Dim row As DataRow = table.Rows(0)
Dim doc As String = row("content").ToString()
Return doc
ds.Dispose()
End Function 'GetDocument

Nov 19 '05 #1
8 1790
Elo,

Ensure rowId is properly set and GetDataSet does not return null reference.

--
Milosz Skalecki
MCP, MCAD
"Tim::.." wrote:
Can someone please tell me why I keep getting the following error for some of
my web application users but not others??? Even though the application runs
from a central webserver???
Thanks for any help...

Error:
-----

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

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an
object.]
cpncms_v1.editor.GetDocument() +277
cpncms_v1.editor.Page_Load(Object sender, EventArgs e) +122
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

Code:
---------

Private Function GetDocument() As String
Dim ds As DataSet

If Request.ServerVariables("HTTP_REFERER") =
"http://localhost/cpncms_v1/cms/viewpage.aspx" Then
ds = GetDataSet(("SELECT content FROM tblPageContent WHERE
pageID=" + rowID.ToString()))
Cache("iNews") = "False"
ElseIf Request.ServerVariables("HTTP_REFERER") =
"http://localhost/cpncms_v1/cms/news/pgeEditor.aspx" Then
ds = GetDataSet(("SELECT content FROM tblNewsArchive WHERE
newsID=" + rowID.ToString()))
Cache.Remove("iNews")
End If
Dim table As DataTable = ds.Tables(0)
Dim row As DataRow = table.Rows(0)
Dim doc As String = row("content").ToString()
Return doc
ds.Dispose()
End Function 'GetDocument

Nov 19 '05 #2
Tim:
There's so many things it could be...
What happens if HTTP_REFERER is null or neither of the values indicated?
then ds.Tables(0) will throw a null reference
what happends if rowId is null? rowId.ToString() will throw a null reference
what happens if ds.Tables(0) doesn't exist? then tables.Rows() will throw a
null reference
what happens if there's no column called "content" ? then
row("content").ToString will throw a null reference (actually, that'll
likely throw a different error I think)

My guess is the first one..but it's impossible to tell for us (and should be
relatively easy for you).

By the way, your ds.Dispose() will never get called, it's AFTER the return..

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Tim::.." <Ti*@newsgroups.nospam> wrote in message
news:3F**********************************@microsof t.com...
Can someone please tell me why I keep getting the following error for some
of
my web application users but not others??? Even though the application
runs
from a central webserver???
Thanks for any help...

Error:
-----

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

Source Error:

An unhandled exception was generated during the execution of the current
web
request. Information regarding the origin and location of the exception
can
be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an
object.]
cpncms_v1.editor.GetDocument() +277
cpncms_v1.editor.Page_Load(Object sender, EventArgs e) +122
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

Code:
---------

Private Function GetDocument() As String
Dim ds As DataSet

If Request.ServerVariables("HTTP_REFERER") =
"http://localhost/cpncms_v1/cms/viewpage.aspx" Then
ds = GetDataSet(("SELECT content FROM tblPageContent WHERE
pageID=" + rowID.ToString()))
Cache("iNews") = "False"
ElseIf Request.ServerVariables("HTTP_REFERER") =
"http://localhost/cpncms_v1/cms/news/pgeEditor.aspx" Then
ds = GetDataSet(("SELECT content FROM tblNewsArchive WHERE
newsID=" + rowID.ToString()))
Cache.Remove("iNews")
End If
Dim table As DataTable = ds.Tables(0)
Dim row As DataRow = table.Rows(0)
Dim doc As String = row("content").ToString()
Return doc
ds.Dispose()
End Function 'GetDocument

Nov 19 '05 #3
It works fine on my development network but for some reason it doesn't work
when multiple users start to use it...

It is almost like only certain clients get connections to the SQL server???

Any ideas???

Thanks....

"Milosz Skalecki" wrote:
Elo,

Ensure rowId is properly set and GetDataSet does not return null reference.

--
Milosz Skalecki
MCP, MCAD
"Tim::.." wrote:
Can someone please tell me why I keep getting the following error for some of
my web application users but not others??? Even though the application runs
from a central webserver???
Thanks for any help...

Error:
-----

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

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an
object.]
cpncms_v1.editor.GetDocument() +277
cpncms_v1.editor.Page_Load(Object sender, EventArgs e) +122
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

Code:
---------

Private Function GetDocument() As String
Dim ds As DataSet

If Request.ServerVariables("HTTP_REFERER") =
"http://localhost/cpncms_v1/cms/viewpage.aspx" Then
ds = GetDataSet(("SELECT content FROM tblPageContent WHERE
pageID=" + rowID.ToString()))
Cache("iNews") = "False"
ElseIf Request.ServerVariables("HTTP_REFERER") =
"http://localhost/cpncms_v1/cms/news/pgeEditor.aspx" Then
ds = GetDataSet(("SELECT content FROM tblNewsArchive WHERE
newsID=" + rowID.ToString()))
Cache.Remove("iNews")
End If
Dim table As DataTable = ds.Tables(0)
Dim row As DataRow = table.Rows(0)
Dim doc As String = row("content").ToString()
Return doc
ds.Dispose()
End Function 'GetDocument

Nov 19 '05 #4
Can you paste code of the GetDataSet method?
--
Milosz Skalecki
MCP, MCAD
"Tim::.." wrote:
It works fine on my development network but for some reason it doesn't work
when multiple users start to use it...

It is almost like only certain clients get connections to the SQL server???

Any ideas???

Thanks....

"Milosz Skalecki" wrote:
Elo,

Ensure rowId is properly set and GetDataSet does not return null reference.

--
Milosz Skalecki
MCP, MCAD
"Tim::.." wrote:
Can someone please tell me why I keep getting the following error for some of
my web application users but not others??? Even though the application runs
from a central webserver???
Thanks for any help...

Error:
-----

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

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an
object.]
cpncms_v1.editor.GetDocument() +277
cpncms_v1.editor.Page_Load(Object sender, EventArgs e) +122
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

Code:
---------

Private Function GetDocument() As String
Dim ds As DataSet

If Request.ServerVariables("HTTP_REFERER") =
"http://localhost/cpncms_v1/cms/viewpage.aspx" Then
ds = GetDataSet(("SELECT content FROM tblPageContent WHERE
pageID=" + rowID.ToString()))
Cache("iNews") = "False"
ElseIf Request.ServerVariables("HTTP_REFERER") =
"http://localhost/cpncms_v1/cms/news/pgeEditor.aspx" Then
ds = GetDataSet(("SELECT content FROM tblNewsArchive WHERE
newsID=" + rowID.ToString()))
Cache.Remove("iNews")
End If
Dim table As DataTable = ds.Tables(0)
Dim row As DataRow = table.Rows(0)
Dim doc As String = row("content").ToString()
Return doc
ds.Dispose()
End Function 'GetDocument

Nov 19 '05 #5
Thanks for the Tips Carl...

What I don't get is why some users can access the page while others can't???

Everything returns ok when I run it on the development lan... ???? Wierd

It's not the Request.ServerVariables("HTTP_REFERER") ,
QueryString is provided... I can see it in the url!
There is a column called 'content'

Any other ideas???

Do you think it is an IIS 6 problem???
Strange...

More Code...
--------------
'Get Text for Editor
If Not Page.IsPostBack Then
rowID = CType(Request.QueryString("ID"), Integer)
FreeTextBox1.Text = GetDocument()
End If

'Loads user controls
Dim c1 As Control = LoadControl("../userControls/footer.ascx")
phFooter.Controls.Add(c1)
Dim c2 As Control = LoadControl("../userControls/headerMenu.ascx")
phHeaderMenu.Controls.Add(c2)
Dim c3 As Control = LoadControl("../userControls/Header.ascx")
phHeader.Controls.Add(c3)
Dim c4 As Control = LoadControl("../userControls/QuickLinks.ascx")
phQuickLinks.Controls.Add(c4)
End Sub 'Page_Load

Public Sub Button_Click(ByVal sender As Object, ByVal e As
System.EventArgs)
rowID = CType(Request.QueryString("ID"), Integer)
UpdateDocument(FreeTextBox1.Text)
End Sub 'Button_Click

'Why not just pass a variable to the page, in the Querystring to
'differentiate the page you came from? Instead of using Cache or Boolean

Private Function GetDocument() As String
Dim ds As DataSet

If Request.ServerVariables("HTTP_REFERER") =
"http://10.160.224.12/cms/viewpage.aspx" Then
ds = GetDataSet(("SELECT content FROM tblPageContent WHERE
pageID=" + rowID.ToString()))
Cache("iNews") = "False"
ElseIf Request.ServerVariables("HTTP_REFERER") =
"http://10.160.224.12/cms/news/pgeEditor.aspx" Then
ds = GetDataSet(("SELECT content FROM tblNewsArchive WHERE
newsID=" + rowID.ToString()))
Cache.Remove("iNews")
End If
Dim table As DataTable = ds.Tables(0)
Dim row As DataRow = table.Rows(0)
Dim doc As String = row("content").ToString()
ds.Dispose()
Return doc

End Function 'GetDocument

"Karl Seguin" wrote:
Tim:
There's so many things it could be...
What happens if HTTP_REFERER is null or neither of the values indicated?
then ds.Tables(0) will throw a null reference
what happends if rowId is null? rowId.ToString() will throw a null reference
what happens if ds.Tables(0) doesn't exist? then tables.Rows() will throw a
null reference
what happens if there's no column called "content" ? then
row("content").ToString will throw a null reference (actually, that'll
likely throw a different error I think)

My guess is the first one..but it's impossible to tell for us (and should be
relatively easy for you).

By the way, your ds.Dispose() will never get called, it's AFTER the return..

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Tim::.." <Ti*@newsgroups.nospam> wrote in message
news:3F**********************************@microsof t.com...
Can someone please tell me why I keep getting the following error for some
of
my web application users but not others??? Even though the application
runs
from a central webserver???
Thanks for any help...

Error:
-----

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

Source Error:

An unhandled exception was generated during the execution of the current
web
request. Information regarding the origin and location of the exception
can
be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an
object.]
cpncms_v1.editor.GetDocument() +277
cpncms_v1.editor.Page_Load(Object sender, EventArgs e) +122
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

Code:
---------

Private Function GetDocument() As String
Dim ds As DataSet

If Request.ServerVariables("HTTP_REFERER") =
"http://localhost/cpncms_v1/cms/viewpage.aspx" Then
ds = GetDataSet(("SELECT content FROM tblPageContent WHERE
pageID=" + rowID.ToString()))
Cache("iNews") = "False"
ElseIf Request.ServerVariables("HTTP_REFERER") =
"http://localhost/cpncms_v1/cms/news/pgeEditor.aspx" Then
ds = GetDataSet(("SELECT content FROM tblNewsArchive WHERE
newsID=" + rowID.ToString()))
Cache.Remove("iNews")
End If
Dim table As DataTable = ds.Tables(0)
Dim row As DataRow = table.Rows(0)
Dim doc As String = row("content").ToString()
Return doc
ds.Dispose()
End Function 'GetDocument


Nov 19 '05 #6
I don't think it's an IIS 6 problem, i think it's your code. I think it's
HTTP_REFERER.

Browsers send information in headers...HTTP_REFERER isn't a required header
in the HTTP protocols. Many firewalls, namely symantec, always removes
HTTP_REFERER. It's possible to make Firefox and Opera not display the
REFERER as well.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Tim::.." <myatix_at_hotmail.com> wrote in message
news:F0**********************************@microsof t.com...
Thanks for the Tips Carl...

What I don't get is why some users can access the page while others
can't???

Everything returns ok when I run it on the development lan... ???? Wierd

It's not the Request.ServerVariables("HTTP_REFERER") ,
QueryString is provided... I can see it in the url!
There is a column called 'content'

Any other ideas???

Do you think it is an IIS 6 problem???
Strange...

More Code...
--------------
'Get Text for Editor
If Not Page.IsPostBack Then
rowID = CType(Request.QueryString("ID"), Integer)
FreeTextBox1.Text = GetDocument()
End If

'Loads user controls
Dim c1 As Control = LoadControl("../userControls/footer.ascx")
phFooter.Controls.Add(c1)
Dim c2 As Control = LoadControl("../userControls/headerMenu.ascx")
phHeaderMenu.Controls.Add(c2)
Dim c3 As Control = LoadControl("../userControls/Header.ascx")
phHeader.Controls.Add(c3)
Dim c4 As Control = LoadControl("../userControls/QuickLinks.ascx")
phQuickLinks.Controls.Add(c4)
End Sub 'Page_Load

Public Sub Button_Click(ByVal sender As Object, ByVal e As
System.EventArgs)
rowID = CType(Request.QueryString("ID"), Integer)
UpdateDocument(FreeTextBox1.Text)
End Sub 'Button_Click

'Why not just pass a variable to the page, in the Querystring to
'differentiate the page you came from? Instead of using Cache or
Boolean

Private Function GetDocument() As String
Dim ds As DataSet

If Request.ServerVariables("HTTP_REFERER") =
"http://10.160.224.12/cms/viewpage.aspx" Then
ds = GetDataSet(("SELECT content FROM tblPageContent WHERE
pageID=" + rowID.ToString()))
Cache("iNews") = "False"
ElseIf Request.ServerVariables("HTTP_REFERER") =
"http://10.160.224.12/cms/news/pgeEditor.aspx" Then
ds = GetDataSet(("SELECT content FROM tblNewsArchive WHERE
newsID=" + rowID.ToString()))
Cache.Remove("iNews")
End If
Dim table As DataTable = ds.Tables(0)
Dim row As DataRow = table.Rows(0)
Dim doc As String = row("content").ToString()
ds.Dispose()
Return doc

End Function 'GetDocument

"Karl Seguin" wrote:
Tim:
There's so many things it could be...
What happens if HTTP_REFERER is null or neither of the values indicated?
then ds.Tables(0) will throw a null reference
what happends if rowId is null? rowId.ToString() will throw a null
reference
what happens if ds.Tables(0) doesn't exist? then tables.Rows() will throw
a
null reference
what happens if there's no column called "content" ? then
row("content").ToString will throw a null reference (actually, that'll
likely throw a different error I think)

My guess is the first one..but it's impossible to tell for us (and should
be
relatively easy for you).

By the way, your ds.Dispose() will never get called, it's AFTER the
return..

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Tim::.." <Ti*@newsgroups.nospam> wrote in message
news:3F**********************************@microsof t.com...
> Can someone please tell me why I keep getting the following error for
> some
> of
> my web application users but not others??? Even though the application
> runs
> from a central webserver???
>
>
> Thanks for any help...
>
> Error:
> -----
>
> Exception Details: System.NullReferenceException: Object reference not
> set
> to an instance of an object.
>
> Source Error:
>
> An unhandled exception was generated during the execution of the
> current
> web
> request. Information regarding the origin and location of the exception
> can
> be identified using the exception stack trace below.
>
> Stack Trace:
>
> [NullReferenceException: Object reference not set to an instance of an
> object.]
> cpncms_v1.editor.GetDocument() +277
> cpncms_v1.editor.Page_Load(Object sender, EventArgs e) +122
> System.Web.UI.Control.OnLoad(EventArgs e) +67
> System.Web.UI.Control.LoadRecursive() +35
> System.Web.UI.Page.ProcessRequestMain() +731
>
> Code:
> ---------
>
> Private Function GetDocument() As String
> Dim ds As DataSet
>
> If Request.ServerVariables("HTTP_REFERER") =
> "http://localhost/cpncms_v1/cms/viewpage.aspx" Then
> ds = GetDataSet(("SELECT content FROM tblPageContent WHERE
> pageID=" + rowID.ToString()))
> Cache("iNews") = "False"
> ElseIf Request.ServerVariables("HTTP_REFERER") =
> "http://localhost/cpncms_v1/cms/news/pgeEditor.aspx" Then
> ds = GetDataSet(("SELECT content FROM tblNewsArchive WHERE
> newsID=" + rowID.ToString()))
> Cache.Remove("iNews")
> End If
> Dim table As DataTable = ds.Tables(0)
> Dim row As DataRow = table.Rows(0)
> Dim doc As String = row("content").ToString()
> Return doc
> ds.Dispose()
> End Function 'GetDocument
>


Nov 19 '05 #7
Tim::.. wrote:
Can someone please tell me why I keep getting the following error for
some of my web application users but not others??? Even though the
application runs from a central webserver???
Thanks for any help...

Error:
-----

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

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an
object.]
cpncms_v1.editor.GetDocument() +277
cpncms_v1.editor.Page_Load(Object sender, EventArgs e) +122
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

Code:
---------

Private Function GetDocument() As String
Dim ds As DataSet

If Request.ServerVariables("HTTP_REFERER") =
"http://localhost/cpncms_v1/cms/viewpage.aspx" Then
ds = GetDataSet(("SELECT content FROM tblPageContent WHERE
pageID=" + rowID.ToString()))
Cache("iNews") = "False"
ElseIf Request.ServerVariables("HTTP_REFERER") =
"http://localhost/cpncms_v1/cms/news/pgeEditor.aspx" Then
ds = GetDataSet(("SELECT content FROM tblNewsArchive WHERE
newsID=" + rowID.ToString()))
Cache.Remove("iNews")
End If
Dim table As DataTable = ds.Tables(0)
Dim row As DataRow = table.Rows(0)
Dim doc As String = row("content").ToString()
Return doc
ds.Dispose()
End Function 'GetDocument


if HTTP_REFERER is not one of your two adresses (localhost???)
then the dataset (ds) will not have a value, so the code will break
in the "dim table" line.

Hans Kesting
Nov 19 '05 #8
Hi Tim,

AS you mentioned that this works with someone but not with some others and
other members has pointed that it is possibly the Dataset is not retireved
correclty, I'm suspecting that whether you've use impersonating in your web
application so that your sql connecting operation will fail when running
under certain client user's security context? Anyway, you can have a check
in your web application's secuirty setting also.

Thanks,

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: Urgent Help for release...
| thread-index: AcWvtC4pgUrYo+ICTMOvfKxkjYbZdg==
| X-WBNR-Posting-Host: 62.254.216.185
| From: =?Utf-8?B?TWlsb3N6IFNrYWxlY2tp?=
<Mi************@discussions.microsoft.com>
| References: <3F**********************************@microsoft.co m>
<8B**********************************@microsoft.co m>
<83**********************************@microsoft.co m>
| Subject: RE: Urgent Help for release...
| Date: Fri, 2 Sep 2005 04:48:05 -0700
| Lines: 83
| Message-ID: <A8**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:121976
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Can you paste code of the GetDataSet method?
| --
| Milosz Skalecki
| MCP, MCAD
|
|
| "Tim::.." wrote:
|
| > It works fine on my development network but for some reason it doesn't
work
| > when multiple users start to use it...
| >
| > It is almost like only certain clients get connections to the SQL
server???
| >
| > Any ideas???
| >
| > Thanks....
| >
| > "Milosz Skalecki" wrote:
| >
| > > Elo,
| > >
| > > Ensure rowId is properly set and GetDataSet does not return null
reference.
| > >
| > > --
| > > Milosz Skalecki
| > > MCP, MCAD
| > >
| > >
| > > "Tim::.." wrote:
| > >
| > > > Can someone please tell me why I keep getting the following error
for some of
| > > > my web application users but not others??? Even though the
application runs
| > > > from a central webserver???
| > > >
| > > >
| > > > Thanks for any help...
| > > >
| > > > Error:
| > > > -----
| > > >
| > > > Exception Details: System.NullReferenceException: Object reference
not set
| > > > to an instance of an object.
| > > >
| > > > Source Error:
| > > >
| > > > An unhandled exception was generated during the execution of the
current web
| > > > request. Information regarding the origin and location of the
exception can
| > > > be identified using the exception stack trace below.
| > > >
| > > > Stack Trace:
| > > >
| > > > [NullReferenceException: Object reference not set to an instance of
an
| > > > object.]
| > > > cpncms_v1.editor.GetDocument() +277
| > > > cpncms_v1.editor.Page_Load(Object sender, EventArgs e) +122
| > > > System.Web.UI.Control.OnLoad(EventArgs e) +67
| > > > System.Web.UI.Control.LoadRecursive() +35
| > > > System.Web.UI.Page.ProcessRequestMain() +731
| > > >
| > > > Code:
| > > > ---------
| > > >
| > > > Private Function GetDocument() As String
| > > > Dim ds As DataSet
| > > >
| > > > If Request.ServerVariables("HTTP_REFERER") =
| > > > "http://localhost/cpncms_v1/cms/viewpage.aspx" Then
| > > > ds = GetDataSet(("SELECT content FROM tblPageContent
WHERE
| > > > pageID=" + rowID.ToString()))
| > > > Cache("iNews") = "False"
| > > > ElseIf Request.ServerVariables("HTTP_REFERER") =
| > > > "http://localhost/cpncms_v1/cms/news/pgeEditor.aspx" Then
| > > > ds = GetDataSet(("SELECT content FROM tblNewsArchive
WHERE
| > > > newsID=" + rowID.ToString()))
| > > > Cache.Remove("iNews")
| > > > End If
| > > > Dim table As DataTable = ds.Tables(0)
| > > > Dim row As DataRow = table.Rows(0)
| > > > Dim doc As String = row("content").ToString()
| > > > Return doc
| > > > ds.Dispose()
| > > > End Function 'GetDocument
| > > >
|

Nov 19 '05 #9

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

Similar topics

0
by: CHRIS ALOZIE | last post by:
NIGERIAN TELECOMMUNICATION LIMITED. FEDERAL SECRETARIAT COMPLEX, GARKI, ZONE II ABUJA. E-MAIL: chrisalozie@uboot.com DATE:16th August 2003 REF:rf/ntl-fgn
0
by: felix_william | last post by:
Attention=3A Dear friend=2C REQUEST FOR BUSINESS RELATIONSHIP OF GREAT PROFITS I am HON=2E =28DR=2E=29 Felix William=2C the Director of Procurement and Contract Award at the Nigerian National...
9
by: jab | last post by:
Je veux lier (join) une table qui se trouve dans une database avec une qui se trouve dans une autre database. Les 2 databases sont sur le même serveur en l'occurence DB2/NT 7.2.9. J'ai créé un...
0
by: Mike Stoker | last post by:
I'm trying to use an existing COM object from within .NET and am having problems passing a parameter than used to be of type VARIANT. I have a COM interface, IScanner with the following method:...
2
by: Rob Manger | last post by:
Hi Guys, Urgent problem. Trying to compile my solution I get the following error: Linking... LINK: fatal error LNK1181: cannot open input file 'Release\icmpping.abj' Note, I havn't changed...
8
by: Agam Mehta | last post by:
Hi, Everything works fine with ixmlhttprequest. It gives me "access violation" only when i am trying to release it from the memory (i.e pXMLHttpReq->Release()). Below is my code....
0
by: Együd Csaba | last post by:
> -----Original Message----- > From: pgsql-admin-owner@postgresql.org > On Behalf Of Együd Csaba > Sent: 2004. július 16. 12:23 > To: pgsql-admin (E-mail) > Subject: URGENT - Postgres won't...
4
by: Bill Nguyen | last post by:
I converted a VB 03 app to VB 05 app successfully. It worked fine on my machine at home. I made a complete copy of the folder, copied to the machine at work and loaded the solution .SLN. I got the...
0
by: NewJavaBee | last post by:
please guide me. i have the following problem: i have a parent window that has a dropdown that is showing names and which is getting its value from a table.table conatins two columns, one is Name...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
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...

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.