cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Batch generation of websites

ki6i
Trusted Contributor

 

I have one more practical question.

 

I have Mega 2009 SP5

 

I looked in most of the assemblies and I found the MegaWebSite in library called  mg_webs.dll

 

But I have a problem that there is no GenerateWebSite() method in furthermore I don't think that from this library I am able to fetch the Website object from the db.

 

Therefore I tried with the md_appm.dll to get the Website MegaObjects and I am trying to parse those object to MegaWebSite objects.

 

 

oMegaRoot = oMegaDatabase.Open();
MegaCollection oMegaCollection = oMegaRoot.get_GetCollection("Website");

 

foreach (MegaObject item in oMegaCollection) {
    oWebSite = (MegaWebSite)item;
}

 

Unfortunately the objects are not compatible.

 

What libraries/objets should I use to trigger the automatical generation of a website?

 

The methods mentioned in this article http://community.mega.com/t5/custom/page/page-id/mega-kb-solution?sid=50120000000mqRmAAI doesn't exist at all in my version of the dlls.

 

 

1 Reply

jhorber
MEGA
MEGA

Hell Ki6i

 

I assume your need is to batch the generation of a web site even if Windows Front-end (Mega.exe) is not alread started.

The generation would be triggered independantly from a user transaction.

 

This requires to use another set of API script functions called Administration APIs.

Such APIs enable in particular to:

  • Create a new instance of the mgwmapp.exe process
  • Get an access to a given repository (ex: MEGA (Tutorial)) called MegaRoot though a transaction
  • They you can continue with repository API and trigger web site generation.
  • The transaction can be discarded (abandonned), saved or dispatched.

Below is an example in VB script

http://community.mega.com/t5/custom/page/page-id/mega-kb-solution?sid=50120000000mqSCAAY

 

 

Jerome