Adding Custom Perfomance Counters In Service Calls?

May 26, 2010

I have to show the time taken for a service call in Perfmon from my ASP.Net application. For this, I have added a stopwatch which starts at the service call start and stops at service call stop. Now I have a custom counter which user AverageTimer32 to log the stopwatch values to Perfmon. My question is, how can I show the service names on the Perfmon graph. I am using windows XP (I know windows server perfmon has some fancy stuff).

View 1 Replies


Similar Messages:

Storing Last 10 Web Service Calls?

Feb 18, 2010

I have a SOAP web service and I'm trying to figure how to save/log the last 10 requests for each user. Each user is required to send their user/pass in each request, so it's easy to know who the request originated from. With these last 10 requests saved, my goal is to develop some sort of page that will allow them to log-in with their credentials and view the raw request, the actual SOAP message, http header information, and anything relevant that I can think of.

The point is to allow people to troubleshoot their own connection issues instead of having to contact me each time they can't connect, have trouble formatting their request, etc....

My first thought was to store all this information in memory in a hashtable or something, but that may have scalability issues when we have hundreds/thousands of users hitting the web service.

We could use our database to store these requests. Instead of hitting the database each time, I may need to create some "buffer" mechanism that will only update the database after the buffer gets to a certain number of requests. Is there an existing library or mechanism that will do this?

We can't store these requests on the file system on the machine hosting the web service. Since these requests can potentially contain sensitive information, it's a business decision that I'll need to work around. Or maybe there's a better way to achieve what I'm trying to do?

View 2 Replies

C# - Synchronicity Of Web Service Calls

Jul 29, 2010

Are web service calls synchronous or asynchronous by default? How is synchronicity determined, by the service or by the client?

I have code similar to the following:

