arachnode.net
An Open Source C# web crawler with Lucene.NET search using SQL Server 2008/2012/2014/2016/CE An Open Source C# web crawler with Lucene.NET search using MongoDB/RavenDB/Hadoop

Completely Open Source @ GitHub

Does arachnode.net scale? | Download the latest release

System.Activator.CreateInstance(String assemblyName, String typeName) fails

rated by 0 users
Answered (Verified) This post has 1 verified answer | 6 Replies | 2 Followers

Top 10 Contributor
229 Posts
megetron posted on Tue, Aug 3 2010 12:02 AM

Hi,

I am running AN on a remote machine, after compiling the solution I take all of the console files, and copy them to the remote machine. when executing the console on the remote machine I get this:

   ?-  System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)     ?-  System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)     ?-  System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)     ?-  System.Activator.CreateInstance(Type type, Boolean nonPublic)     ?-  System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)     ?-  System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)     ?-  System.Activator.CreateInstance(String assemblyName, String typeName)     ?-  Arachnode.SiteCrawler.Core.Engine.GetObjectHandle(String assemblyName, String typeName)     ?-  Arachnode.SiteCrawler.Crawler.LoadCrawlActions(ArachnodeDAO arachnodeDAO)     ?-  Arachnode.SiteCrawler.Crawler..ctor(CrawlMode crawlMode, Boolean enableRenderers)

 

 

When debugging this I see that the error happens on  LoadCrawlActions->CreateInstance

and it happens on the crawlaction that I created....:\

What do I do wrong? maybe the plugin project did not compiled well?

please advice.

Answered (Verified) Verified Answer

Top 10 Contributor
1,905 Posts

OK, the solution was to check the constructors on the custom plugins to check for errors, null reference exceptions, etc.  Big Smile

I will add code in the section that raised the error to display the inner exception as well.

For best service when you require assistance:

  1. Check the DisallowedAbsoluteUris and Exceptions tables first.
  2. Cut and paste actual exceptions from the Exceptions table.
  3. Include screenshots.

Skype: arachnodedotnet

All Replies

Top 10 Contributor
1,905 Posts

0.) It would be preferrable to be able to debug, so if you can attach a debugger, do this.

1.) Remove all of the rows out of the rules and actions that aren't AN defaults.

2.) If still failing, try recompiling, and comment the sections in the Crawler that load the actions and rules.

3.) If you cannot attach a debugger, add MessageBoxes that list which rule is actually having the problem.  The first rule, action?  Which one?

For best service when you require assistance:

  1. Check the DisallowedAbsoluteUris and Exceptions tables first.
  2. Cut and paste actual exceptions from the Exceptions table.
  3. Include screenshots.

Skype: arachnodedotnet

Top 10 Contributor
229 Posts

Can you please explain how do you debug AN with remote machine? the VS is installed on PC1, and I run the console(release version) on PC2. so how do I do the debug herem I am not sure.

After renove all rows and move the custom plugin off, everything works fine.

about messageboxes...I have done this, and I see that the 4th action (the custom plugin) has a poblem. I don't know the specific error(the error message in yellow looks like: ??? ?????? ??? ??? ?? ? ???)

 

Top 10 Contributor
1,905 Posts

If the custom plugin has the problem, does it work OK on a machine that has VS installed, or from the source?

If your plugin references are using a directory path, does the account executing the console have access?

Post a picture of your plugin config tables?

The Assembly and/or TypeName reference paths are probably incorrect.  Why your encoding is switched, I don't know.

