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

T

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
 
J

John Sturgeon

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.
 
T

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
 
T

Tommy

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,
 
T

Tee

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

John Sturgeon

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,539
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top