Problem to error

Hi,
Due to problem below
22m.png
how to identify reason of it, to this?
http://my-friend.co/HouseList4/Default.aspx?userid=mc1
LVL 11
HuaMin ChenSystem AnalystAsked:
Who is Participating?
 
Ryan ChongConnect With a Mentor Commented:
first, make sure your class: HouseData got declared with a property of serial_id ?

second, what if try something like this?

serial_id = Convert.ToInt32(dataRow.Field["serial_id"].ToString());

Open in new window

0
 
Shaun VermaakTechnical Specialist/DeveloperCommented:
Can you post content of Default.aspx?
0
 
Sam Simon NasserIT Support ProfessionalCommented:
enable see detailed error
On IIS 6

<configuration>
    <system.web>
        <customErrors mode="Off"/>
        <compilation debug="true"/>
    </system.web>
</configuration>

Open in new window

On IIS 7

<configuration>
    <system.webServer>
        <httpErrors errorMode="Detailed" />
        <asp scriptErrorSentToBrowser="true"/>
    </system.webServer>
    <system.web>
        <customErrors mode="Off"/>
        <compilation debug="true"/>
    </system.web>
</configuration>

Open in new window


this will help you figure out where is your problem.
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
HuaMin ChenSystem AnalystAuthor Commented:
Thanks to all.

Shaun,
I currently added one more column to GetHouseList and then problem appeared. Last line below is the added column.

                                        ...
                                        .Select(dataRow => new HouseData
                                        {
                                            serial_id = dataRow.Field<int>("serial_id"),
                                            ...

Open in new window


Sam,
I am already with your mentioned codes in Web.config file.
0
 
Ryan ChongCommented:
how you call the url of /HouseList4/Default.aspx/GetHouseList? is this a valid URL?

try use and catch the InnerException in your method to see if you can find more details there...

https://www.c-sharpcorner.com/uploadfile/puranindia/innerexception-in-C-Sharp/
0
 
HuaMin ChenSystem AnalystAuthor Commented:
Here is StackTrace I get to error (within event). What to adjust?

at System.Data.DataRowExtensions.UnboxT`1.ValueField(Object value)
   at Own_rec._Default.<GetHouseList>b__1(DataRow dataRow)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext
0
 
HuaMin ChenSystem AnalystAuthor Commented:
Sorry, here is relevant column

ROW_NUMBER() OVER (ORDER BY house_id ASC) serial_id

Open in new window


and it should be fine to this line below. Right?
                                                serial_id = dataRow.Field<int>("serial_id"),
                                                ...

Open in new window

0
 
Ryan ChongCommented:
is your method of "GetHouseList" connected to the right data source?

make sure it got selected the new field: serial_id ?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.