<system.serviceModel>
<diagnostics wmiProviderEnabled="true">
I recently stumled across this setting in WCF, where you can enabled WMI logging. Where does it log to? and what is logged? There is no mention of that..
Pleaselet me know...
It is explained here and example here.
Related
I am preparing my WCF services for a performance load test. We need to find the system limits.
My understanding is that the default WCF throttling settings will impact performance load tests and does not allow to find the system limit.
What are the configuration settings that I need to increase and loosen up the WCF throttling settings?
So far I have the following items in mind and I wonder if they are accurate or the correct ones?
<behavior name="B1">
<serviceThrottling maxConcurrentCalls="20000" maxConcurrentSessions="20000" maxConcurrentInstances="20000"/>
</behavior>
never forgot to set max connection property:
<system.net>
<connectionManagement>
<add address="*" maxconnection="500" />
</connectionManagement>
the default value is 2. for more information you can read this: scale up WCF service
Perhaps I am barking up the wrong tree - but I have a set of services (WebAPI and WCF) that use WebSphere MQ to interact with other systems.
This works without issue - until I now need to find a way of listening for messages on one of the queues.
Is this even possible, or do I need to go down the windows Service route?
You could write a Windows service that is continually calling MQ Get on the queue, and invokes a WCF service to process the message. Or you could write a trigger program (a console application) that MQ will launch for you when a message arrives, that invokes the WCF service.
I might be just better at googling than you are, but I seem to have found the answer here.
Seems you want to load the IBM binding configuration in you app.config
<extensions>
<bindingElementExtensions>
<add name="IBM.XMS.WCF.SoapJmsIbmTransportChannel"
type="IBM.XMS.WCF.SoapJmsIbmTransportBindingElementConfig, IBM.XMS.WCF, Version=7.5.0.0, Culture=neutral, PublicKeyToken=8c7c0be90afcd8ba"/>
</bindingElementExtensions>
</extensions>
Then you can add a WebSphere WCF binding config.
<bindings>
<customBinding>
<binding name="CustomBinding_WMQ">
<textMessageEncoding messageVersion="Soap11" />
<IBM.XMS.WCF.SoapJmsIbmTransportChannel />
</binding>
</customBinding>
</bindings>
Your problem can be broken down into two distinct elements:
How to integrate MQ with a WCF-supported transport
How to expose a WCF endpoint over this transport
To address the first issue, you should look at the MQ-MSMQ bridge which ships with Host Integration Server up to version 2009 (not R2), which allows you to have messages delivered to MQSeries queues forwarded to local MSMQs in windows. Although this feature is deprecated it's probably the easiest way if you have a MSDN license.
Another way of addressing this issue is to use BizTalk server which ships with a MQSeries adapter, though unless you're using BizTalk currently in your enterprise I would avoid.
The last way you could do this is to program directly against the MQSeries .NET client libraries or via the XMS client.
If you manage to solve the first issue then solving the second one is easy enough. You can expose one way WCF service operations over msmq transport by using the netMsmqBinding (for WCF on both ends), or msmqIntegrationBinding for clients using System.Messaging or native msmq COM libraries.
This in-effect acts as a listener service, with messages being handled by the service operation.
how to get connect with ibm websphere mq by using c#.net
Perhaps you could use the above answer and within that queue consumer app create a "Service Reference" to your WCF service.
I am trying to enable and use WMI with a WCF service which i have, i have changed the configurations as per the link below.
http://msdn.microsoft.com/en-us/library/ms735120.aspx
http://msdn.microsoft.com/en-us/library/ms751442.aspx
<diagnostics wmiProviderEnabled="true" performanceCounters="All">
<messageLogging logMalformedMessages="true" logMessagesAtServiceLevel="true"
logMessagesAtTransportLevel="true" />
</diagnostics>
I am using the WMI object browser to read the WMI data from AppDomainInfo. When I run the service directly from Visual Studio 2010, using the WMI object browser I am able to read the AppDomainInfo data and also modify it also the Logs are creation is working.
If I connect to the service using my ASP.Net application so that the service is accessed and now when I try to access the WMI data from WMI object browser, I get a error message saying no instance of the class AppDomainData.
How can the WMI data be accessed without running the WCF service from Visual studio. Is any other configuration am i missing.
Thanks
I had to add aspnet user to ServiceModel security in WMI control as aspnet_wp process runs under aspnet user. With this i was able to access the WMI data in WMI object browser.
We have number of WCF services running on Windows 2008, IIS7, .NET Framework 4.0 (Amazon EC2).
We can see the counters available in ServiceModelService 4.0.0.0
We are interested in more granular operation level counters so we enabled in the service.
Yet, despite doing this (also recycle the worker process) operation level (or endpoint counters) are still not showing up in perfmon: only service level are available.
Can you advise what could be the issue?
Thanks,
Piotr
Did you enable them in the config file?
<configuration>
<system.serviceModel>
<diagnostics performanceCounters="All" />
</system.serviceModel>
</configuration>
By default the performanceCounters setting is set to ServiceOnly
Also, they will only show up when the service is up and running.
We have moved the same WCF service to Windows 2008 R2 on EC2 and all counters show up properly now.
Configuration is identical. Perhaps there is some oddity on Windows 2008 SP2 and EC2.
I have a WCF service which can run as Console App and a Windows Service. I have recently copied the console app up to a W2K3 server with the following security settings:
<wsHttpBinding>
<binding name="ServiceBinding_Security" transactionFlow="true" >
<security mode="TransportWithMessageCredential" >
<message clientCredentialType="UserName" />
</security>
</binding>
</wsHttpBinding>
<serviceCredentials>
<userNameAuthentication userNamePasswordValidationMode="Custom"
customUserNamePasswordValidatorType="Common.CustomUserNameValidator, Common" />
</serviceCredentials>
Security works fine with no problems. I have exactly the same code, but running in a windows service and I get the following error when I try to call any of the methods from a client:
System.ServiceModel.Security.MessageSecurityException was unhandled
Message="An unsecured or incorrectly secured fault was received from
the other party. See the inner FaultException for the fault code and detail."
Source="mscorlib"
StackTrace:
Server stack trace:
at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.ProcessReply(Message reply, SecurityProtocolCorrelationState correlationState, TimeSpan timeout)
......
(lots of stacktrace info - not very useful)
InnerException: System.ServiceModel.FaultException
Message="An error occurred when verifying security for the message."
The exception tells me nothing. I'm assuming that it has something to do with acces to system resources from the Windows Service. I've tried running it under the same account as the console app, but no luck. Does anyone have any ideas?
This is an error that sometimes has nothing to do with security.
I would recomend that you try first to get it to work without security, then just with message security, then with transport and finally with TransportWithMessageCredential.
Also if you are running the console app and the windows service app on the same machine make sure to stop the console app before starting the windows service, in order to avoid a port conflict
Enable diagnostics on the service. That should give you a pretty good idea of whether the service is even receiving the message and where the service is throwing an exception.
Update - I changed the customUserNamePasswordValidatorType from Custom to Windows. This worked fine in both the Console and Windows Service. I can only assume that something in the Custom Validator was causing the problem.
The custom validator used a custom config section in the App.config to validate the userid and Password. I would have thought this would have worked from a windows service though.
Thanks to all those who posted a reply.
You're using a custom user/name validator - does the Windows service have access to that file(s) ?
What account are you running the NT Service under ?
Does it work with all security turned off?? (just to see)
Marc