try
{
string result = MakeWebServiceCall_1(); // this is a third party webservice
[code]....

In the above, SetStatus is writing to the same tables that the third party web services read from. If I change the status before both web service calls have completed, it's going to make a big mess and I'm going to get fired. How do I know/ensure that the webservice calls are synchronous?

View 1 Replies

VS 2008 - Log Web Service Calls

Nov 12, 2011

I've got a web app running with purely web services like these:

Code:
<WebMethod()> _
<ScriptMethod(ResponseFormat:=ResponseFormat.Json, UseHttpGet:=False)> _
Public Function EditService(ByVal toddtype As String _
, ByVal fromddtype As String _

[Code] ....

And I want to log each web service call. I don't want to bother my database with this log - I would prefer to have the web app log to a text file on the web server itself.

How would I open and access a log file like this from a bunch of web services? Does web app still have application startup like events???

View 1 Replies

Make API Calls To A Service Provider?

Sep 23, 2010

I'm trying to make API calls to a service provider. I've never tackled JSON requests before but I want to give it a go - as they seem less verbose than XML. Could someone be kind enough to give me a simple example here?

My confusion stems from some libraries I've come across. Do I need to add any libraries to my project? Or is it just a matter of creating a string that complies with JSON syntax and send it via a WebRequest?

View 3 Replies

C# - Multiple Calls To The Same Web Service Blocking?

Nov 18, 2010

We have a page that makes a request to a 3'rd party web service. When under heavy load this response time extends significantly, however the 3'rd party reports back that there times for processing remains constant. There timings show that from the time they receive a request to the time they send it back is always around 1.5-2.0 seconds. Now we are experiencing wait times of over 20 seconds. My understanding of ASP.NET is that each request will run on a IIS thread pool thread and make the request to the 3'rd party service return and process. So I don't really understand what could be blocking on our end. Is there something I am missing?? Is there a threshold limit beyond IIS that is blocking?

If I am missing something a physical book recommendation that covers this subject would also be a very welcome addition to any answer.

View 2 Replies

How To Keep Session Alive Between Two Calls To A Web Service In A C# Application

Oct 5, 2010

This is quite straight forward. I'm calling a web-service (.asmx, with session enabled) from a c# application. I want each call to be with the same session key as the previous one (as opposed to creating a new session key each time).

Here's my (nothing-out-of-the-ordinary) code:

[Code].....

View 3 Replies

AJAX :: Use AutoCompleteExtender Control Without Web Service Calls?

Apr 17, 2010

I am successful in using the AutoCompleteExtender control by make use of web serivces as the data source (ServiceMethod) to the extender control. My question is do we have any way in assining a code behind method as data source to this control.

removing the ServicePath url and assiging code behind method to ServiceMethod attribute will resolve the issue.

View 4 Replies

C# - WCF Service Calls Always Fail After 30 Seconds With (502) Bad Gateway?

May 4, 2010

We have a WCF service (BasicHttpBinding) which will always fail after 30 seconds. Calls under 30 seconds complete without error. Anything over 30 seconds will fail with a 502 Bad Gateway exception:

System.Net.WebException: The remote server returned an error: (502) Bad Gateway.

But yet the WCF call continues to run in the background (and will eventually complete). We have confirmed that the BasicHttpBinding - Binding - sendTimeout (in web.config) is greater than 30 seconds (actually set to 5 minutes). We confirmed this both on the client and the server.

Here is the full stack trace:

System.ServiceModel.ProtocolException: The remote server returned an unexpected response: (502) Bad Gateway. ---> System.Net.WebException: The remote server returned an error: (502) Bad Gateway.
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)

[Code]....

where this 30 second "timeout" is coming from or why a 502 Bad Gateway error is returned?

SOLUTION: We are using the IIS7 Application Request Routing Module which has Proxy settings of its own. The Proxy settings have a default timeout of 30 seconds. Increasing this to 600 seconds (10 minutes) solved our problem. The Bad Gateway error is not completely correct but WCF Trace Viewer (see answer) helped see that the problem was not the service itself but an issue in between the client and the wcf service.

View 1 Replies

AJAX :: Stop 2 Asynchronous Web Service Calls?

Nov 22, 2010

We have a custom Ajax checkbox control. In that control we set value (from inside the control) via a web service call (say WSCall1) to the business engine. There is also an event exposed on the OnClick of checkbox for the end user to have their custom code where the end user have their own web service call (say WSCall2). This event that end users will write is handled inside the ajax checkbox control on the "OnSuccess" of the internal web service call (i.e WSCall1) with an expectation that if WSCall1 succeeds, WSCall2 will get executed. This works fine with Firefox and Chrome but not in IE. In IE sometimes WSCall2 gets executed first and then WSCall1 -- actually there is no gurantee which web service gets called first. For WSCall1 we have used " Sys.Net.WebServiceProxy.invoke"

Is there a way we can make sure that WSCall2 gets only executed on the "OnSuccess" of WSCall1? Isn't the OnSuceess supposed to be executed when the WSCall1 thread returns?

View 1 Replies

Using Both Post And GetAjax Calls For The Same WebMethod In ASMX Web Service

Jan 20, 2010

I can't seem to call a web service method from Ajax with both POST and GET.

Initially only the POST would work and GET would causes this error:


{"Message":"An attempt was made to call the method u0027getDatau0027 using a GET request, which is not allowed.","StackTrace":" at System.Web.Script.Services.RestHandler.GetRawParams(WebServiceMethodData methodData, HttpContext context)at System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext
context, WebServiceMethodData methodData)","ExceptionType":"System.InvalidOperationException"}

I fixed that by adding this attribute: [ScriptMethod(UseHttpGet=true)] but now GET causes this error:

[code]....

So is it true that you can only use either POST or GET and not both from Ajax?

View 3 Replies

How To Configure A WCF Service That Calls Other Services Behind A Load Balancer

Sep 3, 2010

I haven't deployed behind a load balancer before. My customer has a WCF service built and tested on servers using a service model configuration that is relatively straightforward. It provides a service to return an image of a map for another application. To get the map, it calls other services.

The service was built in Visual Studio 2010 targeting the 3.5 framework. The customer is using IIS 7.5 and an F5 load balancer. When moving to the production server, the Web.config was changed to add the load balancer behavior and specify the endpoint to show the physical and logical address of the service:

[Code].....

There was a problem when the service was deployed to a server behind the load balancer. When I try to call the service from WCFStorm or WebServiceStudio I get the message "The provided URI scheme 'https' is invalid; expected 'http'.

The endpoints for the service itself look right to me. However in the development and testing versions of the config, the client section uses http instead of http, while on the production servers it uses the load balancer's https address. This seems like it should be obvious, but we're missing it.

View 1 Replies

C# - How To Retain Sessions Across Calls To Web Service From A Soap Client

Sep 14, 2010

Here is how my system is set up:

A web service using ASP.Net web service The web service has a web method with EnableSession=true
A client which refers to the web service using "Service References" (note: not "Web References")
The app.config of the client has allowCookies=true

[Code].....

The call to AppendUpload returns false, because of the mismatching session ids. Why is that?
As far as I can see, I have the right attributes for the web method, the client has the correct config, and the same instance of the proxy is used.

View 1 Replies

How To Separate Business Logic And Database Calls From A WCF Web Service

Jun 3, 2010

This question may have been asked before, but I'm looking for a different answer than what I've seen.

Our website is in ASP.NET and we use the model-view-presenter pattern to get business logic out of the markup codebehind.

Is there an accepted pattern for web services for getting business logic out of the codebehind? It seems like putting the logic in a 'presenter' is misleading since the calls don't really present anything to the user, and may not even send back data to the client.

View 1 Replies

Speed Up A Web Service For Auto Complete And Avoid Too Many Method Calls?

Jun 11, 2010

So I've got my jquery autocomplete 'working,' but its a little fidgety since I call the webservice method each time a keydown() fires so I get lots of methods hanging and sometimes to get the "auto" to work I have to type it out and backspace a bit because i'm assuming it got its return value a little slow. I've limited the query results to 8 to mininmize time. Is there anything i can do to make this a little snappier? This thing seems near useless if I don't get it a little more responsive.

[Code].....

View 5 Replies

How To Make Calls To A WCF Service With Jquery Ajax From An SSL- Secured Page

Jun 6, 2010

I have a WCF service returning JSON to jQuery ajax calls and presenting the results on an ASPX page. When the page is NOT under SSL, the ajax calls work perfectly. When the page IS under SSL, the calls fail. I understand that this behavior must be due to the Same Origin Policy (SOP).

So, how do I setup my WCF service to accept calls from an SSL-secured page? Does the WCF service also need to be secured? If so, how do I do this?

View 3 Replies

Web Forms :: Updating Client Side Controls Asynchronously From Service Calls

Oct 8, 2010

I am trying to update client side controls asynchronously with information from a service.

The service I am using has a callback delegate that points to the users web page (server side)

I would like to update information on the page that is initiated by another users also consuming the same service. exactly like a chatroom.

I am trying to use an update panel, and call updatepanel.update() (server side) once I recieve the information from the service. basically: how do I partially update control data from the server side so that client side can see it.

View 1 Replies

Architecture :: DAL As Web Service - Adding A Service Reference To Project And Then Using The EF4 Context And Writing LINQ Queries Against The DB?

Feb 10, 2011

I'm currently trying to work out the best way to build this web application, which will then be intergrated on other systems, such as WinForms, Intranets etc.

We hope to include the usual layers i.e. DAL, BLL, BOL and UI but I have been experimenting with Entity Framework 4 and WCF Data Services and managed to get something in place where I was using WCF as a gateway to EF4.

i.e. Adding a Service Reference to my project and then using the EF4 context and writing LINQ queries against the DB

e.g.[Code]....

Now with the current setup I would still need to write a DAL Class Library, that interacts with the Data Service, because as I said WCF Data Services only seems to be a gateway, I can't see where to put the code (above) in the Data Service and then how I could these methods.

My questions are: 1. How do I develop a WCF Data Service in such a way to allow this behaviour - I know how I could do it using ASMX web service, something like [Code]....

2. If I am to use WCF Data Services, how is serialization handled (if at all) - again I know how to do something in ASMX web services

3. Again, If I am to use WCF, how do I add Security and only allow my applications to access the web service - for obvious reasons

4. Would it be possible / logical to also include the Business Logic Layer into the web service?

View 4 Replies

WCF / ASMX :: Create An Instance Of Web Service Without Adding Web Service Reference?

Mar 17, 2011

How to create an instance of web service without adding web service reference? How to identify the server address/name where the web service is hosted from C# code?

View 1 Replies

Custom Server Controls :: User Control Calls Javascript Code On Load?

Jul 23, 2010

I'm building this small control. It should detect client resolution and set height and width values within two separated HtmlInputHidden controls. But tester property is not getting values froms this control.

[ToolboxData("<{0}:UIControlResolution runat=server></{0}:UIControlResolution>")]
public class UIControlResolution : Control
{
HtmlInputHidden _txtwidth = new HtmlInputHidden();
HtmlInputHidden _txtheight = new HtmlInputHidden();

[Code]....

View 2 Replies

Trying To Add Some Performance Counters To Website?

Jan 12, 2010

I'm trying to add some performance counters to my asp.net website. Now, I know how to increment/decrement some custom counter I make .. but my problem is that if I get my ASP.NET website to create these counters, if they do not exist (eg. i do this check in the global.asax App start method) then add/create them.

But, it doesn't work - access to the registry is denied/forbidden.

I'm assuming this is because the asp.net process is so stripped down (for security) that u can't touch that type of thing. Therefore, i'm wondering if the only other solution is to make a quick console or winform app which does one thing -> add's the perf counters. running this as my normal logged in user would me i have admin rights, so it will work. or is there something else i can do?

View 2 Replies

Technology Used For Running So Many Counters At Same Time

May 18, 2010

I am making a clone of quibids.com in asp.net. This site is in PHP. Can anyone check it and tell me which technology / language they are using behind those so many running counters at the same time? Is that server side counter or client side counter? I have tried ajax counter and ajax update panel in asp.net but it is taking so much time to load all counters and to run those counters. You can see my created website at : [URL]. Can anyone suggest me any good server side counter than ajax counter which can run fast or if I use a simple javascript counter, how can I bind it with database?

View 1 Replies

Looking For Big Perfomance Difference Between RenderPartial And Partial?

Sep 4, 2010

Also RenderAction and Action. RenderXXX akaik write directly to response stream and XXX use additional string buffer. I don't really want doing benchmark my myself, so maybe someone already do it.

View 2 Replies

MVC :: Tracing, Logging And Performance Counters?

May 12, 2010

This is a complete new one for me, but one of my tasks on our project (MVC 2, VS 2010, Net 4.0) is as follows:

Tracing, Logging and Performance Counters strategies must be in place on all controllers, action filters, etc. for system monitoring.

View 3 Replies

State Management :: Adding A Custom Object In Custom Principal?

Dec 27, 2010

I have Create a Custom Principal and a Custom Identiy for my Web Application and upon forms authentication

1 Create a profile of type object

2 Assign it to the Principal profile

3 assign the principal to the Http.Current.User (this now has the complete profile information )

As i understand upon redirection the principal is recreated and i loose the information i had stored in the profile.

I there a way to persist the profile information ?

I though can achieve persisting some information using FormsAuthenticationTicket in userData but that wouldent solve my purpose ..

View 7 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved