C# - Web Service Occasionally Slows Down Significantly?

Mar 11, 2010

My company is running into a problem with a web service that is written in C#/ASP.Net. The service receives an identity key for data in SQL Server and a path to generate and save a PDF report for this data.

In most cases, this web service returns results to the calling web pages very quickly, usually within a few seconds max.

However, it seems to occasionally hit a significant slowdown. The web application calling the web service will generate a timeout error when this slowdown occurs. We have checked and the PDF does get created and saved to the server, so it looks like the web service eventually finishes executing. It seems to take about 1 to 2 minutes for processing to have completed. The PDF is generated using ActiveReports from Data Dynamics.

Wwhen this problem occurs, making a small change to the web service's config file (ie, adding a blank space to a connection string line) seems to restart the web service and everything is perfectly ok for a period of time afterwards.

Other web applications that are running on the same web server do not seem to experience this type of behavior, only this particular web service.

I have added the code for the web service below. It is basic calls to 3rd party libraries. We are not able to recreate this problem in test.

[WebMethod]
public string Publish(int identity, string transactionType, string directory, string filename)
{
try
{

[Code]....

View 2 Replies


Similar Messages:

Web Forms :: Dropdownlist Slows Down Page?

Feb 20, 2011

I have a web page with some textboxes and some buttons on it. There is also a dropdown list. By experimenting I have discovered that the dropdown list, which has several thousand items in it, slows the page down considerably just by being there. I tried the following code in the datasource for the dropdown:

[Code]....

which didn't work. I also tried removing the datasource and populating the dropdown in code in the page load where not ispostback and that didn't work.

View 8 Replies

IIS Configuration :: Website Slows Down When Hosted On Server

Jul 8, 2013

My asp.net site has very good performance on local ips on all the systems. But it 5 time slow down on live ip.

1. What could be the issue:

Server is not capable? I have checked the ping and it response time is 153 ms for each require on live ip but on local ip it gives < 1 ms response time.

2. I have not compile the solution just copy and paste on the iis and create virtual directory?

View 1 Replies

AJAX :: Conctrol Toolkit HTMLEditor Slows Down Other Events On Page

Aug 30, 2010

I've made a test page, a HTMLEditor in a updatepanel. And a updatepanel with 1 butten and 1 textfield. If i press the button btnTextBox the _click code below is runned:

public partial class test : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnTextBox_Click(object sender, EventArgs e)
{
txtTextbox.Text = "Hellow world!";
}
}

It takes a few seconds bevore the "Hellow world" is in the texteditor. But if i remove the HTML editor, it going very quick! So if i add the ajaxcontroltoolkit in the page it slows down quite easy changes with some seconds.... so you get a very slow working page. How can i speed this up. The test ASPX page:

[Code]....

View 1 Replies

Forms Data Controls :: GridView Slows Down Going From VS 2005 To 2008?

Mar 5, 2010

I just upgraded one of my solutions from VS 2005 to 2008, and it completed successfully. The only thing that changed in the solution was that I went from .NET 2 to 3.5 framework.

Now when I debug and select a page where a GridView displays a table of 4580 rows the time to display it goes from 5 seconds to 5 minutes. Everything else in the project behaves as normal. Why would performance degrade on one GridView when going to VS 2008?

It's also noteworthy that changing the GridView parameters to AllowPaging="True" PageSize="25" will return performance to under a second response, as one might expect.

View 3 Replies

The Page Occasionally Locks Up Permanently?

Dec 16, 2010

I have a page with the CuteWebUI upload control in it. The page occasionally locks up permanently, and by locks up I mean the whole browser locks up. Does anyone have any problems like this, or can anyone think of a general reason why this would be happening?

View 4 Replies

Controls :: Binary Image Displayed Using BASE 64 String Slows Down Page Loading

May 7, 2015

When I am featching binary images from database and displaying in datalist on asp .net image cotrol. The image display getting too much time. When I click on next button also I take too much time for display next image.

View 1 Replies

AJAX :: TabContainer Occasionally Failing To Draw?

Mar 2, 2010

Okay, so this is one of those annoying bugs that happens sometimes, but not with enough regularity to really root out.

Fair warning that I'm still just toddling in ASP.NET, so I could be doing something heartbreakingly stupid. Here's the gist:

I've got a page with the bulk of its content inside of a TabContainer from the AJAX Toolkit. There are a few page elements outside the TabContainer -- mostly just header/footer stuff from the master page. Sometimes the page will load (either initially or on a postback) and the TabContainer will completely fail to draw, leaving a mostly-empty page. Clicking "Reload" in the browser almost always makes everything appear as usual.

What would make a TabContainer occasionally fail to draw? How can I go about debugging this.

View 4 Replies

Web Forms :: MSCaptcha - Image Is Not Displayed Occasionally?

Aug 31, 2010

I am using MONDOR's MSCaptcha control in my ASP.NET 3.5 application, and everything seemed to work fine both locally and remotely, till I started receiving complains from rare users.I am using is for my web site registration, and as I see many people are able to register, I assume that the problem is rare.

However, I've heard two complaints from two different users that Capthca image is not displayed at all. They did not add any special blocks to browsers, and both tried several browsers and it did not work in all of them.here is my code for referrence:

web.config:
<httpHandlers>
< [code]....

View 6 Replies

Configuration :: Web.Config Needs To Be Resaved Occasionally Or Login Fails ?

Jun 6, 2010

We have an ASP.NET forum (Community Server) installed in a subdirectory of a site. For some odd reason we occasionally get:

Login failed for user 'NT AUTHORITYNETWORK SERVICE'

If we open the web.config file and save it again without modifying anything in it, the login works again. This happens with intervals of 1-3 days.

View 3 Replies

AJAX :: SliderExtender Occasionally Not Render TextBox Correctly?

Oct 18, 2010

I am using a bunch of SliderExtenders to morph the ASP Textbox into a Slider control. This has worked great. However, I noticed that 1/20 times, occasionally, the sliderextender fails to morph the textbox. So the textbox actually appears during initial page_load. However, you can still drag the slider around because it is also rendered beneath the textbox.

A subsequent page refresh fixes this problem until some other time.

Second thing, this also frequently comes out more when switching between a javascript tab and an updatepanel.

View 1 Replies

C# - How To Browser Occasionally Losing HttpCookie For Authentication After Postback And Redirect

Dec 29, 2010

This has been a nagging issue for some time, but very sporadic and difficult to isolate.

From time to time, browsers that have authenticated on a web application, have been open for a while, have logged in and out of the same web application multiple times, have multiple tabs, are pretty much any browser (Chrome, IE, Firefox, Safari), and seemingly at random, lose their ability to retain an AuthCookie after being set and followed by a redirect. Closing the browser and starting a new session resolves the issue, as does opening up a different browser and attempting to authenticate.

Our team uses forms authentication for all of our websites and web application. This is a pretty typical setup where a login form is displayed, the user enters credentials and a cookie is set on the click event of the postback, then a redirect occurs to the same page where the cookie is then referenced and used to complete authentication.

In this situation

FormsAuthentication.FormsCookieName = ".WebAuth"

Within Event:

FormsAuthenticationTicket authTicket = new FormsAuthenticationTicket(1, Username, DateTime.Now, DateTime.Now.AddMinutes(SessionTimeout), false, Username); HttpCookie faCookie = new HttpCookie(FormsAuthentication.FormsCookieName, FormsAuthentication.Encrypt(authTicket));
Response.Cookies.Add(faCookie);
Response.Redirect(Request.RawUrl, true);
After the redirect, on PreInit:
HttpCookie authCookie = Request.Cookies[cookieName];

At this point, the authCookie variable is typically not null, but in these isolated circumstances that I've outlined above, the cookie comes back null after the redirect.

This happens very randomly, sometimes weeks before affecting one of our developers. As I said, restarting the browser resolves the issue.

Today I had it happen on our dev server while using Chrome. I had logged into the application, allowed the application to session timeout, and then attempted to login again. The attempted login then failed to set the cookie. I remotely attached Visual Studio to the process on the server to begin debugging. The entire time I could step through my code, even deploy new code versions to the server with updates, restart the app, restart IIS on the server, attach and reattach to the project, and the issue persisted in Chrome. In Firefox, I was able to authenticate without issue.

From Chrome, the login would validate, attempt to set a Response Cookie as outlined above. Prior to redirect, I could see the properly set Response Cookie, as well as its counterpart in the Request Cookies. However, on each redirect after a seemingly successful login, the Response and Request Cookie are gone.

I enabled Trace on the application to view the cookie collection:

There is a .WebAuth in the Request Cookies Collection, as well as ASP.NET_SessionId and several ASPSESSIONIDxxxxxxxx, but when the page loads, only the ASP.NET_SessionId and ASPSESSIONIDxxxxxxxx cookies are available in the Request.Cookies scope, no sign of the .WebAuth. However, in the page's Trace information after render, there multiple .WebAuth cookies listed, it is just that the page seems to have no access to them.

Primarily, on a working version after authentication there is both a .WebAuth Response and Request Cookie in the page's Trace info. But on a non functioning browser window, the Response Cookie is absent.

Has anyone else had any experience with this? It is such a nagging issue, and so sporadic, but I would love to be able to resolve it. My concern is that it may be affecting users and we would have no knowledge since the description of the issue is so convoluted.

View 1 Replies

AJAX :: ContentType Header Attribute Occasionally Not Present In Web Method

Jul 23, 2010

I am having a simple web service method which returns JSON serialized response. The attribute to web method is

[WebMethod, ScriptMethod(UseHttpGet = true, ResponseFormat = ResponseFormat.Json)]

As security of the return data is not a problem, I am Get enabling the HTTP response. On the client (browser) end, my code is as below

[Code]....

Everything works smoothly but occasionally on the web server's event viewer, I see the following error

"Request format is unrecognised for URL unexpectedly ending in /SomeWebServiceWebMethod"

After fiddling through the request headers using Fiddler, I figured out that if I make direct request to the webservice link, contentType header attribute is missing and that is what throws the error. There is a good post by scott guthrie explaining this. I am not able to replicate the issue and not sure what removes the contentType attribute from the request header occasionally.

View 2 Replies

Website Occasionally Being Redirected To Login Page Even Though Session Not Expired

Oct 27, 2011

What might cause this? Seems to be happening at random on a site I created. A user will for example be filing in a form, and when they click Save, it will flash to the login page as if the session has expired, but it will still show them logged in, and if they click back and save again it will work. It's not confined to the one page either, it just seemingly at random acts like the session has expired when it hasn't.

View 7 Replies

C# - Why Does Silverlight Reference To Wcf Service Blow Up When Add Method To The Wcf Service That Returns Generic List

Aug 17, 2010

I have built a WCF Service that is being consumed by a Silverlight app. At first I created one method that was very simple:

public String SfTest()
{
return "SF Test";
}

No poblem. My silverlight app references my service and displays "SF Test" in a textbox. Now I add a method to my wcf service like this:

public List<String> GetTest()
{
List<String> list = new List<string>();
String a = "a";
list.Add(a);
String b = "b";
list.Add(b);
return list;
}

I update the reference to the service in my Silverlight app and the using statement in my xaml cs page throws an error like the service doesn't even exist although it is there. I am assuming the problem has to do with datatypes or serialization or something like that but it is driving me up the wall. Why can't I consume a simple generic list in my Silverlight app through the WCF service.

View 1 Replies

VS 2010 - Web Service Runs Locally But When Deployed Has Error Could Not Create Type Service

May 24, 2012

I developed a web service in VS2010 on my local machine, wrote a consumer of it also locally, and that all works.

I copied the dll and the asmx file to our server, and I am getting an error when I try to invoke it from a browser (also still on the server machine) to make sure it correctly exposes its web methods, but it is not, it is saying "Could not create type 'Service'". That error comes from this line:

Line 1: <%@ WebService Language="C#" CodeBehind="~/App_Code/WarrantyDuplicate.cs" Class="Service" %>
There other web services in the same folder on the server that all work fine so I don't believe it's an IIS setup thing.

This is my first web service in C# and when I created it in VS I did think it odd that the code behind file went into App_Code (as you can see from the line in the asmx file) and is just named dot-cs rather than asmx-dot-cs. But since it worked fine locally, I wasn't sure that mattered.

View 2 Replies

Not Able To Execute Web Service Function Remotely When Site Hosted Even Web Service Ip Addresss Is...

Jan 5, 2011

I have asp.net 2.0 site which is calling web services hosted on another server. When i have an xml file from where web service ip for eg. www.mysite/webservice1/myservice.asmx is given. When i call the same server from developer machine using local networkit works fine.But the same is when hosted remotely and from client end when services is called reading xml fiile from client machine it given a message 'remote server not connecting'.

View 1 Replies

Architecture :: WCF Service Be Used To Receive Data As Needed From A Remote Sender Or Service?

Feb 25, 2011

I am not sure which approach I should use. I have a web application that needs to get/receive data from a third party application that is in a secure remote network. The data needs to be secure during transport. The data layers cannot be exposed and the databases will not talk to each other. The data will be received from remote application on demand, or will get at scheduled intervals.

I have looked at WCF, but not sure if this will work. Can a WCF service be used to receive data as needed from a remote sender or service? Is this a secure way of doing it? I have also looked at SFTP using some XML/XSLT, but I don't think this is the right way to go. In addition, some data may be transported from my web application to the remote application (mostly reports at first). What protocols are used to transfer data between HIPAA compliant applications?

View 7 Replies

Security :: Login Contols And A Web Service - Web Service To Do The Membership Authentication And Authorization?

Jan 23, 2010

I am writing two ASP.NET apps. One is a web service that provides xml data and the other is a web client that will use the service to display and manipulate data. I would like for the web service to do the membership authentication and authorization. Is there any way to simply point the login controls in my client application to the web service instead of to a database. I assume I would have to provide the necesarry methods in my web service interface, which would then use the membership provider database I created and pass the results back through to the client.

Is this possible? I have seen many articles on security provisioin from a web service but none has really been what I am looking for. I was hoping that, since my service and my client are both written in ASP.NET, there might be some built functionality that would benefit me.

View 8 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 :: Running A Web Service User Service / Domain Account?

Mar 28, 2011

Is it possible to run a web service as a particular user/service account in the same way a Windows service can?I have a service account used for connecting to the DB and want to run the webservice under this account as the users using the webservice won't have DB access.The way I see to do it is to include the Impersonate option in the Web.config file, but is there any better way to do this?

View 1 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

Unable To Pass User Credentials From WCF Web Service To ASMX Web Service

May 25, 2010

My WCF Client calls my WCF Service which then calls ASMX Web Service. The problem is i have configured my wcf client and wcf service to windows credentials type but when wcf service calls asmx service the user credentials (default windowsidentity) is not passed to asmx service.

In WCF Service i am able to get user identity by using : Thread.CurrentPrincipal.Identity.Name;
WCF Service - i have disabled anonymous access and enabled windows authentication. ASMX Web Service - i have disabled anonymous access and enabled windows authentication.
WCF Service Config
[Code]....

View 1 Replies

Is Url Of Web Service Fixed, When Reference For Web Service Is Implemented In Class Library

Feb 9, 2011

<Application architecture>I'm developing ASP.NET Web Application by Visual Studio 2008.(.Net Framework Version = 2.0)I put followin two projetcs in the solution.a. Class library which implements all the buisiness logic for application.
(I'll call it "ClassLib" in the followin sentence)b. ASP.NET Web applicatoin which presents UI.(I'll call it "WebApp")ClassLib uses Web Service which located on other server. So, I set web reference in it. Method for url settings for this web reference is "Dynamic".

View 1 Replies

Possible To Call An Web Service On Private Corporate Network From Web Service Located In Dmz

May 18, 2010

whether its possible to call an web service on a private corporate network from a web service located in a dmz?

View 2 Replies







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