.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to install MSI silently and setting app pool with a custom action

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :Windows Application


I have VS 2010 solution with a WCF service project. I also have a Web Setup Project. I have two problems:

1) When reinstalling/updating the IIS with a new version of the WCF service I get an option to repair or remove old version. How can avoid this? I would like to install the MSI in silent-mode no UI. I'm running TFS and trying to make an automatic process with build and deployment.

2) How can I adjust/change the Application Pool of the installed WCF Service with Custom Actions? C# please.

PS! The automatic building in TFS works OK. The MSI is created and copied to the drop folder. I now need to execute the MSI.

View Complete Post

More Related Resource Links

Custom Ribbon action using quick step for workflow

I created custom button using the quick step in ribbon, and configured to invoke a workflow. It shows start and stop page of workflow where I have to click start. How to start workflow directly from the ribbon without this redirection to page.  

Custom Code Security Setting

I am using custom code in couple of my SSRS reports. I can view the output on report manager, but in my BI development studio it shows me an error "An error occured during local report processing". I tried all the possible options to resolve the issue. I am adding the references of the assemblies System.Data and System.XML. Also i referred the article http://support.microsoft.com/kb/842419/en-us and tried all the steps to modify the code access security for custom assembly. I am clueless as in what to do next. Thanks, Chaitali

List item custom action with custom url

Hello, Is it possible to create a listitem custom action with an url that contains {fieldname} instead of  {ItemId}, {ItemUrl}, {ListId}, {SiteUrl}, for example http://MYSPSITEURL/SitePages/custompage.aspx?Field=} ? {Title  

Is there a way to conditionally enable/disable a custom action

I've created a custom action that kicks off a workflow on an item in a list.  I want the workflow to be initiated only once.  So, once it is kicked off the first time, I'd like the custom action to be disabled so others cannot start it again. Is there a way to do this in Sharepoint Designer?

How to include a javascript file in a custom action?

I need to call a custom javascript function from a ribbon button, how do I include the javascript file within the custom action solution in order that it will be properly referenced by the html output? I am not allowed to define a custom masterpage at this point. So what can I do?   Thanks, Stephan  

When a Task Expired step in a Start Custom Task Process action is not fired?!

When a Task Expired step is not fired?! I created a simple Workflow using the SharePoint Designer. Added one step to which I added the Start Custom Task Process and set the Due Date "2 minutes after now". For the When a task Expired step of the custom Task I added a Log to History List action, which doesn't seems to be fired. What good be wrong??? All the steps I did to create the workflow: Started SP Designer 2010 and created a reusalbe WF. Added Start Custom Task Process action to step 1. Changed the behavior of the When a task Expired stepof the custom task (added a Log to History List action). Changed the behavior of the Before Task is Assigned by adding a Set Field action which set the Due Date of the task to "Now + 2 minutes". Published the WF and started the WF for a simple list item. Unfortunately the Log to History List actionof the When a task Expired step is never called.

Custom UsernamePasswordValidator causes IIS Application Pool to hang.

I have a WCF service hosted in IIS (IIS 7 with .NET 3.5 SP1) that uses a custom UsernamePasswordValidator to validate message credentials against a database. The problem is that it works for a while, but over a period of time IIS stops responding to all client requests until the application pool is recycled. The IIS worker process has some requests that get stuck in the "AuthenticateRequest" pipeline state of the "ServiceModel" module. In my testing, I can consistantly reproduce the problem by forcing a client to create a new service proxy with a different username and password and calling the WCF service every few seconds. To troubleshoot I created a new project and removed all of the authentication code in the Validate function so that the UsernamePasswordValidator will accept any username and password combination without throwing an exception, but IIS still hangs: namespace WcfTestService { public class CustomValidator : UserNamePasswordValidator { public override void Validate(string userName, string password){//code removed for testing} } } If I remove the ServiceCredentials node from the Service Behavior, IIS doesn't hang anymore, but there is no user validation that takes place either, which is a problem. Here is the service binding configuration: <services> <service name=&

change search results page According to custom setting page

I want to create user settings page will be able to choose which will  search results display page x or page y Settings will be saved somewhere. When the user searches on sharepoint search page will display to the user  the page that he select in the search page settings page x or  page y   my questions : 1. Is it necessary to treat the user profile - If so how? 2. how results can be directed to the search results page after a user choose Specific page? 3. where save the settings from custom settings page  ?

Problem with custom workflow action (SP2010, SPD2010)

We have created an assembly containing 3 custom actions to be used in SPD. Everything works correctly; however every Change and Publish cycle requires me to recreate the lines (steps) containing the custom actions. It is simple mechanical replacement but still is a pain and i would like to figure this out. I've spent considerable time on this already with no solution in sight. Tried clearing out proxy cache (http://social.msdn.microsoft.com/Forums/en-US/sharepointworkflow/thread/34632798-6e45-4eb3-ad3d-2f941c706cda ) Also checked web.config for non-referenced assemblies.  

Custom Action help!

  Question: Hi, we had a Custom List Context menu Item in "Actions menu" in SP 2007. and below is the class we used for that. Now if I would like to use the same code for SP 2010, then What will be my eqquivalent Code with SP Ribbon. For your Reference I am also including the Custom Action XML that we used in 2007. Basically, this code used to Create a menu item on the "Actions Menu" of either a document Library or any type of list. So, I am looking for a Button on the List Tab, that appears on all List Views for list and all Views of Document Library. When a user Clicks on that Button then the user is directed to a URL mentioned in the Code below. Let me know if it is not clear or need more info. Custom Action XML: <CustomAction Id="SomeCustom.Action" Location="Microsoft.SharePoint.StandardMenu" GroupId="ActionsMenu" Sequence="20" ControlAssembly="Some Key" ControlClass="Class mentioned below" /> Class Referenced in Above CustomXML using System; using System.Collections.Generic; using System.Text; using System.Web.UI; using System.Web.UI.WebControls; using Microsoft.SharePoint; using Microsoft.SharePoint.WebPartPages; using Microsoft.SharePoint.WebControls; namespace MyNameSpace { public class MyClass : WebControl { protected override void OnLoad(EventArgs e) { En

Custom action on click of certain type of folders in a lsharepoint list


We have a Moss 2007 set up and we are trying to have the ability where in we have some folders in a list marked as "confidential"., and when the user clicks on these folder, we want to pop up a disclaimer dialog to the user, and force the user to accept or reject it.

Also we want the ability to throw this popup when the user is directly navigatinig to a certain file that resides in the folder.

Any suggestions would be greatly appreciated.



Custom Action for specific External Content Type List


I have an External Content Type list instance feature in Visual Studio. Deploying the instance works fine. However, I can't create a custom action using RegistrationId="{$ListId:Lists/yourlistname;}" RegistrationType="List"

Even if I specify the list Id as follows RegistrationId="{8F595340-5D08-4287-8BF6-30D50989D2F4}" or RegistrationId="8F595340-5D08-4287-8BF6-30D50989D2F4" I get nothing.

However, RegistrationId="600" works fine, but for all External Content Type lists.

I added the custom action with SharePoint Designer and it works as expected. When I generate a site template and import it into Visual Studio, the custom action uses RegistrationId="{$ListId:Lists/yourlistname;}" RegistrationType="List"

Creating a new site based on the site template creates the custom action correctly. However, deploying just the custom action does not work (feature deploys, but no custom action appears). I also tried RegistrationId="0x0100D67E541CC4BB6A4A9D62D22657ECFF68" RegistrationType="ContentType" with no luck. The content type id was pulled from the list instance using the object model.

I have to tie the custom action to a specific list instance. Because the li

Setting custom master-page.


How can I set a custom master-page to a site or site-collection? There should be a link in site actions>site settings>look and feel called "master page" but Im not seeing it. Where is that exactly?


Custom Action help!



We had a custom feature in SP 2007, that deployed a Custom Menu item on the List Actions menu in SP 2007. If I were to achieve same in SP 2010, via a button, what would be my code in terms of SPRibbon? I still want to use the control class, to initiate the custom button after the feature is activated. How can I achive this?

The Custom Action XML:





Cant read registry during custom action

I have built an installer project that uses a custom action that fires during the AfterInstall event.  I am having a strange problem with this code in Windows 7 64 bit that I am not having under Vista 32 bit.  The problem is that in the 64 bit version, a particular registry key that I need to read is showing up as not having any values, even though it definitely contains over 30 values.  Opening the key does not throw an exception - it just doesn't appear to contain any values.  If I execute my code from an EXE and execute it in Windows 7 64 bit, it does not have this problem - the problem only occurs when I call the code from within the context of the custom action and the custom action works fine on 32 bit vista.  The registry key that I am reading ALREADY EXISTS on the machine - my installer is not creating any keys.  I am totally stumped on this one.  Anybody have an idea about what might be going on here?  Thanks in advance for any suggestions or ideas.


Custom workflow action - send an email with blind carbon copy

Question: Is there any way that we can send an email with blind carbon copy (BCC) option? I know this feature is unavailable in the custom workflow action (in SPD-2007) but there is a requirement where I need to send an email without revealing other ids of other recipients. 

how to show site action menu on custom master page??


i have created my own custom master page and trying to show "site action" menu on my master page

how is this posible,what modifications are needed in .master file  to do this

 in sharepoint 2010


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend