Domanda

So che quando distribuiamo soluzioni agricole, sono disponibili sotto Central Admin -> Impostazioni di sistema -> Gestisci soluzioni agricole.

In questo elenco di soluzioni, ci sono 3 colonne.Nome, stato e dispiegato a.Ho notato che la distribuzione in valore dipende dal PowerShell che usi per distribuire la soluzione agricola.

Esempio: -

    .
  1. Questo distribuisce su GAC e globalmente: install-spsolution -Identity $solution -GACDeployment -Confirm:$false.La soluzione DLL andrà a sedere in GAC.

  2. Questo distribuito su GAC e all'URL Web: install-spsolution -Identity $solution -WebApplication $oUrl -GACDeployment.La soluzione DLL andrà a sedere in GAC.

  3. Se abbiamo usato il foll.PowerShell: install-spsolution -Identity $solution -WebApplication $oUrl.La soluzione DLL andrà a sedere in InetPub / Weburlport.

    Vorrei sapere specificamente, quando scegli l'opzione 1 o 2 o 3? Idealmente, vorrei conoscere l'impatto che ciascuno dell'esempio sopra riportato avrà quando la funzione è ammessa a farm / webapp / sitecollection / sito / sito rispettivamente ...

È stato utile?

Soluzione

I can't find a resource on this atm, but the main differences are:

  • if your solutions contains dll's it will ask to deploy them to the gac. I've personally not deployed them to a specific web app's bin folder yet.
  • if your solution contains webparts or other resources that require modifying the web app's web.config file, it will ask you what web application to deploy it to (or maybe all of them, but this is not the same as "globally deployed")
  • globally deployed indicates the solution did not have web app specific resources.

The gac is the central location for deploying dll's and the most common way for accessing 'external' dll's in sharepoint. For example, you can use dll's in one solution, but they may actually have been deployed by a different solution.

I believe there are other resources that are web app specific but the most common example are webparts because they need to be added to the safe control list and these are in turn added in the web.config file. I believe this is only the case when you usd custom webparts with custom code, because they call a custom dll. You will see a descriptive error on your webpart when they weren't added to the safe control list.

You should note that whatever web app you deploy your web app specific solution to, your features will still be available to all web apps, they will just be missing some needed resources or configuration should you enable them somewhere where you haven't deployed the solution.

EDIT:

To answer on your comment to your question (when do you choose what option to take), you really don't. This is a fault of the SharePoint API I believe, as it really does not matter to me (the SP Admin) what kind of Solution it is, I just wish to get it deployed. All this info is on the SPSolution object and it can be dynamically decided what action needs to be taken. The only exception being, if you do not wish to deploy the solution (should it contain web app specific configuration) to all web apps but just some or the "one".

In any other case, there really is no difference and you cannot even make a choice, since it either does or does not deploy dll's to gac, and it either has or hasn't got web app specific configuration.

EDIT2: Seems like I missed a part of your question there:

What's the impact of Farm/WebApplication/SPSite/SPWeb scope of a feature ?

Well, the answer's in the question really, the scope of the feature. You kind of have to think about what you're changes are applied to.

  • Content Types / Site Columns
    • Very good idea to have the feature that deploys these SPSite scoped, since you'll want them available in the whole Site Collection.
  • Application Pages
    • I don't know by heart what the best practice is for these, but I would make them Farm Scoped (since essentially, they'll be available through the _layouts/_admin virtual folders, which is accessed from across the whole farm.
  • Web Application Configuration
    • This one seems obvious ;)

Here's another article that sums it up nicely: http://www.pritambaldota.com/index.php/understanding-features-and-feature-scope-in-sharepoint-2010/

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top