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

Object Reference

I am having a very strange problem with my asp.net application. I am
getting error: 'Object reference not set to an instance of an object' when I
run my app from my hosting company. I have installed my application on
three different machines (including a brand new install of winxp, vs2003) at
our offices and everything seems to work fine. What could be wrong with the
server at hosting company. When i speak to them about the problem they
point the finger at my script, which I think is not a problem because it
works fine everytime I install it. I really need help with this problem.
Thanks.

Arben
Nov 19 '05 #1
4 1291
Hello Arapi,

Though the problem you have written may have number of reasons, but i feel
like that there is something which you make a reference on your development
machine is not present on the host machine.

Check out all the references you made, there respective dll;s are present as
well as in the hosting machine.

--
Wajahat Abbas

http://www.wajahatabbas.com
http://www.dotnetpakistan.com


"Arapi" wrote:
I am having a very strange problem with my asp.net application. I am
getting error: 'Object reference not set to an instance of an object' when I
run my app from my hosting company. I have installed my application on
three different machines (including a brand new install of winxp, vs2003) at
our offices and everything seems to work fine. What could be wrong with the
server at hosting company. When i speak to them about the problem they
point the finger at my script, which I think is not a problem because it
works fine everytime I install it. I really need help with this problem.
Thanks.

Arben

Nov 19 '05 #2
Hi Wajahat,
Thank you for your response. The way I do my deployment is: copy all the
contents of the bin folder to the bin folder on the hosting machine, and
aspx files to their respective folders.
I just dont understand that if my application works in three different
machines with default installation (no customized installations whatsoever)
why I am getting this error on the host machine?

"Wajahat Abbas" <wa**********@yahoo.com> wrote in message
news:DF**********************************@microsof t.com...
Hello Arapi,

Though the problem you have written may have number of reasons, but i feel
like that there is something which you make a reference on your
development
machine is not present on the host machine.

Check out all the references you made, there respective dll;s are present
as
well as in the hosting machine.

--
Wajahat Abbas

http://www.wajahatabbas.com
http://www.dotnetpakistan.com


"Arapi" wrote:
I am having a very strange problem with my asp.net application. I am
getting error: 'Object reference not set to an instance of an object'
when I
run my app from my hosting company. I have installed my application on
three different machines (including a brand new install of winxp, vs2003)
at
our offices and everything seems to work fine. What could be wrong with
the
server at hosting company. When i speak to them about the problem they
point the finger at my script, which I think is not a problem because it
works fine everytime I install it. I really need help with this problem.
Thanks.

Arben

Nov 19 '05 #3
You are counting for certain objects to be present but they are not. Whether
it because they don't exist on the host machine, like the other poster
suggested, or you might lack necessary permission for using them. The bottom
line there is something in the program that is supposed to instantiate an
object and this doesn't happen.

Eliyahu

"Arapi" <aa****@gmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi Wajahat,
Thank you for your response. The way I do my deployment is: copy all the
contents of the bin folder to the bin folder on the hosting machine, and
aspx files to their respective folders.
I just dont understand that if my application works in three different
machines with default installation (no customized installations whatsoever) why I am getting this error on the host machine?

"Wajahat Abbas" <wa**********@yahoo.com> wrote in message
news:DF**********************************@microsof t.com...
Hello Arapi,

Though the problem you have written may have number of reasons, but i feel like that there is something which you make a reference on your
development
machine is not present on the host machine.

Check out all the references you made, there respective dll;s are present as
well as in the hosting machine.

--
Wajahat Abbas

http://www.wajahatabbas.com
http://www.dotnetpakistan.com


"Arapi" wrote:
I am having a very strange problem with my asp.net application. I am
getting error: 'Object reference not set to an instance of an object'
when I
run my app from my hosting company. I have installed my application on
three different machines (including a brand new install of winxp, vs2003) at
our offices and everything seems to work fine. What could be wrong with the
server at hosting company. When i speak to them about the problem they
point the finger at my script, which I think is not a problem because it works fine everytime I install it. I really need help with this problem. Thanks.

Arben


Nov 19 '05 #4
> What could be wrong with the server at hosting company. When i speak to
them about the problem they point the finger at my script, which I think
is not a problem because it works fine everytime I install it. I really
need help with this problem.
Do you program with that logic? You don't know where it's been! ;-)

Let me explain, if I may. You say you're getting an exception: "Object
reference not set to an instance of an object." This exception means that
some code in your app is referencing an object which does not exist. For
example, you create a variable, using a method, which returns null
(Nothing), and then, without checking to see whether it is nothing, you
attempt to use it as if it were the object you expect it to be.

Now, you posted no other information about this exception, such as where in
your application it occurred, which can be obtained from the Exception
thrown, using a Stack Trace. This is the first step to diagnosing your
problem. You need to identify the page that contained the line in your code
that threw the exception, and the line of code itself. Next, you need to
identify the object references in that line of code, and work backwards from
each one, identifying what operation(s) might cause that object reference to
be null (Nothing). The easiest way to do this is to implement structured
exception handling (Try/Catch), and using whatever means you choose to pass
the exception information to you, such as logging it, writing it to a file,
or displaying it in the page (which may be the only possible method on a
hosted web site, depending on your permissions).

Knowing what operation caused the object reference to be null (Nothing) will
determine the cause of the issue, and more importantly, what you need to do
to prevent it.

Assuming with no information that the fault somehow lies with your hosting
service environment, simply because you haven't managed to reproduce it on
your local development machine is a gigantic leap of illogical assumption!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Arapi" <aa****@gmail.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...I am having a very strange problem with my asp.net application. I am
getting error: 'Object reference not set to an instance of an object' when
I run my app from my hosting company. I have installed my application on
three different machines (including a brand new install of winxp, vs2003)
at our offices and everything seems to work fine. What could be wrong with
the server at hosting company. When i speak to them about the problem they
point the finger at my script, which I think is not a problem because it
works fine everytime I install it. I really need help with this problem.
Thanks.

Arben

Nov 19 '05 #5

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

Similar topics

6
by: Chris S. | last post by:
I'm trying to make a graphical editor and browser for Pickled files. One aspect I'm not sure about is how to detect multiple references to the same data. For instance, say I had the Pickled...
28
by: Daniel | last post by:
Hello =) I have an object which contains a method that should execute every x ms. I can use setInterval inside the object construct like this - self.setInterval('ObjectName.methodName()',...
11
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in...
29
by: web1110 | last post by:
If I have 2 variables, A and B, referencing the same object and then do a A.Dispose(), what happens to B?
5
by: Michael Moreno | last post by:
Hello, In a class I have this code: public object Obj; If Obj is a COM object I would like to call in the Dispose() method the following code: ...
16
by: anonymous.user0 | last post by:
The way I understand it, if I have an object Listener that has registered as a listener for some event Event that's produced by an object Emitter, as long as Emitter is still allocated Listener...
7
by: TS | last post by:
I was under the assumption that if you pass an object as a param to a method and inside that method this object is changed, the object will stay changed when returned from the method because the...
3
by: User1014 | last post by:
A global variable is really just a property of the "Global Object", so what does that make a function defined in the global context? A method of the Global Object? ...
2
by: Ralph | last post by:
Hi I don't understand why it's not working: function schedule(imTop){ this.tdImagesTop = imTop; } schedule.prototype.selectEl = function() { alert(this.tdImagesTop);
275
by: Astley Le Jasper | last post by:
Sorry for the numpty question ... How do you find the reference name of an object? So if i have this bob = modulename.objectname() how do i find that the name is 'bob'
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.