Feature with WebApplication scope - deploy only to one webapplication - sharepoint

After deploying my new Sharepoint solution, containing a feature with WebApplication scope, I noticed that feature was added to ALL webapplications in the farm.
The solution was deployed to a one particluar webapplication, so I wonder if such behavior is correct. Any way to make feature appear only in WebApplication, solution was deployed to?

How did you deploy from powershell or from central admin? If you deployed from central admin you should have been given a list of web apps to deploy too, but if you did powershell and left off the WebApplication flag (http://technet.microsoft.com/en-us/library/ff607534.aspx), it would have deployed to all of the web apps.

This is unfortunately by design.
The solution is deployed to a single web application, e.g.
but the features are visible on all web applications, i.e.:
Feature /= solution. That means that some elements from the solution (not features) will appear only in the designated web application.
One workaround is to hide the feature so that users cannot activate it.
Check out also these posts:
Is it possible to deploy a solution to a web application so that its features are only visible within this web application?
Creating a solution that deploys to selected WebApplications but copies the assembly to GAC

if the solution deployed to ABC webApp so it won't deployed to another WebApp, if it happened better remove from all WebApp and deploy to ABC webApp by PowerShell command.
-
Praveen

Related

Opening a web app page using View Definition

In my managed application deployment I deploy an App Service Web app.
Is it possible to use viewDefinition.json to create an Overview Command Action that will open the deployed site in a new tab or link me to that deployed site?
No, frustratingly, it is not. viewDefinition.json artifacts do not allow you to read in any sort of dynamic variable from the deployment, which would be necessary for something like this.

What is a web job on azure, is it part of a web application or standalone

Is it a job attached to a web app, or is it a type of web app itself? I tried following this example but couldn't find the add webjobs link it mentioned, just links to create a web app.
https://azure.microsoft.com/en-us/documentation/articles/web-sites-create-web-jobs/
Yes, a job is "attached" to a Web App. A Web App is the execution container for WebJobs. In some cases you might also have a companion website also running in the WebApp, but often, the Web App only contains WebJobs.
Once you have a Web App, you can create/manage WebJobs via the portal "WebJobs" blade in the new portal. You'll find it in the Settings blade under "Features".
Another way to think of a Web Job is as an extra .exe/process that runs on the same VM as your web app, with the only special thing being that it is launched with the same set of environment variables as the web app and has access to the same set of directories.
There's a great post here explaining WebJobs and how to create/operate one. Everything you need to know to get going.

Website not updated when deployed with a WebJob

I have a solution that has an ASP.NET MVC Web Application with source control in Visual Studio TFS online. The site is hosted in Azure, which deploys the site every time it is built in TFS online. Everything is working good.
I then added a Web Job project to the solution using Add > New Azure WebJob project and I set it up with some help from this post on the azure blog. Since then, I noticed that any changes made to the web application does not reflect on the deployed site anymore. I don't see any errors in the build log in TFS online.
To work around the issue, I have to 1) remove the web job project from the solution and 2) comment out everything in the webjobs-list.json file in the web application's Project Properties before deployment. This essentially puts the solution back in the state before the web job was added.
I was wondering what I could do to prevent my problem from occurring. I think I maybe missing some configuration step, but I don't know where to look.
Azure's automatic source integration will only deploy the first project (alphabetically) in the solution. So if your new web job is named ahead of your old MVC application (alphabetically) it will try to deploy the web job instead of the MVC application.
There are two solutions to this:
1) Name your MVC project so it is first project in the solution alphabetically
2) Put your web job in a separate solution

How to get .publishsettings for Web Deployable Web Role?

I enabled the Web Deploy feature for my Web Role and deployed it.
But how can I get hold of the .publishsettings file so I can create a Publishing Profile for it?
This 2 year old article states that it should have been created automatically, but I haven't got that in my profile manager.
Any ideas?
If you are using Visual Studio 2012 or greater, the server explorer to the left will have several Azure items.
Specifically the Windows Azure Compute is what we are looking for, right click on that and say 'add deployment environment'. You will then be prompted with a dialog that allows you to sign in and download publish settings file:
You can get publishsettings file from the following link: https://windows.azure.com/download/publishprofile.aspx
Well, the problem was really behind the keyboard.
So the publishing profile is actually provisioned correctly and automatically to the Web project as the documentation states.
The problem and confusion was that I have a secondary web application in my Solution that I also publish to the same Web Role (referenced as an additional Site in the ServiceDefinition.csdef file).
That Web Project does not get the Publishing Profile, and when I try to create a profile manually, it doesn't work since that (secondary) IIs instance is not configured for Web Deployment.
Oh well, back to the tedious Cloud Service deployment it is...

How do I deploy a Web Site (NOT a Web Application) to Azure through Azure Web Role Accelerator?

I have two VS 2010 projects. The 1st is an existing WEB Site while the 2nd is Web project. Should I select b) and ask for Publish I do have the option for Web Deploy to an Azure Web Role Accelerator service and it works fine.
But, I am not able to do the same for the 1st. There is no Publish option in the corresponding context menu, just "Publish Web Site ..." which is the old known one. I do not have the option to web deploy the site.
How can I do it?
Thanks in advance,
You can't publish a web site to Azure directly. Take a look at this for how to convert the site to an application:
http://msdn.microsoft.com/en-us/library/aa983476.aspx
If you really need to publish a web site, you can try:
http://www.davidaiken.com/2010/07/14/how-to-deploy-an-asp-net-web-site-to-windows-azure/

Resources