Hi all,
I'm trying to inherit the SimpleWorkerRequest class.
my code is like this..
public class Request : SimpleWorkerRequest
{
public Request(): base(String.Empty,String.Empty,null)
{
}
}
(Here the constructor is argumentles..but i tried with some different
parameters also)
I'm getting an error while creating a new Request Object ..
"An unhandled exception of type 'System.NullReferenceException'
occurred in system.web.dll
Additional information: Object reference not set to an instance of an
object."
what i'm doing wrong here?
Can anyone help me to fix this?
Thanks for ur help,
Suresh.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
---------------------------------------------------------- http://www.usenet.com 7 1647
your problem is being caused by the null reference in the argument list when
calling the base constructor. Please refer to the class documentation of the
SimpleWorkerRequest for the correct constructor/s.
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpref/html/frlrfsystemwebhost
ingsimpleworkerrequestmemberstopic.htm
--
Br,
Mark Broadbent
mcdba , mcse+i
=============
"sureshsundar007" <su****@dynu-dot-com.no-spam.invalid> wrote in message
news:40********@Usenet.com... Hi all,
I'm trying to inherit the SimpleWorkerRequest class.
my code is like this.. public class Request : SimpleWorkerRequest { public Request(): base(String.Empty,String.Empty,null) { } } (Here the constructor is argumentles..but i tried with some different parameters also)
I'm getting an error while creating a new Request Object ..
"An unhandled exception of type 'System.NullReferenceException' occurred in system.web.dll
Additional information: Object reference not set to an instance of an object."
what i'm doing wrong here?
Can anyone help me to fix this?
Thanks for ur help, Suresh.
Posted Via Usenet.com Premium Usenet Newsgroup Services ---------------------------------------------------------- ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY ** ---------------------------------------------------------- http://www.usenet.com
Suresh,
You are calling the SimpleWorkerRequest classes constructor, the
constructor takes three arguments and it expects those arguments to
have a value. Some methods or constructors that take an object may
consider null a valid argument but most do not, they expect a value.
The call to your bases constructor is choking on the null, my guess is
it will also choke on the string.Empty. In order for the class to
operate it requires values for these arguments.
Cecil Howell
MCSD, MCT su****@dynu-dot-com.no-spam.invalid (sureshsundar007) wrote in message news:<40********@Usenet.com>... Hi all,
I'm trying to inherit the SimpleWorkerRequest class.
my code is like this.. public class Request : SimpleWorkerRequest { public Request(): base(String.Empty,String.Empty,null) { } } (Here the constructor is argumentles..but i tried with some different parameters also)
I'm getting an error while creating a new Request Object ..
"An unhandled exception of type 'System.NullReferenceException' occurred in system.web.dll
Additional information: Object reference not set to an instance of an object."
what i'm doing wrong here?
Can anyone help me to fix this?
Thanks for ur help, Suresh.
Posted Via Usenet.com Premium Usenet Newsgroup Services ---------------------------------------------------------- ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY ** ---------------------------------------------------------- http://www.usenet.com
Thanks for the replies..
I tried by giving values to the base class constructor parameters..but
the reult is same.I'm getting the same Exception when the new Request
object is created.
I saw a piece of code in Cassini Web server which also extends the
SimpleWrokerRequest with the constructor is like this...
public Request(Host host,Connection conn) : base
(String.Empty,String.Empty,null)
{
_host = host;
_conn = conn;
}
and it works without any problems.So it means that SimpleWorkerRequest
constructor accepts null values...correct?
I'm clueless about this exception....please help to resolve this...
Thanks,
Suresh.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
---------------------------------------------------------- http://www.usenet.com
sureshsundar007 <su****@dynu-dot-com.no-spam.invalid> wrote: Thanks for the replies..
I tried by giving values to the base class constructor parameters..but the reult is same.I'm getting the same Exception when the new Request object is created.
I saw a piece of code in Cassini Web server which also extends the SimpleWrokerRequest with the constructor is like this...
public Request(Host host,Connection conn) : base (String.Empty,String.Empty,null) { _host = host; _conn = conn; }
and it works without any problems.So it means that SimpleWorkerRequest constructor accepts null values...correct?
I'm clueless about this exception....please help to resolve this...
It could be that Cassini doesn't use whatever it is that causes the
exception, or sets the writer some other way.
--
Jon Skeet - <sk***@pobox.com> http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
at last this is what i tried...
public class Request : SimpleWorkerRequest
{
public Request(string page,string query,StringWriter wr):base
(page,query,wr)
{
MessageBox.Show("hai");
}
}
But still i'm getting that exception with the exception is highlighted
on the line MessageBox.Show("hai").
Any help?
Suresh.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
---------------------------------------------------------- http://www.usenet.com
sureshsundar007 <su****@dynu-dot-com.no-spam.invalid> wrote: at last this is what i tried...
public class Request : SimpleWorkerRequest { public Request(string page,string query,StringWriter wr):base (page,query,wr) { MessageBox.Show("hai"); } }
But still i'm getting that exception with the exception is highlighted on the line MessageBox.Show("hai").
Any help?
And what are you passing into your constructor?
--
Jon Skeet - <sk***@pobox.com> http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Suresh,
If you are still having trouble post the stack dump from the
exception. This should provide a big clue.
Cecil Howell
MCSD, MCT su****@dynu-dot-com.no-spam.invalid (sureshsundar007) wrote in message news:<40**********@Usenet.com>... at last this is what i tried...
public class Request : SimpleWorkerRequest { public Request(string page,string query,StringWriter wr):base (page,query,wr) { MessageBox.Show("hai"); } }
But still i'm getting that exception with the exception is highlighted on the line MessageBox.Show("hai").
Any help?
Suresh.
Posted Via Usenet.com Premium Usenet Newsgroup Services ---------------------------------------------------------- ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY ** ---------------------------------------------------------- http://www.usenet.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: slurper |
last post by:
i have the following
class sequence {
public:
sequence (const sequence& mysequence, const int newjob) {
job_sequence(mysequence.job_sequence)
job_sequence.push_back(newjob);
...
}
|
by: Martin Oddman |
last post by:
Hi,
I have a compiling problem. Please take a look at the code below.
I have an application that is built upon three tiers: one data tier
(Foo.DataManager), one business tier (Foo.Kernel) and...
|
by: Ben Blank |
last post by:
I'm writing a family of classes which all inherit most of their methods and
code (including constructors) from a single base class. When attempting to
instance one of the derived classes using...
|
by: Queen |
last post by:
Hi!
First of all, perdon for my English. I don't express the thinks very good.
Well, I'm working with eclipse 3.1.1, wxWidgets 2.4.2, MSYS 1.0.10 and Mingw 3.1.0. I'm doing a project in c++....
|
by: Chameleon |
last post by:
-------------------
class A {
public:
A() { blabla(); }
A(int a) : A() { another_blabla(); } // why wrong?
}
-------------------
I want 2nd ctor, runs content of 1st ctor and after its...
|
by: Jeroen |
last post by:
Hi all,
I'm trying to implement a certain class but I have problems regarding
the copy ctor. I'll try to explain this as good as possible and show
what I tried thusfar. Because it's not about a...
|
by: seank76 |
last post by:
While going through my company's existing codebase, I saw a bunch of
weird lines.
Take a look at this one:
class A
{
public:
A(Foo *f) : _f(f) {}
|
by: clicwar |
last post by:
A simple program with operator overloading and copy constructor:
#include <iostream>
#include <string>
using namespace std;
class Vector {
private:
float x,y;
public:
Vector(float u, float...
|
by: JD |
last post by:
Hi,
My associate has written a copy constructor for a class. Now I need to add
an operator = to the class. Is there a way to do it without change her code
(copy constructor) at all? Your help...
|
by: abhash |
last post by:
I am bit puzzled at the following piece of code I tried:
----------------------------------------------------------------------------------
#include <iostream>
using namespace std;
class Test...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |