Service Configuration Tool (svc) for Archlinux

Hello, I'm providing you with a very simple Service Configuration Tool for the management of system services (scripts located inside /etc/rc.d).
DOWNLOAD LINK: http://aur.archlinux.org/packages.php?ID=30660
Usage:
svc DAEMON subcommand
DAEMON = name of the service to manage
subcommand = subcommand to pass to the service (e.g. start)
Example (DAEMON=samba):
svc samba enable
svc samba disable
svc samba configure
It acts as a wrapper for services and provides a mechanism for enabling (starting and adding the daemon to /etc/rc.conf) and disabling (stopping and removing the daemon from /etc/rc.conf) them. The tool does not constrain your subcommands to only enable and disable, any other service subcommand should act as expected (the value of this subcommand is passed to the rc.d script directly).
By its own, the script doesn't do much. It is with the help of a shell with a completion system (like zsh or recent versions of bash) that you can get the full benefits of it. For example, I only have to type "svc <TAB>" and all available system services will be available for completion, once a service is typed, it's subcommands (start, stop, restart, etc) will be available for completion too, along with enable and disable.
Other feature I integrate into some rc.d scripts is the subcommand "configure", which simply calls an editor with the service configuration file (e.g. vim /etc/samba/smb.conf). By combining this and the "svc" tool I can easily configure some services (the ones that make sense, apache is not a good candidate for this since it's got many configuration files): "svc samba configure".
This was done for two reasons: 1) I used opensolaris for over a year and a half, and when I switched back to linux there was a utility I really missed: "svcadm" (actually, the whole SMF is what I miss, but such a complete/beautiful init framework/service management replacement won't make it into gnu/linux any time soon); 2) As a system administrator, it's daunting to have to type "/e<TAB>/r<TAB>.<TAB>/$SERVICE_NAME $SUBCOMMAND" when I need to manage a service, it's much more pleasant to simply write "svc <TAB> $SERVICE_NAME $SUBCOMMAND" ($SERVICE_NAME and $SUBCOMMAND show options for completion when pressing <TAB>).
Along with the "svc" script, a script for the zsh completion system is provided. Please contact me if you have an implementation for bash.
Enjoy,
Edgar Merino
Last edited by bimbo (2009-10-08 01:53:58)

bimbo wrote:
You could easily get rid of those premade functions and integrate the functionality inside the _svc script:
In the "svc()" function, for every option of the switch (case) statement, prefix the calls to the rc.d scripts with "sudo", e.g. "sudo ${SERVICES_DIR}/$1 start". If you want to constrain completion options for services to only "( start stop restart)", remove the "enable" and "disable" bindings defined in the "svc()" function and modify the "_svc()"  function (notice the underscore) like this:
_svc() {
case $CURRENT in
2) # Show services under /etc/rc.d for completion
_services
3) # Show current service subcommands for completion
# This is here so that _init_d works on the service name rather
# than on the actual function name "svc"
(( CURRENT-- ))
shift words
# CONSTRAIN COMPLETION OPTIONS TO ONLY start, stop and restart
compadd start stop restart
esac
So, would I have to call it via _svc $DAEMON start or something similar, then?

Similar Messages

  • Which permissions required for using CAF External Service Configuration?

    Hello,
    I have written an application service which invokes an external RFC. To this end, I have imported the desired RFC as external service and wrapped it as an application service.
    However, when invoking this application service I get an error message that the external service has not been configured. I have learned that I have to use CAF's External Service Configuration tool.
    Unfortunately, this tool complaints that I don't have the required administrator permissions. This happens even when I log in with the administrator account.
    What do I do wrong?
    Best regards
    Alexander

    I just have found the required role. It is role SAP_CAF_ADMIN.

  • SQL Server Reporting Services Configuration Error(Subscription)

    I have just deployed a new project on the server and i can successfully run report from the BI Site; [Server Name]\Reports and no issue there. But when i try to create Subscription for the same report; I am trying File Share and it throws error as given
    below. Do i have to configure anything for subscription in the Reporting Services Configuration Tool???
    I also have few questions regarding Configuration;
    What account should i use for the Deployed Data Source on the Server? A valid SQL Server Account I assume!!!
    What account should i use for the Execution Account (For Unattended Operations) ? A valid Windows Account? or SQL Server account?
    What account should i use for the File Share Subscription (Credentials used to access the file share:)? A Valid Windows Account with permission for that folder?
    Here is the error I am getting in the log file.. 
    ReportingServicesService!library!b!06/17/2010-09:35:04:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration error. See the report server log files for
    more information., AuthzInitializeContextFromSid: Win32 error: 110;
     Info: Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration error. See the report server log files for more information.
    ReportingServicesService!library!b!06/17/2010-09:35:04:: i INFO: Initializing EnableExecutionLogging to 'True'  as specified in Server system properties.
    ReportingServicesService!subscription!b!06/17/2010-09:35:04:: Microsoft.ReportingServices.Diagnostics.Utilities.RSException: The report server has encountered a configuration error. See the report server log files for more information. ---> Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
    The report server has encountered a configuration error. See the report server log files for more information.
       at Microsoft.ReportingServices.Authorization.Native.GetAuthzContextForUser(IntPtr userSid)
       at Microsoft.ReportingServices.Authorization.Native.IsAdmin(String userName)
       at Microsoft.ReportingServices.Authorization.WindowsAuthorization.IsAdmin(String userName, IntPtr userToken)
       at Microsoft.ReportingServices.Authorization.WindowsAuthorization.CheckAccess(String userName, IntPtr userToken, Byte[] secDesc, ReportOperation requiredOperation)
       at Microsoft.ReportingServices.Library.Security.CheckAccess(ItemType catItemType, Byte[] secDesc, ReportOperation rptOper)
       at Microsoft.ReportingServices.Library.RSService._GetReportParameterDefinitionFromCatalog(CatalogItemContext reportContext, String historyID, Boolean forRendering, Guid& reportID, Int32& executionOption, String& savedParametersXml,
    ReportSnapshot& compiledDefinition, ReportSnapshot& snapshotData, Guid& linkID, DateTime& historyOrSnapshotDate, Byte[]& secDesc)
       at Microsoft.ReportingServices.Library.RSService._GetReportParameters(ClientRequest session, String report, String historyID, Boolean forRendering, NameValueCollection values, DatasourceCredentialsCollection credentials)
       at Microsoft.ReportingServices.Library.RSService.RenderAsLiveOrSnapshot(CatalogItemContext reportContext, ClientRequest session, Warning[]& warnings, ParameterInfoCollection& effectiveParameters)
       at Microsoft.ReportingServices.Library.RSService.RenderFirst(CatalogItemContext reportContext, ClientRequest session, Warning[]& warnings, ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames)
       at Microsoft.ReportingServices.Library.RenderFirstCancelableStep.Execute()
       at Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
       --- End of inner exception stack trace ---
       at Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
       at Microsoft.ReportingServices.Library.RenderFirstCancelableStep.RenderFirst(RSService rs, CatalogItemContext reportContext, ClientRequest session, JobType type, Warning[]& warnings, ParameterInfoCollection& effectiveParameters, String[]&
    secondaryStreamNames)
       at Microsoft.ReportingServices.Library.ReportImpl.Render(String renderFormat, String deviceInfo)
       at Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider.SaveReport(Notification notification, SubscriptionData data)
       at Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider.Deliver(Notification notification)
    I also get following error when I try to create email Subscriptoin
    w3wp!processing!6!6/17/2010-09:58:53:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'EU_Database'., ;
     Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'EU_Database'. ---> System.Data.SqlClient.SqlException: Could not obtain information about Windows NT group/user 'THRY\RPUser',
    error code 0x6e.
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
       at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
       at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
       at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
       at Microsoft.ReportingServices.DataExtensions.SqlConnectionWrapper.ImpersonateUser()
       at Microsoft.ReportingServices.DataExtensions.SqlConnectionWrapper.Open()
       at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ReportRuntimeDataSourceNode.OpenConnection(DataSource dataSourceObj, ReportProcessingContext pc)
       --- End of inner exception stack trace ---
    Thanks,
    RP

    Hi RP,
    For your first issue "cannpt create subscriptions", after analyzing the error logs, it seems to be caused to the service account for the Reporting Services service does not have proper permissions to invoke the WIN32 API.
    The SQL Server Reporting Services invokes the Win32 API to impersonate user's permissions to write files to shared folder or call COM+ components.
    In this case, we can change the service account to a account has permissions to invoke the Win32 API to solve the issue. For example, we can change the account to be NetworkService or LocalSystem:
     1. Backup the encryption key using Reporting Serivces Configuration Manager.
     2. Change the service account using Reporting Serivces Configuration Manager.
     3. Restore the encryptiong key using Reporting Serivces Configuration Manager.
    For your others questions, please see the following inline reply:
     --What account should i use for the Deployed Data Source on the Server? A valid SQL Server Account I assume!!!
     The account should be a Windows account or the SQL Server account, that has read permissions in the source data base at least.
     --What account should i use for the Execution Account (For Unattended Operations) ? A valid Windows Account? or SQL Server account?
     The account must be a Windows user account. For best results, choose an account that has read permissions and network logon permissions to support connections to other computers. It must have read permissions on any external image or data file that you
    want to use in a report. Do not specify a local account unless all report data sources and external images are stored on the report server computer. Use the account only for unattended report processing.
     --What account should i use for the File Share Subscription (Credentials used to access the file share:)? A Valid Windows Account with permission for that folder?
     You are right. It must be a Windows account, which has permissions to access and write files to the shared folder.
    For more information, please see:
    Configuring the Report Server Service Account:
    http://msdn.microsoft.com/en-us/library/ms160340.aspx
    Execution Account (Reporting Services Configuration):
    http://msdn.microsoft.com/en-us/library/ms181156.aspx
    If you have any more questions, please feel free to ask.
    Thanks,
    Jin Chen
    Jin Chen - MSFT

  • CAF WebServices don't appear in CAF Admin's External Service Configuration

    Hi,
    I have developed Web Services in CAF and deployed them on the WAS but they don't appear on the CAF Administrative Tools -> External Service Configuration under Service Registry.  They appear in the Web Service Navigator running on the J2EE-Engine but I can't set the authentication mode.
    What am doing incorrectly?
    Thanks.
    Dick

    Hi Richard,
    as far as i know the External Service configuration is only for web services (or RFC's) which are imported as external service in a CAF-Project.
    I assume you developed a application service in CAF and applied a web service on this. Those web services are not visible in external Service Configuration only (as you have found) in Service Navigator)
    I hope this helps,
    best regards,
    Rene

  • OCS 2007 R2 Response Group Configuration Tool Failure

    Hello there.
    We are bringing back to life an old OCS installation. Customer performed a clean AD reinstall and we are in the process of re-installing OCS 2007 R2. All seems to work fine, except the RGS. When accessing the web tool we get this error:
    Response Group Configuration Tool Failure
    An unknown error occurred. The operation cannot complete successfully. Please contact the administrator if this problem persists.
    Click here to return Home.
    the Event viewer for application on the FE shows:
    Event code: 3005 
    Event message: Excepción no controlada. 
    Event time: 13/05/2014 12:13:01 p.m. 
    Event time (UTC): 13/05/2014 06:13:01 p.m. 
    Event ID: a74ea242095f4e8099bca266a7a5cc83 
    Event sequence: 8 
    Event occurrence: 1 
    Event detail code: 0 
    Application information: 
        Application domain: /LM/W3SVC/1/ROOT/Rgs-1-130444779241580315 
        Trust level: Full 
        Application Virtual Path: /Rgs 
        Application Path: C:\Program Files\Microsoft Office Communications Server 2007 R2\Web Components\Acd Files\ 
        Machine name: OCSR2-FE02 
    Process information: 
        Process ID: 6504 
        Process name: w3wp.exe 
        Account name: domain\RTCComponentService 
    Exception information: 
        Exception type: COMException 
        Exception message:  
    Request information: 
        Request URL: https://ocspool.domain.com:443/Rgs/Deploy/Default.aspx 
        Request path: /Rgs/Deploy/Default.aspx 
        User host address: 172.16.6.32 
        User: domain\user
        Is authenticated: True 
        Authentication Type: Negotiate 
        Thread account name: domain\RTCComponentService 
    Thread information: 
        Thread ID: 9 
        Thread account name: domain\RTCComponentService 
        Is impersonating: False 
        Stack trace:    en System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
       en System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext()
       en System.Management.ManagementObjectCollection.get_Count()
       en Microsoft.Rtc.Acd.Management.OcsApplicationContactSetting.Select(String condition)
       en Microsoft.Rtc.Acd.Web.UI.WorkflowTemplate.GetContactObject()
       en Microsoft.Rtc.Acd.Web.UI.WorkflowTemplate.AddedControl(Control control, Int32 index)
       en ASP.deploy_default_aspx.__BuildControl__control15(Control __ctrl)
       en Microsoft.Rtc.Acd.Web.UI.TemplateHelper.InstantiateWorkflowTemplate(AcdWorkflow workflow, ITemplate template, ControlCollection controlsToAddTo, String resourceClass, String templateResourcePrefix)
       en Microsoft.Rtc.Acd.Web.UI.AcdWorkflowList.CreateChildControls()
       en System.Web.UI.Control.EnsureChildControls()
       en System.Web.UI.Control.PreRenderRecursiveInternal()
       en System.Web.UI.Control.PreRenderRecursiveInternal()
       en System.Web.UI.Control.PreRenderRecursiveInternal()
       en System.Web.UI.Control.PreRenderRecursiveInternal()
       en System.Web.UI.Control.PreRenderRecursiveInternal()
       en System.Web.UI.Control.PreRenderRecursiveInternal()
       en System.Web.UI.Control.PreRenderRecursiveInternal()
       en System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    Custom event details: 
    on the OCS logs I have:
    Unhandled exception occurred in the Response Group Service Configuration Tool. The operation could not complete successfully.
    Requested URL: /Rgs/Deploy/Default.aspx
    User / Host making the Request: domain\user/ 172.16.6.32
    Unhandled exception: System.Web.HttpUnhandledException - Se produjo una excepción de tipo 'System.Web.HttpUnhandledException'.
    Inner Exception: System.Runtime.InteropServices.COMException
    Cause: An unhandled exception occurred.
    Resolution:
    Check the exception.
    Windows server is installed in spanish, if you wonder why the mix in languages.
    We have been battling with this error for the last 2 weeks. Any help is greatly appreciated!
    FR

    Hi,
    Please check the configuration of the Response Group Service with the help of the link below:
    http://technet.microsoft.com/en-us/library/dd441277(v=office.13).aspx
    Please check the OCS components that are required to implement the Response Group Service below:
    Application Server and Response Group Service
    Language pack
    Administrative tools
    Web Components Server
    Internet Information Services
    Microsoft Office Communicator 2007 R2
    You can try to use the workflows that you crated to validate the deployment.
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

  • Reporting Services through ISA server for All Authenticated Users

    Hello colleagues.
    I have MS SQL 2012 server with Reporting Services and it work via link:
    https://reports2.domain.com/reports
    In LAN all work fine, but I want publish this resource via ISA for All Authenticated Users.
    When in publish rule I configure (in Condition) "All users" - all work fine, but when I configure "All Authenticated Users" - I have trouble on web form on
    https://reports2.domain.com/reports/Pages/Report.aspx?ItemPat...  - scripts not work, because it run how "anonymous" (I see on ISA logging) and ISA block scripts.
    I can't use "All Users", because it's not secure.
    Maybe somebody publish Reporting Services through ISA server for All Authenticated Users?
    OR maybe - how on Reporting Services configure Negotiate authenticated for scripts?

    Hi Alexander,
    All users or applications who request access to report server content or operations must be authenticated using the authentication type configured on the report server before access is allowed. The AuthenticationType named RSWindowsNegotiate is supported
    by Reporting Services. To configure Windows Authentication on the Report Server, please see:
    http://msdn.microsoft.com/en-us/library/cc281253(v=sql.110).aspx
    Besides, we can publish report server via ISA server. Please note that you should use a new web port number with a new listener which shouldn’t be used by other web site for report server. Reference:
    http://social.technet.microsoft.com/Forums/forefront/en-US/1cc68996-1ce6-4d88-a30d-2bfd13fba06e/how-to-publish-ssrs-2008-through-isa-2006?forum=Forefrontedgegeneral
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support
    Katherine thanks for answer.
    Report Server service started as Domain account.
    I have in RSReportServer.config this:
    <Authentication>
    <AuthenticationTypes>
    <RSWindowsNegotiate />
    </AuthenticationTypes>
    <RSWindowsExtendedProtectionLevel>Allow</RSWindowsExtendedProtectionLevel>
    <RSWindowsExtendedProtectionScenario>Proxy</RSWindowsExtendedProtectionScenario>
    <EnableAuthPersistence>true</EnableAuthPersistence>
    </Authentication>
    In web.config I have this:
    <authentication mode="Windows" />
        <identity impersonate="true" />
    I can go (from Internet through ISA) to
    https://reports2.domain.com/reports  and LogOn Authentication is work, but scripts not work, because it run how "anonymous" (I see this on ISA logging) and ISA block scripts.
    Do you know where in Reporting Services configure run scripts with Negotiate authentication?

  • HT5487 So we just got a new Macbook and I also installed the apple configurator tool. I'm using it to prepare the iPads for deployment and it won't let me prepare them? It gets an error stating "retrieving iOS info from apple" then it stops and says "inte

    So we just got a new Macbook and I also installed the apple configurator tool. I'm using it to prepare the iPads for deployment and it won't let me prepare them? It gets an error stating "retrieving iOS info from apple" then it stops and says "internet error". My Internet connection is fine with the Mac-book. It shows the iPad is listed under the Prepare logo up top as 1 but under supervise none are shown. Although it does show itself in iTunes. Also the profile I created is fresh and has no errors. We have tryed nearly everything I cna think of and online forums are not giving us to much info on this error. 

    A wag at this.  A port issue?
    "Apple Push Notification network setup
    When MDM servers and iOS devices are behind a firewall, some network configuration may need to take place in order for the MDM service to function properly. To send notifications from an MDM server to Apple Push Notification service, TCP port 2195 needs to be open. To reach the feedback service, TCP port 2196 will need to be open as well. For devices connecting to the push service over Wi-Fi, TCP port 5223 should
    be open."
    http://www.google.com/url?sa=t&rct=j&q=ports%20ios%20configure%20ipad&source=web &cd=1&ved=0CC0QFjAA&url=http%3A%2F%2Fimages.apple.com%2Fipad%2Fbusiness%2Fdocs%2 FiOS_MDM.pdf&ei=5lXGUPCcJMXx0gH2wYG4BA&usg=AFQjCNFzINvs7ktT-6o6Q_l4Qk2HkpjtCA&ca d=rja
    google: ports ios configure ipad
    Try it on your home network where there isn't a lot of 'controls' -- network filtering , firewalls, etc.
    Robert

  • PowerPivot for SharePoint configuration tool validation failed

    Validation fails when I run the PowerPivot for SharePoint configuration tool.  I've set up a virtual machine with Windows Server 2008, SQL Server 2012 (with SP 2) and SharePoint 2010.  The firewall is completely turned off (temporarily). 
    The SQL Server service is running (so is SQL Server Browser).  TCP/IP and Named Pipes are both enabled (disabling one or the other doesn't solve the problem).  Remote connections are enabled.  The services have been stopped and restarted every
    time I make a change to something.  Still getting the following error.  Can anyone help?  Thank you in advance!
    Cannot connect to the database server instance.  A network-related or instance-specific error occurred while establishing a connection to SQL Server.  The server was not found or was not accessible. Verify that the instance name is correct and
    that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

    Solved it.  I used the IP address as the server name, instead of using the standard naming convention.

  • How do I tell my clients to configure the connectionstrings for a cloud service?

    I have an application that exists in two forms
    A Windows Service
    A Clouse Service with a Web Worker Role
    Both applications have an encrypted connection string in the app.config;
    for clients using the Windows Service I know how to tell them to change the config file.
    For a cloud service is it possible to edit the configuration file?
    I read something about Azure Settings, but I can't find any good information about that, is that the preferred method for setting environment settings in a Cloud Service?
    Can you remote in to a VM or whatever hosts the Cloud Service?
    Thank you for any help. I am writing the documentation about how to setup the Azure environment and I realized I don't know myself, I only know how to publish with Visual Studio to a cloud service with the values already set. That works, but I can't
    tell a client to use Visual Studio.

    Hi,
    For a cloud service, though it is possible to access instance VMs and do changes on their file system by RDP sessions, but it is not recommended, as you will end up loosing your changes if role instance VMs are restarted.
    If you really want to keep certain settings configurable and which will be shared by all your role instances, best way to do is to utilise the cloud service configurations, typically you mention these settings in .cscfg file and you can also edit those using
    azure management portal.
    You can also access those from your code 
    string settingValue = CloudConfigurationManager.GetSetting("SettingString");
    Read more about it here - http://msdn.microsoft.com/en-us/library/azure/ee405486.aspx
    http://haishibai.blogspot.in/2012/09/windows-azure-cloud-service.html
    Bhushan | Blog |
    LinkedIn | Twitter

  • REST API: Create Deployment throwing error BadRequest (The specified configuration settings for Settings are invalid. Verify that the service configuration file is a valid XML file, and that role instance counts are specified as positive integers.)

    Hi All,
    We are trying to access the Create Deployment method stated below
    http://msdn.microsoft.com/en-us/library/windowsazure/ee460813
    We have uploaded the Package in the blob and browsing the configuration file. We have checked trying to upload manually the package and config file in Azure portal and its working
    fine.
    Below is the code we have written for creating deployment where "AzureEcoystemCloudService" is our cloud service name where we want to deploy our package. I have also highlighted the XML creation
    part.
    byte[] bytes =
    new byte[fupldConfig.PostedFile.ContentLength + 1];
                fupldConfig.PostedFile.InputStream.Read(bytes, 0, bytes.Length);
    string a = Encoding.UTF8.GetString(bytes, 0, bytes.Length);
    string base64ConfigurationFile = a.ToBase64();
    X509Certificate2 certificate =
    CertificateUtility.GetStoreCertificate(ConfigurationManager.AppSettings["thumbprint"].ToString());
    HostedService.CreateNewDeployment(certificate,
    ConfigurationManager.AppSettings["SubscriptionId"].ToString(),
    "2012-03-01", "AzureEcoystemCloudService", Infosys.AzureEcosystem.Entities.Enums.DeploymentSlot.staging,
    "AzureEcoystemDeployment",
    "http://shubhendustorage.blob.core.windows.net/shubhendustorage/Infosys.AzureEcoystem.Web.cspkg",
    "AzureEcoystemDeployment", base64ConfigurationFile,
    true, false);   
    <summary>
    /// </summary>
    /// <param name="certificate"></param>
    /// <param name="subscriptionId"></param>
    /// <param name="version"></param>
    /// <param name="serviceName"></param>
    /// <param name="deploymentSlot"></param>
    /// <param name="name"></param>
    /// <param name="packageUrl"></param>
    /// <param name="label"></param>
    /// <param name="base64Configuration"></param>
    /// <param name="startDeployment"></param>
    /// <param name="treatWarningsAsError"></param>
    public static
    void CreateNewDeployment(X509Certificate2 certificate,
    string subscriptionId,
    string version, string serviceName, Infosys.AzureEcosystem.Entities.Enums.DeploymentSlot deploymentSlot,
    string name, string packageUrl,
    string label, string base64Configuration,
    bool startDeployment, bool treatWarningsAsError)
    Uri uri = new
    Uri(String.Format(Constants.CreateDeploymentUrlTemplate, subscriptionId, serviceName, deploymentSlot.ToString()));
    XNamespace wa = Constants.xmlNamespace;
    XDocument requestBody =
    new XDocument();
    String base64ConfigurationFile = base64Configuration;
    String base64Label = label.ToBase64();
    XElement xName = new
    XElement(wa + "Name", name);
    XElement xPackageUrl =
    new XElement(wa +
    "PackageUrl", packageUrl);
    XElement xLabel = new
    XElement(wa + "Label", base64Label);
    XElement xConfiguration =
    new XElement(wa +
    "Configuration", base64ConfigurationFile);
    XElement xStartDeployment =
    new XElement(wa +
    "StartDeployment", startDeployment.ToString().ToLower());
    XElement xTreatWarningsAsError =
    new XElement(wa +
    "TreatWarningsAsError", treatWarningsAsError.ToString().ToLower());
    XElement createDeployment =
    new XElement(wa +
    "CreateDeployment");
                createDeployment.Add(xName);
                createDeployment.Add(xPackageUrl);
                createDeployment.Add(xLabel);
                createDeployment.Add(xConfiguration);
                createDeployment.Add(xStartDeployment);
                createDeployment.Add(xTreatWarningsAsError);
                requestBody.Add(createDeployment);
                requestBody.Declaration =
    new XDeclaration("1.0",
    "UTF-8", "no");
    XDocument responseBody;
    RestApiUtility.InvokeRequest(
                    uri, Infosys.AzureEcosystem.Entities.Enums.RequestMethod.POST.ToString(),
    HttpStatusCode.Accepted, requestBody, certificate, version,
    out responseBody);
    <summary>
    /// A helper function to invoke a Service Management REST API operation.
    /// Throws an ApplicationException on unexpected status code results.
    /// </summary>
    /// <param name="uri">The URI of the operation to invoke using a web request.</param>
    /// <param name="method">The method of the web request, GET, PUT, POST, or DELETE.</param>
    /// <param name="expectedCode">The expected status code.</param>
    /// <param name="requestBody">The XML body to send with the web request. Use null to send no request body.</param>
    /// <param name="responseBody">The XML body returned by the request, if any.</param>
    /// <returns>The requestId returned by the operation.</returns>
    public static
    string InvokeRequest(
    Uri uri,
    string method,
    HttpStatusCode expectedCode,
    XDocument requestBody,
    X509Certificate2 certificate,
    string version,
    out XDocument responseBody)
                responseBody =
    null;
    string requestId = String.Empty;
    HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(uri);
                request.Method = method;
                request.Headers.Add("x-ms-Version", version);
                request.ClientCertificates.Add(certificate);
                request.ContentType =
    "application/xml";
    if (requestBody != null)
    using (Stream requestStream = request.GetRequestStream())
    using (StreamWriter streamWriter =
    new StreamWriter(
                            requestStream, System.Text.UTF8Encoding.UTF8))
                            requestBody.Save(streamWriter,
    SaveOptions.DisableFormatting);
    HttpWebResponse response;
    HttpStatusCode statusCode =
    HttpStatusCode.Unused;
    try
    response = (HttpWebResponse)request.GetResponse();
    catch (WebException ex)
    // GetResponse throws a WebException for 4XX and 5XX status codes
                    response = (HttpWebResponse)ex.Response;
    try
                    statusCode = response.StatusCode;
    if (response.ContentLength > 0)
    using (XmlReader reader =
    XmlReader.Create(response.GetResponseStream()))
                            responseBody =
    XDocument.Load(reader);
    if (response.Headers !=
    null)
                        requestId = response.Headers["x-ms-request-id"];
    finally
                    response.Close();
    if (!statusCode.Equals(expectedCode))
    throw new
    ApplicationException(string.Format(
    "Call to {0} returned an error:{1}Status Code: {2} ({3}):{1}{4}",
                        uri.ToString(),
    Environment.NewLine,
                        (int)statusCode,
                        statusCode,
                        responseBody.ToString(SaveOptions.OmitDuplicateNamespaces)));
    return requestId;
    But every time we are getting the below error from the line
     response = (HttpWebResponse)request.GetResponse();
    <Error xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
      <Code>BadRequest</Code>
      <Message>The specified configuration settings for Settings are invalid. Verify that the service configuration file is a valid XML file, and that role instance counts are specified as positive integers.</Message>
    </Error>
     Any help is appreciated.
    Thanks,
    Shubhendu

    Please find the request XML I have found it in debug mode
    <CreateDeployment xmlns="http://schemas.microsoft.com/windowsazure">
      <Name>742d0a5e-2a5d-4bd0-b4ac-dc9fa0d69610</Name>
      <PackageUrl>http://shubhendustorage.blob.core.windows.net/shubhendustorage/WindowsAzure1.cspkg</PackageUrl>
      <Label>QXp1cmVFY295c3RlbURlcGxveW1lbnQ=</Label>
      <Configuration>77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0NCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KDQogIFRoaXMgZmlsZSB3YXMgZ2VuZXJhdGVkIGJ5IGEgdG9vbCBmcm9tIHRoZSBwcm9qZWN0IGZpbGU6IFNlcnZpY2VDb25maWd1cmF0aW9uLkNsb3VkLmNzY2ZnDQoNCiAgQ2hhbmdlcyB0byB0aGlzIGZpbGUgbWF5IGNhdXNlIGluY29ycmVjdCBiZWhhdmlvciBhbmQgd2lsbCBiZSBsb3N0IGlmIHRoZSBmaWxlIGlzIHJlZ2VuZXJhdGVkLg0KDQogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCi0tPg0KPFNlcnZpY2VDb25maWd1cmF0aW9uIHNlcnZpY2VOYW1lPSJXaW5kb3dzQXp1cmUxIiB4bWxucz0iaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS9TZXJ2aWNlSG9zdGluZy8yMDA4LzEwL1NlcnZpY2VDb25maWd1cmF0aW9uIiBvc0ZhbWlseT0iMSIgb3NWZXJzaW9uPSIqIiBzY2hlbWFWZXJzaW9uPSIyMDEyLTA1LjEuNyI+DQogIDxSb2xlIG5hbWU9IldlYlJvbGUxIj4NCiAgICA8SW5zdGFuY2VzIGNvdW50PSIyIiAvPg0KICAgIDxDb25maWd1cmF0aW9uU2V0dGluZ3M+DQogICAgICA8U2V0dGluZyBuYW1lPSJNaWNyb3NvZnQuV2luZG93c0F6dXJlLlBsdWdpbnMuRGlhZ25vc3RpY3MuQ29ubmVjdGlvblN0cmluZyIgdmFsdWU9IkRlZmF1bHRFbmRwb2ludHNQcm90b2NvbD1odHRwcztBY2NvdW50TmFtZT1zaHViaGVuZHVzdG9yYWdlO0FjY291bnRLZXk9WHIzZ3o2aUxFSkdMRHJBd1dTV3VIaUt3UklXbkFrYWo0MkFEcU5saGRKTTJwUnhnSzl4TWZEcTQ1ZHI3aDJXWUYvYUxObENnZ0FiZnhONWVBZ2lTWGc9PSIgLz4NCiAgICA8L0NvbmZpZ3VyYXRpb25TZXR0aW5ncz4NCiAgPC9Sb2xlPg0KPC9TZXJ2aWNlQ29uZmlndXJhdGlvbj4=</Configuration>
      <StartDeployment>true</StartDeployment>
      <TreatWarningsAsError>false</TreatWarningsAsError>
    </CreateDeployment>
    Shubhendu G

  • Tool like PathPing that can pinpoint packet loss and can be configured to run for 24 hours

    Does anybody know if there is a simple tool like PathPing that can pinpoint packet loss and can be configured to run for eg. 24 hours. I need it for windows XP preferable a cmd line tool like PathPing. Thanks Simon.

    Thanks for your answer. I already downloaded winmtr.
    Regards
    Simon
    From:
    namohamm
    To:
    Simon Vyrdal/Sweden/Contr/IBM@IBMSE
    Date:
    2010-12-30 08:29
    Subject:
    New message: "Tool like PathPing that can pinpoint
    packet loss and can be configured to run for 24 hours"
    simonvyrdal,
    A new message was posted in the Discussion thread "Tool like PathPing that
    can pinpoint packet loss and can be configured to run for 24 hours":
    https://supportforums.cisco.com/message/3258861#3258861
    Author : Nael Mohammad
    Profile : https://supportforums.cisco.com/people/namohamm
    Message:

  • Problem configure WSDL destination for web services metadata gen and exec

    Hello,
    First question:
    Is WSIL supported by an R/3 4.7 ABAP system?
    If yes I'd like to consume web services from it (Function Modules remote-enabled), through WSIL. I need thus to configure 2 WSDL destinations on the SLD for metadata generation and execution.
    Second question:
    What are the url to fill-in into the destination template configurations?
    Thanks for your input,
    Tanguy Mezzano

    In other words, is it possible to call web services from a R/3 4.7 abap stack with WSIL, thus not through the WSDL. For that we need to set two WSDL destinations in the SLD in section SOAMANAGER.
    Or is this only possible for ECC6.0?
    Thanks for helping.
    Tanguy

  • Traffic/Service configuration for ISG

    Need help in configuration so that the following requirements should be met:
    A set of target IP Addresses to be excluded in the traffic defined for a service (access to those IPs should be allowed, only that the traffic should not be qualified under service usage)
    Please let me know about this as quickly as possible as its urgent for me.
    Thanks.

    No Service Authentication is done successfully using RADIUS. We have two services INTERNET & INTRANET and the question here is how to configure the IP traffic for a particular service i.e either for INTERNET or INTRANET service. To be more specific on the details:
    We are using CISCO ISG as a gateway for both INTERNET and INTRANET access. We are having a separate billing server connected with AAA server. We are able to successfully bill the authenticated users when they are accessing the INTERNET service (for both prepaid and postpaid).
    But our problem is when a user who is authenticated and is accessing the INTRANET pages, he getting charged for that service and amount is deducted from his/her account. To be precise over the solution required:
    - Exclude the charging/billing for the user when he accesses INTRANET service.
    - At the same time charge/bill him when he is accessing INTERNET service.
    Any suggestions regarding CISCO ISG configuration in this regard for how to achieve the above requirement is highly apppreiciated.
    Thanks.

  • Provisioning/configuration tool for multiple ATAs

    Would anyone know of a provisioning/configuration tool that can be used for, hundreds possibly thousands of ATAs?

    The Internetwork Performance Monitor application within CiscoWorks LAN Management Solution can do this. You can download a 90-day eval copy of LMS from http://www.cisco.com/go/nmsevals .

  • No active service configuration for service: FormsService

    Hi All,
    I am using a java application to render pdf from XDP. Whenever i perform action to download or view pdf, i am getting the below error message in my eclipse. Please assist. Thanks.
    Error in rendering PDF :ALC-DSC-023-000: com.adobe.idp.dsc.registry.service.NoActiveServiceConfigurationException: There is no active service configuration for service: FormsService."

    Hi Pushkar,
    I am unable to uninsatll the service component. The service is still running and not let me stop and re-install.
    Is there is any way for me to stop the servie explicitly?
    thanks.

Maybe you are looking for