Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2006

Tip: Looking for answers? Try searching our database.

Help with a trace..

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rob Meade - 16 Feb 2006 09:57 GMT
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
Hans Baumann - 16 Feb 2006 10:54 GMT
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

> Hi all,
>
[quoted text clipped - 40 lines]
>
> Rob
Rob Meade - 16 Feb 2006 11:02 GMT
> 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
Kris - 16 Feb 2006 12:09 GMT
Hi Rob,

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

Cheers,
Kris
Kris - 16 Feb 2006 12:10 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.