Help with a trace..

R

Rob Meade

Hi all,

I've written a small Index Server class library which will me to make simple
lookups...I've just tied this in to a .aspx page and for a one word search
was working nicely.

I then added some code to enable multiple words to be used, ie, breaking the
criteria up, plonking it into an arraylist, then, whilst building the sql,
iterating through it etc etc...

I keep getting the same error, about a conversion from a String() to a
String....very odd....

My other slight niggle is that I can only really test this on our production
server as thats the only place I have a nice big catalog to rifle through,
but unfortunately when its there I cannot debug it properly - when I've
tried debugging on my own localhost it all seems ok - but obviously dies
when it tries to connect to the catalog.

Here's the trace from the .aspx - any help would be really appreciated, I
cant even work out what line number/function/sub to be looking at!

[InvalidCastException: Cast from type 'String()' to type 'String' is not
valid.]
Microsoft.VisualBasic.CompilerServices.StringType.FromObject(Object
Value) +616
IndexServer_Component.Result..ctor(DataRow dataRow) +2207
IndexServer_Component.Results.SearchIndexServer(String searchCriteria)
+317
NBTPublicSearch.Search.Button1_Click(Object sender, EventArgs e) +82
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292


Thanks in advance,

Regards

Rob
 
H

Hans Baumann

If you can't see what the line number is generating the exception, you could
try to put the .pdb file (with the same name as the dll) in the same bin (or
equivalent) directory and the next time you have an unhandled exception, it
will give you the exact line number...

Also I assume you still compile your proyect in debug mode...

hope this helps
Hans
 
R

Rob Meade

...
If you can't see what the line number is generating the exception, you
could try to put the .pdb file (with the same name as the dll) in the same
bin (or equivalent) directory and the next time you have an unhandled
exception, it will give you the exact line number...

Thats very useful information Hans, many thanks - I will try that now..
Also I assume you still compile your proyect in debug mode...

I think on a couple of occassions it might have gone across in release mode
(as I couldn't debug it anyway) - but I will ensure that its in Debug mode
now...

Thanks for your suggestions - I'll try them now!

Rob
 
K

Kris

Hi Rob,

I assume it is trying to convert String array type to String. Can you
please check that?

Cheers,
Kris
 
K

Kris

Hi Rob,

I assume it is trying to convert String array type to String.

Check the casting and ensure it is just String type.

Cheers,
Kris
 

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,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top