|
Rank: Member
Groups: Registered
Joined: 6/2/2014 Posts: 7
|
Hello, I'm a licensed user of ASP.NET Search. ASP.NET Search Version: 2010.4.11.1004
We have an index on a shared computer \\testserver\KeyotiIndex
When I use my local development against the UNC index... I have no problems.
When I deploy code to our testing server and point that server the the UNC index... I get an error.
"Input string was not in a correct format." Trace:
[FormatException: Input string was not in a correct format.] System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +10725735 System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +145 System.Convert.ToInt32(String value) +43 Keyoti.SearchEngine.Index.IndexableSources.IndexableSourceUri..ctor(Uri uri) +496 Keyoti.SearchEngine.Index.IndexableSources.a.a(Uri A_0) +71 Keyoti.SearchEngine.Search.ResultItem.get_UriString() +104
When I look closer to with a debugger I see the following value for ResultItem.UriStringAsStored - locally it's idxsrc://6/?pk=page%3dtest%26Filter%3dOO&uniqueColumn=WikiLinkPage
- on the test server it's idxsrc://0.0.0.6/?pk=page%3dtest%26Filter%3dOO&uniqueColumn=WikiLinkPage
What do I need to do to make my code work the same on both my local development and testing server?
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Good job finding that! At some .NET release (possibly a service pack, we don't know as this doesn't appear to be documented) the following code produces a different result to what it used to Code: new Uri("idxsrc://6/").AbsolutePath
With the .NET version that produced the index, the code outputs "idxsrc://6" and with the .NET code that is consuming the index it produces "idxsrc://0.0.0.6" So the solution is to try and match the .NET version that is producing the index with the version using it. As I say it could be a SP. Sorry about that, please let me know if I can help further, Jim -your feedback is helpful to other users, thank you!-your feedback is helpful to other users, thank you!
|
|
Rank: Member
Groups: Registered
Joined: 6/2/2014 Posts: 7
|
Tim-
Thank you for your response.
So the solution is to try and match the .NET version that is producing the index with the version using it. Oddly, the original index was built by our test server. So the "index producing framework" and "index using framework" are the same in the case of the error.
Our test server and my development do appear to have different v4.0 version numbers. (4.5.50709 and 4.0.30319 respectively according to [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full]"Version")
Therefore, it appears that upgrading to the v4.0 (4.5.50709) framework will generate the 0.0.0.6 host value. Looking at the stack trace: System.Convert.ToInt32("0.0.0.6") will always throw the "Input string was not in a correct format." message.
Being that downgrading from 4.5.50709 to 4.0.30319 on our test server isn't really an option, is there some type of patch or work around I can use?
I really appreciate your help on this.
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Sorry looks like we already worked around it in v2012, here's a patch for 2010 https://www.dropbox.com/...aseNET4-2010-IDXSRC.zip
You don't need to recreate the index, this version will tolerate it being stored as 0.0.0.6 for example. -your feedback is helpful to other users, thank you!-your feedback is helpful to other users, thank you!
|
|
Rank: Member
Groups: Registered
Joined: 6/2/2014 Posts: 7
|
Jim-
Thank you for the patch... I feel like we're almost there, but I think the patch might be missing a file. "Keyoti4.SearchEngin.License.dll"
I get the following exception when I run our software:
System.IO.FileNotFoundException was unhandled by user code Message=Could not load file or assembly 'Keyoti4.SearchEngine.License, Version=1.0.0.0, Culture=neutral, PublicKeyToken=58d9fd2e9ec4dc0e' or one of its dependencies. The system cannot find the file specified. Source=Keyoti FileName=Keyoti4.SearchEngine.License, Version=1.0.0.0, Culture=neutral, PublicKeyToken=58d9fd2e9ec4dc0e ... Calling assembly : Keyoti4.SearchEngine.Core, Version=2010.4.1.708, Culture=neutral, PublicKeyToken=58d9fd2e9ec4dc0e. === LOG: This bind starts in default load context. LOG: Using application configuration file: <our website file path - redacted>\web.config LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. LOG: Post-policy reference: Keyoti4.SearchEngine.License, Version=1.0.0.0, Culture=neutral, PublicKeyToken=58d9fd2e9ec4dc0e LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/6572aa97/dd2861ce/Keyoti4.SearchEngine.License.DLL. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/6572aa97/dd2861ce/Keyoti4.SearchEngine.License/Keyoti4.SearchEngine.License.DLL. LOG: Attempting download of new URL file:///<our website file path - redacted>/bin/Keyoti4.SearchEngine.License.DLL. LOG: Attempting download of new URL file:///<our website file path - redacted>/bin/Keyoti4.SearchEngine.License/Keyoti4.SearchEngine.License.DLL. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/6572aa97/dd2861ce/Keyoti4.SearchEngine.License.EXE. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/6572aa97/dd2861ce/Keyoti4.SearchEngine.License/Keyoti4.SearchEngine.License.EXE. LOG: Attempting download of new URL file:///<our website file path - redacted>/bin/Keyoti4.SearchEngine.License.EXE. LOG: Attempting download of new URL file:///<our website file path - redacted>/bin/Keyoti4.SearchEngine.License/Keyoti4.SearchEngine.License.EXE.
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Sorry I didn't explain, you should use the one from the MSI install. I didn't send it because I don't know if you're licenses for Lite or Pro. -your feedback is helpful to other users, thank you!-your feedback is helpful to other users, thank you!
|
|
Rank: Member
Groups: Registered
Joined: 6/2/2014 Posts: 7
|
Hi Jim-
I installed the Pro License using the MSI and got past my last issue... unfortunately I'm still getting the original "Input string was not in a correct format." error using the patch you provided.
Is there anything else you can suggest?
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Could you send me the current stack trace on that please? -your feedback is helpful to other users, thank you!-your feedback is helpful to other users, thank you!
|
|
Rank: Member
Groups: Registered
Joined: 6/2/2014 Posts: 7
|
Happily:
Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: Input string was not in a correct format.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[FormatException: Input string was not in a correct format.] System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +10725735 System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +145 System.Convert.ToInt32(String value) +43 Keyoti.SearchEngine.Index.IndexableSources.IndexableSourceUri..ctor(Uri uri) +496 Keyoti.SearchEngine.Index.IndexableSources.c.a(Uri A_0) +71 Keyoti.SearchEngine.Search.ResultItem.get_UriString() +104 <The call stack from my software - redacted>
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Thanks, it indicates that the old DLLs are still in use (there is no longer a direct call to Convert.ToInt32 in the constructor. Can you check that the search core DLL in the bin is version 2010.4.1.708 -your feedback is helpful to other users, thank you!-your feedback is helpful to other users, thank you!
|
|
Rank: Member
Groups: Registered
Joined: 6/2/2014 Posts: 7
|
Jim- I have the correct DLL in my bin. Just to test... I manually deleted the "Keyoti4.SearchEngine.Core.DLL" (v2010.4.1.708) file from my bin folder. Reloaded the page, to receive an "unknown type" error caused by the missing DLL. Once I restored the DLL I received the "Input string was not in a correct format." error again. Using a reflection tool (forgive me :-/) on the "Keyoti4.SearchEngine.Core.DLL" (v2010.4.1.708) you provided. I'm still seeing a use of a Convert.ToInt32 in Keyoti.SearchEngine.Index.IndexableSources.IndexableSourceUri.IndexableSourceUri(Uri uri) The Convert.ToInt32 appears to be in the final line of the ctor when trying to convert substring value of the absoluteUri variable. (Example (expires in 2 days): http://www.2ty.in/tempdemourl ) I hope this information helps.
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Ah, sorry there was a problem with the build script - should be OK now. https://www.dropbox.com/...T4-2010-IDXSRC.zip?new2
Jim -your feedback is helpful to other users, thank you!-your feedback is helpful to other users, thank you!
|
|
Rank: Member
Groups: Registered
Joined: 6/2/2014 Posts: 7
|
SUCCESS!
Jim, Thank you very much for your help on the matter.
|
|