arachnode.net
An Open Source C# web crawler with Lucene.NET search using SQL Server 2005/2008/CE An Open Source C# web crawler with Lucene.NET search using MongoDB/RavenDB/Hadoop
Mongo/Raven/MySQL/Hadoop Does arachnode.net scale? | VS2008/2010/2012 & SQL2008/2012 | Download the latest release

Deployment error

rated by 0 users
Not Answered This post has 0 verified answers | 15 Replies | 3 Followers

Top 150 Contributor
1 Posts
mrsmith posted on Sat, Dec 27 2008 4:42 PM

Hello everybody!

I installed arachnode.net on my PC following instructions from Installation Notes. Everything builds, but when I try to deploy Functions, I'm getting error:

Error    12    CREATE ASSEMBLY failed because method 'set_AllowedExtensions' on type 'UserDefinedFunctions'  in safe assembly 'Arachnode.Functions' is storing to a static field. Storing to a static field is not allowed in safe assemblies.

 

Any idea what's wrong?

All Replies

Top 10 Contributor
1,750 Posts

Check the permissions on the Functions project.  The assembly needs to be set to UNSAFE to access static objects, which are present in several of the objects in UserDefinedFunctions.  Also, I'm about a week away from arachnode.net 1.0... and it's light years beyond 0.9.  If you would, take the time to get familiar with the arachnode.net solution structure and check back in a week or less.  I promise, you won't be disappointed.  :)

You may encounter a similar error when deploying from the Visual Studio Solution:

Error 8 CREATE ASSEMBLY for assembly 'Arachnode.Functions' failed because assembly 'Arachnode.Functions' is not authorized for PERMISSION_SET = UNSAFE.  The assembly is authorized when either of the following is true: the database owner (DBO) has UNSAFE ASSEMBLY permission and the database has the TRUSTWORTHY database property on; or the assembly is signed with a certificate or an asymmetric key that has a corresponding login with UNSAFE ASSEMBLY permission. If you have restored or attached this database, make sure the database owner is mapped to the correct login on this server. If not, use sp_changedbowner to fix the problem. Functions

The fix for this is to execute this command:

ALTER DATABASE [arachnode.net] SET TRUSTWORTHY ON

...and, thanks for joining!  :)

[EDIT]: You may also encounter a nondescript error message of 'Deploy failed' when deploying the Functions project.  Check to see that the Connection String is populated in the Database tab of the Functions property page.

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 25 Contributor
16 Posts

Thanks, Above solved PERMISSION_SET problem. Another one just popped:

InsertException: Cannot find either column "dbo" or the user-defined function or aggregate "dbo.ExtractDomain", or the name is ambiguous.

I'm debugging the code now. Maybe it's something silly on my part. I couldn't find anything with that name in DB, i'll take look at custom datasets.

[edited by: polfilm at 4:21 AM (GMT -8) on 4 Jan 2009]
Below seems very relevant when dealing with CLR assemblies on a restored database. Will verify and post back if successfull.

http://support.microsoft.com/kb/918040

Top 25 Contributor
16 Posts

Functions module deployed correctly after I changed owner of arachnode.net database to my login name. :))

Top 10 Contributor
1,750 Posts

Great!

What is strange is that this deployment error didn't pop up for me until recently.

I had arachne follow the installation instructions when we wrote them and she didn't run into this either.

 

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 75 Contributor
6 Posts
Phani replied on Fri, Mar 6 2009 10:10 PM

I am also facing the same problem even after running '

ALTER

DATABASE [arachnode.net] SET TRUSTWORTHY ON'.

Please help me.  Also Owner of DB and user logged in are same.

Top 10 Contributor
1,750 Posts

Do you have a valid connection string in the Functions project property pages?

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 75 Contributor
6 Posts
Phani replied on Sat, Mar 7 2009 1:09 PM

set the database owner to a valid login, deploy succeeded.

Where test Project? Where do I start and how do I see the results?

Top 10 Contributor
1,750 Posts

Start the console project.

Then, view the results by starting the Web project.

Thanks!

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 75 Contributor
6 Posts
Phani replied on Sun, Mar 8 2009 1:31 AM

Thank you.

I could not start.  While building the following references are not found.

1) textanalytics in Library.

2) Two more in Plugins.

 After deleteing them its build succeeded.  However while runnng am receving the following exception

System.TypeInitializationException was unhandled
  Message="The type initializer for 'Arachnode.Console.Program' threw an exception."
  Source="Arachnode.Console"
  TypeName="Arachnode.Console.Program"
  StackTrace:
       at Arachnode.Console.Program.Main()
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()

Top 10 Contributor
1,750 Posts

Is the app.config for the Console project pointed to Application.config in the Configuration project?

If it is, start the Console project by stepping into it.  (F11)  You'll receive this error when one of the static objects can't be initialized before hitting the Main() function.

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 75 Contributor
6 Posts
Phani replied on Sun, Mar 8 2009 3:21 PM

Thank you. It started working....

But Search is no working! I am following the other thread.

Top 10 Contributor
1,750 Posts

Let me know what you find.

Based on feedback regarding Release 1.0 we have addressed common installation/deployment/configuration/execution issues and hope to alleviate these problems in Release 1.1, which is due, soon.

Thanks.

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 75 Contributor
6 Posts
Phani replied on Mon, Mar 9 2009 5:18 PM

IIS was not installed. So relative path to application.config was directing to localhost\... that was the problem.

I am able to restrict  to  a particular site. I amtrying to understand to control it to get only some content. 

Where is all the data fetched back is stored?

Thanks,

Phani

Top 75 Contributor
6 Posts
Phani replied on Mon, Mar 9 2009 7:30 PM

I got it. it's storing in Webpages table. 

Could you help me to figure out how to get only content.  It's fetching the entire page as is.

Say if I go to a news site..I would like to fetch only heading, date, content and comments. Can we do that?

Thanks,

Phani

Page 1 of 2 (16 items) 1 2 Next > | RSS
An Open Source C# web crawler with Lucene.NET search using SQL 2005/2008/CE

copyright 2004-2014, arachnode.net LLC