By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,341 Members | 1,395 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,341 IT Pros & Developers. It's quick & easy.

HELP: Object reference not set to an instance of an object

P: n/a
Tee
Hi,

I having a problem with my asp.net project.
The project work fine on my own PC, but when I upload it to the server, I
got the following error :

Object reference not set to an instance of an object

I have try to search for the solution using this error message, and I found
that a lot of other people have the same problem as the project only work in
their own PC. But so far I haven't get any answer that could solve this
question. Anyone know why is this happen and how to fix it ?

Thanks,
Tee
Nov 18 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Several possibilities come to mind:

1. You may be missing a .NET reference on the server. Are all your
references (non-GAC) included in your bin directory?
2. You may be using COM Interop and the COM server you are referencing does
not exist on the IIS server.
3. You may be expecting a value to be set and the value is non-existant
outside your environment, leaving the variable uninitialized.
4. Any number of other possibilities.

If you are in control of the server, try Remote Debugging the application on
the IIS server and step through the code. Otherwise, try adding Trace
objects and listeners to write out application state periodically to an
event log or text file.

John Sturgeon, MCP, MCSD
BizTech Solutions, Inc.

"Tee" <th*@streamyx.com> wrote in message
news:#c**************@TK2MSFTNGP09.phx.gbl...
Hi,

I having a problem with my asp.net project.
The project work fine on my own PC, but when I upload it to the server, I
got the following error :

Object reference not set to an instance of an object

I have try to search for the solution using this error message, and I found that a lot of other people have the same problem as the project only work in their own PC. But so far I haven't get any answer that could solve this
question. Anyone know why is this happen and how to fix it ?

Thanks,
Tee

Nov 18 '05 #2

P: n/a
Tee
Isn't we just upload all the needed dll to the bin folder ?

I have set those COM copy local = true ...

Any Idea ?

Thanks,
Tee

"John Sturgeon" <Jo***@4biztech.com> wrote in message
news:Os**************@TK2MSFTNGP09.phx.gbl...
Several possibilities come to mind:

1. You may be missing a .NET reference on the server. Are all your
references (non-GAC) included in your bin directory?
2. You may be using COM Interop and the COM server you are referencing does not exist on the IIS server.
3. You may be expecting a value to be set and the value is non-existant
outside your environment, leaving the variable uninitialized.
4. Any number of other possibilities.

If you are in control of the server, try Remote Debugging the application on the IIS server and step through the code. Otherwise, try adding Trace
objects and listeners to write out application state periodically to an
event log or text file.

John Sturgeon, MCP, MCSD
BizTech Solutions, Inc.

"Tee" <th*@streamyx.com> wrote in message
news:#c**************@TK2MSFTNGP09.phx.gbl...
Hi,

I having a problem with my asp.net project.
The project work fine on my own PC, but when I upload it to the server, I got the following error :

Object reference not set to an instance of an object

I have try to search for the solution using this error message, and I found
that a lot of other people have the same problem as the project only

work in
their own PC. But so far I haven't get any answer that could solve this
question. Anyone know why is this happen and how to fix it ?

Thanks,
Tee


Nov 18 '05 #3

P: n/a
I would try a few things:

1. Create a web project that does not use a code-behind file. Just a
simple WebForm1.aspx. See if you get the same error with this web
project.

2. Is the .NET framework installed properly? The .NET framework should
be installed after IIS has been installed. Otherwise, you will need to
run some utility to uninstall and reinstall ASP.NET.

Tommy,

"Tee" <th*@streamyx.com> wrote in message news:<#c**************@TK2MSFTNGP09.phx.gbl>...
Hi,

I having a problem with my asp.net project.
The project work fine on my own PC, but when I upload it to the server, I
got the following error :

Object reference not set to an instance of an object

I have try to search for the solution using this error message, and I found
that a lot of other people have the same problem as the project only work in
their own PC. But so far I haven't get any answer that could solve this
question. Anyone know why is this happen and how to fix it ?

Thanks,
Tee

Nov 18 '05 #4

P: n/a
Tee
I am using a shared hosting. It is windows 2003, win2k3 come with .NET
framework, so this shouldn't be the problem, right ?

"Tommy" <We**********@Hotmail.com> wrote in message
news:a8**************************@posting.google.c om...
I would try a few things:

1. Create a web project that does not use a code-behind file. Just a
simple WebForm1.aspx. See if you get the same error with this web
project.

2. Is the .NET framework installed properly? The .NET framework should
be installed after IIS has been installed. Otherwise, you will need to
run some utility to uninstall and reinstall ASP.NET.

Tommy,

"Tee" <th*@streamyx.com> wrote in message

news:<#c**************@TK2MSFTNGP09.phx.gbl>...
Hi,

I having a problem with my asp.net project.
The project work fine on my own PC, but when I upload it to the server, I got the following error :

Object reference not set to an instance of an object

I have try to search for the solution using this error message, and I found that a lot of other people have the same problem as the project only work in their own PC. But so far I haven't get any answer that could solve this
question. Anyone know why is this happen and how to fix it ?

Thanks,
Tee

Nov 18 '05 #5

P: n/a
Not in the case of COM components. They MUST exist on the server that you
are executing your application from.

COM components must be registered on the server that they are used from,
i.e. in the registry. The Interop DLL is copied into the bin directory, but
it is just a proxy class. It is a translation layer between .NET and COM.
It needs to be able to access the actual COM server.

Hope this helps,

John

"Tee" <th*@streamyx.com> wrote in
news:OH**************@TK2MSFTNGP09.phx.gbl:
Isn't we just upload all the needed dll to the bin folder ?

I have set those COM copy local = true ...

Any Idea ?

Thanks,
Tee

"John Sturgeon" <Jo***@4biztech.com> wrote in message
news:Os**************@TK2MSFTNGP09.phx.gbl...
Several possibilities come to mind:

1. You may be missing a .NET reference on the server. Are all your
references (non-GAC) included in your bin directory?
2. You may be using COM Interop and the COM server you are
referencing

does
not exist on the IIS server.
3. You may be expecting a value to be set and the value is
non-existant outside your environment, leaving the variable
uninitialized. 4. Any number of other possibilities.

If you are in control of the server, try Remote Debugging the
application

on
the IIS server and step through the code. Otherwise, try adding Trace
objects and listeners to write out application state periodically to
an event log or text file.

John Sturgeon, MCP, MCSD
BizTech Solutions, Inc.

"Tee" <th*@streamyx.com> wrote in message
news:#c**************@TK2MSFTNGP09.phx.gbl...
> Hi,
>
> I having a problem with my asp.net project.
> The project work fine on my own PC, but when I upload it to the
> server, I > got the following error :
>
> Object reference not set to an instance of an object
>
> I have try to search for the solution using this error message, and
> I

found
> that a lot of other people have the same problem as the project
> only

work
in
> their own PC. But so far I haven't get any answer that could solve
> this question. Anyone know why is this happen and how to fix it ?
>
> Thanks,
> Tee
>
>




Nov 18 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.