Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > HELP: Object reference not set to an instance of an object

Reply
Thread Tools

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

 
 
Tee
Guest
Posts: n/a
 
      11-26-2003
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


 
Reply With Quote
 
 
 
 
John Sturgeon
Guest
Posts: n/a
 
      11-26-2003
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" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
 
Tee
Guest
Posts: n/a
 
      11-27-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:#(E-Mail Removed)...
> > 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
> >
> >

>
>



 
Reply With Quote
 
Tommy
Guest
Posts: n/a
 
      11-27-2003
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" <(E-Mail Removed)> wrote in message news:<#(E-Mail Removed)>...
> 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

 
Reply With Quote
 
Tee
Guest
Posts: n/a
 
      11-27-2003
I am using a shared hosting. It is windows 2003, win2k3 come with .NET
framework, so this shouldn't be the problem, right ?



"Tommy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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" <(E-Mail Removed)> wrote in message

news:<#(E-Mail Removed)>...
> > 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



 
Reply With Quote
 
John Sturgeon
Guest
Posts: n/a
 
      12-02-2003
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" <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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" <(E-Mail Removed)> wrote in message
>> news:#(E-Mail Removed)...
>> > 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
>> >
>> >

>>
>>

>
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Object reference not set to an instance of an object" Weird thing happens with reference a link nguyentrongkha@gmail.com ASP .Net 1 09-20-2007 09:46 PM
Error:Object reference not set to an instance of an object. Suresh Kojhani ASP .Net 1 07-29-2004 12:10 PM
Error !Object reference not set to an instance of an object. !!! Help Parthiv Joshi ASP .Net 2 07-02-2004 10:28 AM
Object reference not set to an instance of an object. yysiow ASP .Net 1 07-12-2003 03:30 PM
Object reference not set to an instance of an object. Chris Fink ASP .Net 2 07-03-2003 06:48 PM



Advertisments