Remote debugging:

  • How to: Set Up Remote Debugging

    Install the remote debugging components on the remote computer and launch the Remote Debugging Monitor (msvsmon.exe) when you start debugging ...
    msdn.microsoft.com/en-us/library/bt727f1t.aspx - Cached - Similar
  • How to get Remote Debugging work properly

    Dec 10, 2007 ... First of all you have to run the Visual Studio 2008 Remote Debugger Configuration Wizard, which will open up the correct ports in your ...
    www.wictorwilen.se/.../How-to-get-Remote-Debugging-work-properly.aspx - Cached - Similar
  • Remote debugging with Visual Studio 2008 | Programming and ...

    May 27, 2008 ... I recently examined the JavaScript debugger features in Visual Studio 2008 that aid in locating problems in Web pages.
    blogs.techrepublic.com.com/programming-and-development/?... - Cached - Similar
  • Remote debugging in Visual Studio 2008 - Windows Live

    Remote debugging in Visual Studio 2008 - Windows Live. ... A quick post about a couple of potential gotcha's with remote debugging in VS2008. ...
    pdkm.spaces.live.com/.../cns!D1DDEC9FF002FB8C!826.entry - Cached - Similar
  • Remote Debugging in Visual Studio 2008 - Make it Simple - Site ...

    Jun 3, 2009 ... Remote Debugging in Visual Studio 2008. supu. 3 Jun 2009 8:33 PM. Comments 0. Common scenario is that a developer wrote an application on ...
    blogs.msdn.com/b/.../remote-debugging-in-visual-studio-2008.aspx - Cached
  • Download details: Visual Studio 2008 Service Pack 1 Remote Debugger

    Aug 11, 2008 ... This is the full remote debugger installation for Visual Studio 2008 Service Pack 1. This is not an upgrade patch.
    www.microsoft.com/downloads/details.aspx?familyid=440ec902... - Cached
  • Getting started with Visual Studio 2008 Remote Debugging

    In the past, Visual Studio Remote Debugging was not the easiest thing to set up. Using VS 2008 this process is much simpler.
    dotnetkicks.com/.../Getting_started_with_Visual_Studio_2008_Remote_Debugging - Cached
  • Remote Debugging in Visual Studio (VS2008), Windows Forms ...

    Jan 1, 2010 ... Hi I'm trying to Remote Debugging a Windows Forms Application (C#), ... Voting up just because you asked the question well & included good data. ...
    stackoverflow.com/.../remote-debugging-in-visual-studio-vs2008-windows-forms-application - Cached - Similar
  • Using Visual Studio 2008 with IIS 7 : Development Tools ...

    Apr 24, 2010 ... Log on to the remote server computer using the account created in Step 1, and run the Visual Studio 2008 Remote Debugger from the Start menu ...
    learn.iis.net/page.aspx/387/using-visual-studio-2008-with-iis-7/ - Cached
  • ASP.NET Remote Debugging VS 2008 client to W2k3 Server IIS 6.0

    Jun 18, 2009 ... I am trying to remote debugg an ASP.NET application. I am using a WIndows XP sp3 and Visual Studio 2008 sp1 on the client.
    www.experts-exchange.com/Programming/.../Q_24503909.html - Cached
  • For best service when you require assistance:

    1. Check the DisallowedAbsoluteUris and Exceptions tables first.
    2. Cut and paste actual exceptions from the Exceptions table.
    3. Include screenshots.

    Skype: arachnodedotnet

    Top 10 Contributor
    229 Posts

    arachnode.net:

    If the custom plugin has the problem, does it work OK on a machine that has VS installed, or from the source?

    It worls ust fine from VS, and even when running the release files that built by VS....when copy this files to remote machine, then the error.

     

    arachnode.net:
    If your plugin references are using a directory path, does the account executing the console have access?

    Yes I have access and using explorer I can see the folders.

    arachnode.net:

    The Assembly and/or TypeName reference paths are probably incorrect.  Why your encoding is switched, I don't know.

     

    You are absolutly right...there are problems with path m but how do you fix this:

    ID CrawlActionTypeID AssemblyName TypeName IsEnabled Order Settings
    1 1 Arachnode.Plugins Arachnode.Plugins.CrawlActions.Anonymizer 0 1 AnonymizerAbsoluteUri=http://anonymouse.org/cgi-bin/anon-www.cgi/
    2 3 Arachnode.Plugins Arachnode.Plugins.CrawlActions.ManageLuceneDotNetIndexes 0 1 AutoCommit=true|LuceneDotNetIndexDirectory=\\192.168.0.1\E\DEVELOPMENT\2.5\Console\bin\Debug\LuceneDotNetIndex|CheckIndexes=false|IndexFiles=true|IndexImages=true|IndexWebPages=true|RebuildIndexOnLoad=false|FileIDLowerBound=1|FileIDUpperBound=100000|ImageIDLowerBound=1|ImageIDUpperBound=100000|WebPageIDLowerBound=1|WebPageIDUpperBound=100000
    7 3 Arachnode.Plugins Arachnode.Plugins.CrawlActions.BayesianClassifier 0 2 Class1ExemplarDirectory=|Class2ExemplarDirectory=
    10 3 Arachnode.Plugins Arachnode.Plugins.CrawlActions.MasterPagesMusicSela 1 3 AnonymizerAbsoluteUri=http://anonymouse.org/cgi-bin/anon-www.cgi/
    11 3 Arachnode.Plugins Arachnode.Plugins.CrawlActions.MasterPagesKarusela 0 1 AnonymizerAbsoluteUri=http://anonymouse.org/cgi-bin/anon-www.cgi/
    14 3 Arachnode.SiteCrawler Arachnode.SiteCrawler.Actions.Renderer 0 3 NULL 

    Top 10 Contributor
    1,905 Posts

    I am perplexed, ATM.  Let me think about it...

    For best service when you require assistance:

    1. Check the DisallowedAbsoluteUris and Exceptions tables first.
    2. Cut and paste actual exceptions from the Exceptions table.
    3. Include screenshots.

    Skype: arachnodedotnet

    Top 10 Contributor
    1,905 Posts

    OK, the solution was to check the constructors on the custom plugins to check for errors, null reference exceptions, etc.  Big Smile

    I will add code in the section that raised the error to display the inner exception as well.

    For best service when you require assistance:

    1. Check the DisallowedAbsoluteUris and Exceptions tables first.
    2. Cut and paste actual exceptions from the Exceptions table.
    3. Include screenshots.

    Skype: arachnodedotnet

    Page 1 of 1 (7 items) | RSS
    An Open Source C# web crawler with Lucene.NET search using SQL 2008/2012/CE

    copyright 2004-2017, arachnode.net LLC