Search Results

Search found 20515 results on 821 pages for 'wmi service'.

Page 6/821 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • WMI Windows 7 vs Server 2003 R2 Problem

    - by Shahmir Javaid
    I have the below procedures running one after the Other. It seems to work fine in Windows 7 but fails on Windows Server 2003 R2. Any Ideas Why? Am i suppose to be disposing For Cpu ManagementObjectSearcher cpuSearcher = new ManagementObjectSearcher("root\\CIMv2", "SELECT * FROM Win32_Processor"); foreach (ManagementObject cpuObj in cpuSearcher.Get()) { cpu.Add(new cpuinfo(cpuObj["Name"].ToString())); cpuObj.Dispose(); } cpuSearcher.Dispose(); For Memory ManagementObjectSearcher memSearcher = new ManagementObjectSearcher("root\\CIMv2", "SELECT Capacity FROM Win32_PhysicalMemory"); //Get total Memory foreach (ManagementObject memObj in memSearcher.Get()) { MemTotal += (Int64.Parse((memObj["Capacity"].ToString()))); memObj.Dispose(); } Any Help would be apreaciated

    Read the article

  • How to get PCIController info with WMI query?

    - by smwikipedia
    I am using the following code to get some info about my PCIController try { ManagementObjectSearcher searcher = new ManagementObjectSearcher("Select * from Win32_PCIController"); foreach (ManagementObject cdrom in searcher.Get()) { Console.WriteLine("PCIController Name: {0}", cdrom.GetPropertyValue("Caption")); } } catch (Exception e) { Console.WriteLine(e.Message); } But it kept throwing "Invalid Class" exception. And I run my query with "wbemtest.exe" tool which is installed with Windows, and the same error there is. I checked the CIM_PCIController Class on MSDN and it seems my code is ok. But why the "Invalid Class exception"? Could someone help me, I just want to get some info from my PCI Controller device. Many thanks.

    Read the article

  • WMI: Create Method of the Win32_Service Class

    - by Marco
    Hello, I'm trying to use the Create method of the Win32_Service class, but when I call the InvokeMethod, I receive this exception: System.Management.ManagementException: Invalid method at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode) at System.Management.ManagementObject.InvokeMethod(String methodName, ManagementBaseObject inParameters, InvokeMethodOptions options) at <StartupCode$FSI_0075>.$FSI_0075.main@() This is the code (in F# but it is understable for C# programmers too :)): let scope = new ManagementScope(@"root\cimv2", null) use imageService = Utility.getServiceObject scope "Win32_Service" use inParams = imageService.GetMethodParameters("Create") inParams.["Name"] <- name inParams.["DisplayName"] <- displayName inParams.["PathName"] <- pathName inParams.["ServiceType"] <- 0x10 // Own Process inParams.["ErrorControl"] <- 0 // User is not notified inParams.["StartMode"] <- "Automatic" inParams.["DesktopInteract"] <- false inParams.["StartName"] <- "LocalSystem" inParams.["StartPassword"] <- "" inParams.["ServiceDependencies"] <- null use outParams = imageService.InvokeMethod("Create", inParams, null) The exception is thrown when the last line is executed (I removed the next lines). I think I'm calling correctly the method, so I don't know why the exception is thrown. Can anyone help me? Thanks in advance, Marco

    Read the article

  • WMI: Editing the Registry Remotely

    - by Quanta
    I'm trying to use the following code (poorly written, but it's just a proof of concept) to edit the registry of a computer on a domain. I have a domain account, and I've verified that the domain admin group is present in the local admin group on the machines I'm attempting to affect. I've connected to these other machines to perform other administrative type tasks, so I'm sure that I have administrative privileges on these hosts. All of StdRegProv's "get" methods work fine (http://msdn.microsoft.com/en-us/library/aa393664%28VS.85%29.aspx) but the "set" or "create" methods as well as check access all return "5" which is "Error_Access_Denied" according to winerror.h. So there's the problem: why do I get access denied when attempting to modify the registry? If anyone can help me figure this out, you'd have my utmost appreciation! I almost forgot, when I fire up Visual Studio in admin mode on my local machine and run the code against the local machine, it works flawlessly. If I don't start in admin mode on the local machine, the code fails, so I suspect there's a UAC problem maybe? using System; using System.Management; public class EditRemoteRegistry { public static void Main(string[] args) { ConnectionOptions options = new ConnectionOptions(); options.EnablePrivileges = true; options.Impersonation = ImpersonationLevel.Impersonate; options.Password = "password goes here"; //options.Authority = "my company's domain"; //options.Username = "Admin username"; ManagementScope scope = new ManagementScope("\\\\arbitraryhost\\root\\default", options); scope.Connect(); ManagementClass mc = new ManagementClass("StdRegProv"); ManagementBaseObject inParams = mc.GetMethodParameters("CreateKey"); inParams["hDefKey"] = (UInt32)2147483650; inParams["sSubKeyName"] = "Software\\Test"; ManagementBaseObject outParams = mc.InvokeMethod("CreateKey", inParams, null); //Should return a 0, but returns a 5, "Error_Access_Denied" Console.WriteLine("CreateKey Method returned " + outParams["returnValue"]); //This chunk works fine ManagementBaseObject inParams5 = mc.GetMethodParameters("GetDWORDValue"); inParams5["hDefKey"] = 2147483650; inParams5["sSubKeyName"] = "Software\\Test"; inParams5["sValueName"] = "testDWORDvalue"; ManagementBaseObject outParams5 = mc.InvokeMethod("GetDWORDValue", inParams5, null); Console.WriteLine("GetDWORDValue returned " + (UInt32)outParams5["returnValue"] + " "); Console.WriteLine((UInt32)outParams5["uValue"]); ManagementBaseObject inParams6 = mc.GetMethodParameters("SetStringValue"); inParams6["hDefKey"] = 2147483650; inParams6["sSubKeyName"] = "Software\\Test"; inParams6["sValueName"] = "TestStringValue"; inParams6["sValue"] = "Hello World!"; ManagementBaseObject outParams6 = mc.InvokeMethod("SetStringValue", inParams6, null); //Should return a 0, but returns a 5, "Error_Access_Denied" Console.WriteLine("SetStringValue returned " + outParams6["returnValue"]); Console.ReadKey(); } }

    Read the article

  • Can't read from RSOP_RegistryPolicySetting WMI class in root\RSOP namespace

    - by JCCyC
    The class is documented in http://msdn.microsoft.com/en-us/library/aa375050%28VS.85%29.aspx And from this page it seems it's not an abstract class: http://msdn.microsoft.com/en-us/library/aa375084%28VS.85%29.aspx But whenever I run the code below I get an "Invalid Class" exception in ManagementObjectSearcher.Get(). So, does this class exist or not? ManagementScope scope; ConnectionOptions options = new ConnectionOptions(); options.Username = tbUsername.Text; options.Password = tbPassword.Password; options.Authority = String.Format("ntlmdomain:{0}", tbDomain.Text); scope = new ManagementScope(String.Format("\\\\{0}\\root\\RSOP", tbHost.Text), options); scope.Connect(); ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, new ObjectQuery("SELECT * FROM RSOP_RegistryPolicySetting")); foreach (ManagementObject queryObj in searcher.Get()) { wmiResults.Text += String.Format("id={0}\n", queryObj["id"]); wmiResults.Text += String.Format("precedence={0}\n", queryObj["precedence"]); wmiResults.Text += String.Format("registryKey={0}\n", queryObj["registryKey"]); wmiResults.Text += String.Format("valueType={0}\n", queryObj["valueType"]); } In the first link above, it lists as a requirement something called a "MOF": "Rsopcls.mof". Is this something I should have but have not? How do I obtain it? Is it necessary in the querying machine or the queried machine? Or both? I do have two copies of this file: C:\Windows>dir rsop*.mof /s Volume in drive C has no label. Volume Serial Number is 245C-A6EF Directory of C:\Windows\System32\wbem 02/11/2006 05:22 100.388 rsop.mof 1 File(s) 100.388 bytes Directory of C:\Windows\winsxs\x86_microsoft-windows-grouppolicy-base-mof_31bf3856ad364e35_6.0.6001.18000_none_f2c4356a12313758 19/01/2008 07:03 100.388 rsop.mof 1 File(s) 100.388 bytes Total Files Listed: 2 File(s) 200.776 bytes 0 Dir(s) 6.625.456.128 bytes free

    Read the article

  • Using ManagementObject to retrieve a single WMI property

    - by Jesse
    This probably isn't the best way, but I am currently retrieving the amount of RAM on a machine using: manageObjSearch.Query = new ObjectQuery("SELECT TotalVisibleMemorySize FROM Win32_OperatingSystem"); manageObjCol = manageObjSearch.Get(); foreach (ManagementObject mo in manageObjCol) sizeInKilobytes = Convert.ToInt64(mo["TotalVisibleMemorySize"]); It works well and good, but I feel I could be doing this more directly and without a foreach over a single element, but I can't figure out how to index a ManagementObjectCollection I want to do something like this: ManagementObject mo = new ManagementObject("Win32_OperatingSystem.TotalVisibleMemorySize") mo.Get(); Console.WriteLine(mo["TotalVisibleMemorySize"].ToString()) or maybe even something like ManagementClass mc = new ManagementClass("Win32_OperatingSystem"); Console.WriteLine(mc.GetPropertyValue("TotalVisibleMemorySize").ToString()); I just can't seem to figure it out. Any ideas?

    Read the article

  • Creating an HTTP-Redirected Virtual Directopry in IIS 6.0 without specifying physical path & WMI/ADS

    - by Steve Johnson
    My question is : Is it possible to create a working IIS 6.0 Virtual Directory with providing Physical Path of the Virtual Directory.? I know that manually, it is not possible via IIS but programmatically such a virtual directory can be created. If an HTTPRedirect is set on that virtual directory but the site physical path is not specified, then will it work? Simply stated, how to create an HTTp-redirected Virtual Directory , directly without specifying any physical path to a folder or network share. Here is my code. Try If Directory.Exists(HomeDirectory) = False And Path.StartsWith("http://") = False Then Directory.CreateDirectory(HomeDirectory) End If Dim website As DirectoryEntry website = New DirectoryEntry("IIS://" & IISServer & "/W3SVC/" & WebsiteId & "/Root") Dim NewVDir As DirectoryEntry = website.Children.Add(VDirName, "IIsWebVirtualDir") If Path.StartsWith("http://") = False Then NewVDir.Properties("Path")(0) = Path NewVDir.Properties("HttpRedirect").Clear() Else NewVDir.Properties("HttpRedirect")(0) = Path End If If ((Perm And Permission.Read) = Permission.Read) Then NewVDir.Properties("AccessRead")(0) = True End If If ((Perm And Permission.Write) = Permission.Write) Then NewVDir.Properties("AccessWrite")(0) = True End If If ((Perm And Permission.DirBrowse) = Permission.DirBrowse) Then NewVDir.Properties("EnableDirBrowsing")(0) = True End If If ((Perm And Permission.CreatetApplication) = Permission.CreatetApplication) Then NewVDir.Invoke("AppCreate", True) End If If ((Perm And Permission.ScriptOnly) = Permission.ScriptOnly) Then NewVDir.Properties("AccessScript")(0) = True End If If ((Perm And Permission.ScriptNExecute) = Permission.ScriptNExecute) Then NewVDir.Properties("AccessExecute")(0) = True End If NewVDir.Properties("AuthAnonymous")(0) = True NewVDir.Properties("AuthNTLM")(0) = True NewVDir.Properties("AnonymousUserName")(0) = AnonUserName NewVDir.Properties("AnonymousUserPass")(0) = AnonPassword NewVDir.Properties("AppFriendlyName")(0) = AppFriendlyName NewVDir.CommitChanges() website.CommitChanges() NewVDir.Close() website.Close() Success = True Catch Err As Exception Throw New Exception("My Custom Exception Here: " & Err.Message) End Try

    Read the article

  • C#, wmi get disk manufacturer

    - by gloris
    Hi, how get USB flash(key) manufacturer name with C#? for example WD, Hama, Kingston... Now i with: "disk["Manufacturer"]", get: "Standard disk driver" string drive = "h"; ManagementObject disk = new ManagementObject("Win32_LogicalDisk.DeviceID=\"" + drive + ":\""); disk.Get(); Console.WriteLine(disk["VolumeSerialNumber"].ToString()); Console.WriteLine(disk["VolumeName"].ToString()); Console.WriteLine(disk["Manufacturer"].ToString());

    Read the article

  • WMI instrinsic events. Resources

    - by Nickolodeon
    Hi. I subscribe to usb inserted event like this select * FROM __INSTANCECREATIONEVENT WITHIN 3 WHERE TARGETINSTANCE ISA Win32_DiskDrive After inserting usb flash it blinks every 3 seconds. This is polling interval and intrinsic events work by polling object that's in query. Now, we know these types of events may be resource expensive. (Putting value greater then 3 sometimes chokes these events and client program doesn't get notified). Are there other ways to do that, so that usb doesn't get scanned all the time? May be there some extrinsic events available? Right now the only solution I see is to unsubscribe from event above once it trigerred and resubscribe to it in __INSTANCEDELETIONEVENT handler. Hm, althought deletionevent will also poll diskdrive controllers(

    Read the article

  • Time Service will not start on Windows Server - System error 1290

    - by paradroid
    I have been trying to sort out some time sync issues involving two domain controllers and seem to have ended up with a bigger problem. It's horrible. They are both virtual machines (one being on Amazon EC2), which I think may complicate things regarding time servers. The primary DC with all the FSMO roles is on the LAN. I reset its time server configuration like this (from memory): net stop w32time w23tm /unregister shutdown /r /t 0 w32tm /register w32tm /config /manualpeerlist:”0.uk.pool.ntp.org,1.uk.pool.ntp.org,2.uk.pool.ntp.org,3.uk.pool.ntp.org” /syncfromflags:manual /reliable:yes /update W32tm /config /update net start w32time reg QUERY HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config /v AnnounceFlags I checked to see if it was set to 0x05, which it was. The output for... w32tm /query /status Leap Indicator: 0(no warning) Stratum: 1 (primary reference - syncd by radio clock) Precision: -6 (15.625ms per tick) Root Delay: 0.0000000s Root Dispersion: 10.0000000s ReferenceId: 0x4C4F434C (source name: "LOCL") Last Successful Sync Time: 10/04/2012 15:03:27 Source: Local CMOS Clock Poll Interval: 6 (64s) While this was not what was intended, I thought I would sort it out after I made sure that the remote DC was syncing with it first. On the Amazon EC2 remote replica DC (Windows Server 2008 R2 Core)... net stop w32time w32tm /unregister shutdown /r /t 0 w32time /register net start w32time This is where it all goes wrong System error 1290 has occurred. The service start failed since one or more services in the same process have an incompatible service SID type setting. A service with restricted service SID type can only coexist in the same process with other services with a restricted SID type. If the service SID type for this service was just configured, the hosting process must be restarted in order to start this service. I cannot get the w32time service to start. I've tried resetting the time settings and tried to reverse what I have done. The Ec2Config service cannot start either, as it depends on the w32time service. All the solutions I have seen involve going into the telephony service registry settings, but as it is Server Core, it does not have that role, and I cannot see the relationship between that and the time service. w32time runs in the LocalService group and this telephony service which does not exist on Core runs in the NetworkService group. Could this have something to do with the process (svchost.exe) not being able to be run as a domain account, as it now a domain controller, but originally it ran as a local user group, or something like that? There seem to be a lot of cases of people having this problem, but the only solution has to do with the (non-existant on Core) telephony service. Who even uses that?

    Read the article

  • Forcing an External Activation with Service Broker

    - by Davide Mauri
    In these last days I’ve been working quite a lot with Service Broker, a technology I’m really happy to work with, since it can give a lot of satisfaction. The scale-out solution one can easily build is simply astonishing. I’m helping a company to build a very scalable and – yet almost inexpensive – invoicing system that has to be able to scale out using commodity hardware. To offload the work from the main server to satellite “compute nodes” (yes, I’ve borrowed this term from PDW) we’re using Service Broker and the External Activator application available in the SQL Server Feature Pack. For those who are not used to work with SSB, the External Activation is a feature that allows you to intercept the arrival of a message in a queue right from your application code. http://msdn.microsoft.com/en-us/library/ms171617.aspx (Look for “Event-Based Activation”) In order to make life even more easier, Microsoft released the External Activation application that saves you even from writing even this code. http://blogs.msdn.com/b/sql_service_broker/archive/tags/external+activator/ The External Activator application can be configured to execute your own application so that each time a message – an invoice in my case – arrives in the target queue, the invoking application is executed and the invoice is calculated. The very nice feature of External Activator is that it can automatically execute as many configured application in order to process as many messages as your system can handle.  This also a lot of create a scale-out solution, leaving to the developer only a fraction of the problems that usually came with asynchronous programming. Developers are also shielded from Service Broker since everything can be encapsulated in Stored Procedures, so that – for them – developing such scale-out asynchronous solution is not much more complex than just executing a bunch of Stored Procedures. Now, if everything works correctly, you don’t have to bother of anything else. You put messages in the queue and your application, invoked by the External Activator, process them. But what happen if for some reason your application fails to process the messages. For examples, it crashes? The message is safe in the queue so you just need to process it again. But your application is invoked by the External Activator application, so now the question is, how do you wake up that app? Service Broker will engage the activation process only if certain conditions are met: http://msdn.microsoft.com/en-us/library/ms171601.aspx But how we can invoke the activation process manually, without having to wait for another message to arrive (the arrival of a new message is a condition that can fire the activation process)? The “trick” is to do manually with the activation process does: sending a system message to a queue in charge of handling External Activation messages: declare @conversationHandle uniqueidentifier; declare @n xml = N' <EVENT_INSTANCE>   <EventType>QUEUE_ACTIVATION</EventType>   <PostTime>' + CONVERT(CHAR(24),GETDATE(),126) + '</PostTime>   <SPID>' + CAST(@@SPID AS VARCHAR(9)) + '</SPID>   <ServerName>[your_server_name]</ServerName>   <LoginName>[your_login_name]</LoginName>   <UserName>[your_user_name]</UserName>   <DatabaseName>[your_database_name]</DatabaseName>   <SchemaName>[your_queue_schema_name]</SchemaName>   <ObjectName>[your_queue_name]</ObjectName>   <ObjectType>QUEUE</ObjectType> </EVENT_INSTANCE>' begin dialog conversation     @conversationHandle from service        [<your_initiator_service_name>] to service          '<your_event_notification_service>' on contract         [http://schemas.microsoft.com/SQL/Notifications/PostEventNotification] with     encryption = off,     lifetime = 6000 ; send on conversation     @conversationHandle message type     [http://schemas.microsoft.com/SQL/Notifications/EventNotification] (@n) ;     end conversation @conversationHandle; That’s it! Put the code in a Stored Procedure and you can add to your application a button that says “Force Queue Processing” (or something similar) in order to start the activation process whenever you need it (which should not occur too frequently but it may happen). PS I know that the “fire-and-forget” (ending the conversation without waiting for an answer) technique is not a best practice, but in this case I don’t see how it can hurts so I decided to stay very close to the KISS principle []

    Read the article

  • Forcing an External Activation with Service Broker

    - by Davide Mauri
    In these last days I’ve been working quite a lot with Service Broker, a technology I’m really happy to work with, since it can give a lot of satisfaction. The scale-out solution one can easily build is simply astonishing. I’m helping a company to build a very scalable and – yet almost inexpensive – invoicing system that has to be able to scale out using commodity hardware. To offload the work from the main server to satellite “compute nodes” (yes, I’ve borrowed this term from PDW) we’re using Service Broker and the External Activator application available in the SQL Server Feature Pack. For those who are not used to work with SSB, the External Activation is a feature that allows you to intercept the arrival of a message in a queue right from your application code. http://msdn.microsoft.com/en-us/library/ms171617.aspx (Look for “Event-Based Activation”) In order to make life even more easier, Microsoft released the External Activation application that saves you even from writing even this code. http://blogs.msdn.com/b/sql_service_broker/archive/tags/external+activator/ The External Activator application can be configured to execute your own application so that each time a message – an invoice in my case – arrives in the target queue, the invoking application is executed and the invoice is calculated. The very nice feature of External Activator is that it can automatically execute as many configured application in order to process as many messages as your system can handle.  This also a lot of create a scale-out solution, leaving to the developer only a fraction of the problems that usually came with asynchronous programming. Developers are also shielded from Service Broker since everything can be encapsulated in Stored Procedures, so that – for them – developing such scale-out asynchronous solution is not much more complex than just executing a bunch of Stored Procedures. Now, if everything works correctly, you don’t have to bother of anything else. You put messages in the queue and your application, invoked by the External Activator, process them. But what happen if for some reason your application fails to process the messages. For examples, it crashes? The message is safe in the queue so you just need to process it again. But your application is invoked by the External Activator application, so now the question is, how do you wake up that app? Service Broker will engage the activation process only if certain conditions are met: http://msdn.microsoft.com/en-us/library/ms171601.aspx But how we can invoke the activation process manually, without having to wait for another message to arrive (the arrival of a new message is a condition that can fire the activation process)? The “trick” is to do manually with the activation process does: sending a system message to a queue in charge of handling External Activation messages: declare @conversationHandle uniqueidentifier; declare @n xml = N' <EVENT_INSTANCE>   <EventType>QUEUE_ACTIVATION</EventType>   <PostTime>' + CONVERT(CHAR(24),GETDATE(),126) + '</PostTime>   <SPID>' + CAST(@@SPID AS VARCHAR(9)) + '</SPID>   <ServerName>[your_server_name]</ServerName>   <LoginName>[your_login_name]</LoginName>   <UserName>[your_user_name]</UserName>   <DatabaseName>[your_database_name]</DatabaseName>   <SchemaName>[your_queue_schema_name]</SchemaName>   <ObjectName>[your_queue_name]</ObjectName>   <ObjectType>QUEUE</ObjectType> </EVENT_INSTANCE>' begin dialog conversation     @conversationHandle from service        [<your_initiator_service_name>] to service          '<your_event_notification_service>' on contract         [http://schemas.microsoft.com/SQL/Notifications/PostEventNotification] with     encryption = off,     lifetime = 6000 ; send on conversation     @conversationHandle message type     [http://schemas.microsoft.com/SQL/Notifications/EventNotification] (@n) ;     end conversation @conversationHandle; That’s it! Put the code in a Stored Procedure and you can add to your application a button that says “Force Queue Processing” (or something similar) in order to start the activation process whenever you need it (which should not occur too frequently but it may happen). PS I know that the “fire-and-forget” (ending the conversation without waiting for an answer) technique is not a best practice, but in this case I don’t see how it can hurts so I decided to stay very close to the KISS principle []

    Read the article

  • Enhanced REST Support in Oracle Service Bus 11gR1

    - by jeff.x.davies
    In a previous entry on REST and Oracle Service Bus (see http://blogs.oracle.com/jeffdavies/2009/06/restful_services_with_oracle_s_1.html) I encoded the REST query string really as part of the relative URL. For example, consider the following URI: http://localhost:7001/SimpleREST/Products/id=1234 Now, technically there is nothing wrong with this approach. However, it is generally more common to encode the search parameters into the query string. Take a look at the following URI that shows this principle http://localhost:7001/SimpleREST/Products?id=1234 At first blush this appears to be a trivial change. However, this approach is more intuitive, especially if you are passing in multiple parameters. For example: http://localhost:7001/SimpleREST/Products?cat=electronics&subcat=television&mfg=sony The above URI is obviously used to retrieve a list of televisions made by Sony. In prior versions of OSB (before 11gR1PS3), parsing the query string of a URI was more difficult than in the current release. In 11gR1PS3 it is now much easier to parse the query strings, which in turn makes developing REST services in OSB even easier. In this blog entry, we will re-implement the REST-ful Products services using query strings for passing parameter information. Lets begin with the implementation of the Products REST service. This service is implemented in the Products.proxy file of the project. Lets begin with the overall structure of the service, as shown in the following screenshot. This is a common pattern for REST services in the Oracle Service Bus. You implement different flows for each of the HTTP verbs that you want your service to support. Lets take a look at how the GET verb is implemented. This is the path that is taken of you were to point your browser to: http://localhost:7001/SimpleREST/Products/id=1234 There is an Assign action in the request pipeline that shows how to extract a query parameter. Here is the expression that is used to extract the id parameter: $inbound/ctx:transport/ctx:request/http:query-parameters/http:parameter[@name="id"]/@value The Assign action that stores the value into an OSB variable named id. Using this type of XPath statement you can query for any variables by name, without regard to their order in the parameter list. The Log statement is there simply to provided some debugging info in the OSB server console. The response pipeline contains a Replace action that constructs the response document for our rest service. Most of the response data is static, but the ID field that is returned is set based upon the query-parameter that was passed into the REST proxy. Testing the REST service with a browser is very simple. Just point it to the URL I showed you earlier. However, the browser is really only good for testing simple GET services. The OSB Test Console provides a much more robust environment for testing REST services, no matter which HTTP verb is used. Lets see how to use the Test Console to test this GET service. Open the OSB we console (http://localhost:7001/sbconsole) and log in as the administrator. Click on the Test Console icon (the little "bug") next to the Products proxy service in the SimpleREST project. This will bring up the Test Console browser window. Unlike SOAP services, we don't need to do much work in the request document because all of our request information will be encoded into the URI of the service itself. Belore the Request Document section of the Test Console is the Transport section. Expand that section and modify the query-parameters and http-method fields as shown in the next screenshot. By default, the query-parameters field will have the tags already defined. You just need to add a tag for each parameter you want to pass into the service. For out purposes with this particular call, you'd set the quer-parameters field as follows: <tp:parameter name="id" value="1234" /> </tp:query-parameters> Now you are ready to push the Execute button to see the results of the call. That covers the process for parsing query parameters using OSB. However, what if you have an OSB proxy service that needs to consume a REST-ful service? How do you tell OSB to pass the query parameters to the external service? In the sample code you will see a 2nd proxy service called CallREST. It invokes the Products proxy service in exactly the same way it would invoke any REST service. Our CallREST proxy service is defined as a SOAP service. This help to demonstrate OSBs ability to mediate between service consumers and service providers, decreasing the level of coupling between them. If you examine the message flow for the CallREST proxy service, you'll see that it uses an Operational branch to isolate processing logic for each operation that is defined by the SOAP service. We will focus on the getProductDetail branch, that calls the Products REST service using the HTTP GET verb. Expand the getProduct pipeline and the stage node that it contains. There is a single Assign statement that simply extracts the productID from the SOA request and stores it in a local OSB variable. Nothing suprising here. The real work (and the real learning) occurs in the Route node below the pipeline. The first thing to learn is that you need to use a route node when calling REST services, not a Service Callout or a Publish action. That's because only the Routing action has access to the $oubound variable, especially when invoking a business service. The Routing action contains 3 Insert actions. The first Insert action shows how to specify the HTTP verb as a GET. The second insert action simply inserts the XML node into the request. This element does not exist in the request by default, so we need to add it manually. Now that we have the element defined in our outbound request, we can fill it with the parameters that we want to send to the REST service. In the following screenshot you can see how we define the id parameter based on the productID value we extracted earlier from the SOAP request document. That expression will look for the parameter that has the name id and extract its value. That's all there is to it. You now know how to take full advantage of the query parameter parsing capability of the Oracle Service Bus 11gR1PS2. Download the sample source code here: rest2_sbconfig.jar Ubuntu and the OSB Test Console You will get an error when you try to use the Test Console with the Oracle Service Bus, using Ubuntu (or likely a number of other Linux distros also). The error (shown below) will state that the Test Console service is not running. The fix for this problem is quite simple. Open up the WebLogic Server administrator console (usually running at http://localhost:7001/console). In the Domain Structure window on the left side of the console, select the Servers entry under the Environment heading. The select the Admin Server entry in the main window of the console. By default, you should be viewing the Configuration tabe and the General sub tab in the main window. Look for the Listen Address field. By default it is blank, which means it is listening on all interfaces. For some reason Ubuntu doesn't like this. So enter a value like localhost or the specific IP address or DNS name for your server (usually its just localhost in development envirionments). Save your changes and restart the server. Your Test Console will now work correctly.

    Read the article

  • Oracle Service Registry 11gR1 Support for Oracle Fusion Middleware/SOA Suite 11g PatchSet 2

    - by Dave Berry
    As you might be aware, a few days back we released Patchset 2 (PS2) for several products in the Oracle Fusion Middleware 11g Release 1 stack including WebLogic Server and SOA Suite. Though there was no patchset released for Oracle Service Registry (OSR) 11g, being an integral part of Fusion Middleware & SOA, OSR 11g R1 ( 11.1.1.2 ) is fully certified with this release. Below is some recommended reading before installing OSR 11g with the new PS2 : OSR 11g R1 & SOA Suite 11g PS2 in a Shared WebLogic Domain If you intend to deploy OSR 11g in the same domain as the SOA Suite 11g, the primary recommendation is to install OSR 11g in its own Managed Server within the same Weblogic Domain as the SOA Suite, as the following diagram depicts : An important pre-requisite for this setup is to apply Patch 9499508, after installation. It basically replaces a registry library - wasp.jar - in the registry application deployed on your server, so as to enable co-deployment of OSR 11g & SOA Suite 11g in the same WLS Domain. The patch fixes a java.lang.LinkageError: loader constraint violation that appears in your OSR system log and is now available for download. The second, equally important, pre-requisite is to modify the setDomainEnv.sh/.cmd file for your WebLogic Domain to conditionally set the CLASSPATH so that the oracle.soa.fabric.jar library is not included in it for the Managed Server(s) hosting OSR 11g. Both these pre-requisites and other OSR 11g Topology Best Practices are covered in detail in the new Knowledge Base article Oracle Service Registry 11g Topology : Best Practices. Architecting an OSR 11g High Availability Setup Typically you would want to create a High Availability (HA) OSR 11g setup, especially on your production system. The following illustrates the recommended topology. The article, Hands-on Guide to Creating an Oracle Service Registry 11g High-Availability Setup on Oracle WebLogic Server 11g on OTN provides step-by-step instructions for creating such an active-active HA setup of multiple OSR 11g nodes with a Load Balancer in an Oracle WebLogic Server cluster environment. Additional Info The OSR Home Page on OTN is the hub for OSR and is regularly updated with latest information, articles, white papers etc. For further reading, this FAQ answers some common questions on OSR. The OSR Certification Matrix lists the Application Servers, Databases, Artifact Storage Tools, Web Browsers, IDEs, etc... that OSR 11g is certified against. If you hit any problems during OSR 11g installation, design time or runtime, the first place to look into is the logs. To find more details about which logs to check when & where, take a look at Where to find Oracle Service Registry Logs? Finally, if you have any questions or problems, there are various ways to reach us - on the SOA Governance forum on OTN, on the Community Forums or by contacting Oracle Support. Yogesh Sontakke and Dave Berry

    Read the article

  • Print SSRS Report / PDF automatically from SQL Server agent or Windows Service

    - by Jeremy Ramos
    Originally posted on: http://geekswithblogs.net/JeremyRamos/archive/2013/10/22/print-ssrs-report--pdf-from-sql-server-agent-or.aspxI have turned the Web upside-down to find a solution to this considering the least components and least maintenance as possible to achieve automated printing of an SSRS report. This is for the reason that we do not have a full software development team to maintain an app and we have to minimize the support overhead for the support team.Here is my setup:SQL Server 2008 R2 in Windows Server 2008 R2PDF format reports generated by SSRS Reports subscriptions to a Windows File ShareNetwork printerColoured reports with logo and brandingI have found and tested the following solutions to no avail:ProsConsCalling Adobe Acrobat Reader exe: "C:\Program Files (x86)\Adobe\Reader 11.0\Reader\acroRd32.exe" /n /s /o /h /t "C:\temp\print.pdf" \\printserver\printername"Very simple optionAdobe Acrobat reader requires to launch the GUI to send a job to a printer. Hence, this option cannot be used when printing from a service.Calling Adobe Acrobat Reader exe as a process from a .NET console appA bit harder than above, but still a simple solutionSame as cons abovePowershell script(Start-Process -FilePath "C:\temp\print.pdf" -Verb Print)Very simple optionUses default PDF client in quiet mode to Print, but also requires an active session.    Foxit ReaderVery simple optionRequires GUI same as Adobe Acrobat Reader Using the Reporting Services Web service to run and stream the report to an image object and then passed to the printerQuite complexThis is what we're trying to avoid  After pulling my hair out for two days, testing and evaluating the above solutions, I ended up learning more about printers (more than ever in my entire life) and how printer drivers work with PostScripts. I then bumped on to a PostScript interpreter called GhostScript (http://www.ghostscript.com/) and then the solution starts to get clearer and clearer.I managed to achieve a solution (maybe not be the simplest but efficient enough to achieve the least-maintenance-least-components goal) in 3-simple steps:Install GhostScript (http://www.ghostscript.com/download/) - this is an open-source PostScript and PDF interpreter. Printing directly using GhostScript only produces grayscale prints using the laserjet generic driver unless you save as BMP image and then interpret the colours using the imageInstall GSView (http://pages.cs.wisc.edu/~ghost/gsview/)- this is a GhostScript add-on to make it easier to directly print to a Windows printer. GSPrint automates the above  PDF -> BMP -> Printer Driver.Run the GSPrint command from SQL Server agent or Windows Service:"C:\Program Files\Ghostgum\gsview\gsprint.exe" -color -landscape -all -printer "printername" "C:\temp\print.pdf"Command line options are here: http://pages.cs.wisc.edu/~ghost/gsview/gsprint.htmAnother lesson learned is, since you are calling the script from the Service Account, it will not necessarily have the Printer mapped in its Windows profile (if it even has one). The workaround to this is by adding a local printer as you normally would and then map this printer to the network printer. Note that you may need to install the Printer Driver locally in the server.So, that's it! There are many ways to achieve a solution. The key thing is how you provide the smartest solution!

    Read the article

  • Visual Studio Service Pack 1 - Test first!

    - by CraigG
    It appears that our run of fairly benign VS SP’s is over… I've now installed the VS 2010 SP1 in a few simple test environments (x64) and all of them are having issues. Add-in failures, failed package loading, missing SQL Intellisense, XAML designer failure, etc. Make sure you test this Service Pack thoroughly before you release it to your production environment. Microsoft Connect is the official repository for issues with Service Pack 1.

    Read the article

  • Aggregating customer service emails from multiple ecommerce sites for easy handling

    - by nitbuntu
    For one of my main customer help email addresses I use Mozilla Thunderbird with a combination of tags and saved searches. As the number of my e-commerce sites grows from 1 to more, customer service handling gets more tricky. Is there any simple and efficient way of handling emails from the different sites? Perhaps what I'm looking for is a way of aggregating customer service emails from different sites, into one place? Perhaps there's a way of already doing this within Thunderbird or Gmail?

    Read the article

  • Aggregating customer service emails from multiple ecommerce sites for easy handling

    - by nitbuntu
    For one of my main customer help email addresses I use Mozilla Thunderbird with a combination of tags and saved searches. As the number of my e-commerce sites grows from 1 to more, customer service handling gets more tricky. Is there any simple and efficient way of handling emails from the different sites? Perhaps what I'm looking for is a way of aggregating customer service emails from different sites, into one place? Perhaps there's a way of already doing this within Thunderbird or Gmail?

    Read the article

  • How to troubleshoot a remote wmi query/access failure?

    - by Roman
    Hi I'm using Powershell to query a remote computer in a domain for a wmi object, eg: "gwmi -computer test -class win32_bios". I get this error message: Value does not fall within the expected range Executing the query local under the same user works fine. It seems to happen on both windows 2003 and also 2008 systems. The user that runs the shell has admin rights on the local and remote server. I checked wmi and dcom permissions as far as I know how to do this, they seem to be the same on a server where it works, and another where it does not. I think it is not a network issue, all ports are open that are needed, and it also happens within the same subnet. When sniffing the traffic we see the following errors: RPC: c/o Alter Cont Resp: Call=0x2 Assoc Grp=0x4E4E Xmit=0x16D0 Recv=0x16D0 Warning: GssAPIMechanism is not found, either caused by not reassembled, conversation off or filtering. And an errormessage from Kerberos: Kerberos: KRB_ERROR - KDC_ERR_BADOPTION (13) The option code in the packet is 0x40830000 Any idea what I should look into?

    Read the article

  • How to enable connection security for WMI firewall rules when using VAMT 2.0?

    - by Ondrej Tucny
    I want to use VAMT 2.0 to install product keys and active software in remote machines. Everything works fine as long as the ASync-In, DCOM-In, and WMI-In Windows Firewall rules are enabled and the action is set to Allow the connection. However, when I try using Allow the connection if it is secure (regardless of the connection security option chosen) VAMT won't connect to the remote machine. I tried using wbemtest and the error always is “The RPC server is unavailable”, error code 0x800706ba. How do I setup at least some level of connection security for remote WMI access for VAMT to work? I googled for correct VAMT setup, read the Volume Activation 2.0 Step-by-Step guide, but no luck finding anything about connection security.

    Read the article

  • Is there a way to set access to WMI using GroupPolicy?

    - by Greg Domjan
    From various documentation it appears that to change WMI access you need to use WMI to access the running service and modify specific parts of the tree. Its kind of annoying changing 150,000 hosts using the UI. And then having to include such changes in the process of adding new hosts. Could write a script to do the same, but that needs to either connect to all those machines live, or be distributed for later update say in an startup/install script. And then you have to mess around with copying binary SD data from an example access control. I've also found you can change the wbem/*.mof file to include an SDDL but I'm really vague on how that all works at the moment. Am I just missing some point of simple administration?

    Read the article

  • How to troubleshoot a remote wmi query/access failure?

    - by Roman
    I'm using Powershell to query a remote computer in a domain for a wmi object, eg: "gwmi -computer test -class win32_bios". I get this error message: Value does not fall within the expected range Executing the query local under the same user works fine. It seems to happen on both windows 2003 and also 2008 systems. The user that runs the shell has admin rights on the local and remote server. I checked wmi and dcom permissions as far as I know how to do this, they seem to be the same on a server where it works, and another where it does not. I think it is not a network issue, all ports are open that are needed, and it also happens within the same subnet. When sniffing the traffic we see the following errors: RPC: c/o Alter Cont Resp: Call=0x2 Assoc Grp=0x4E4E Xmit=0x16D0 Recv=0x16D0 Warning: GssAPIMechanism is not found, either caused by not reassembled, conversation off or filtering. And an errormessage from Kerberos: Kerberos: KRB_ERROR - KDC_ERR_BADOPTION (13) The option code in the packet is 0x40830000 Any idea what I should look into?

    Read the article

  • Can you have a WMI query for GPO Filter based on user's OU?

    - by Jordan Weinstein
    I'm wondering if there is a way to have a WMI query check the OU of the user logging on. I'd like a GPO (linked to Citrix servers OU) to apply only to users if the user is in a certain OU - this is for Citrix so the overly obvious answer of - well just link it to the OU the user is in does not apply. This also cannot be done using security groups because a long time ago those started to get used as Distribution Groups also and now too many are widely inaccurate. Lastly I need to apply this to the entire GPO as there are more than just group policy preferences included so I can't use the item-level targeting feature either. But my OUs are accurate so I'd like to use those if I can. I'd like a WMI query filter to say, apply GPO if user is member of OU 'x' that doable?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >