.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Procedure timeout when executing from the ASP.NET application

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :ASP.Net
Hello,I'm working with ASP.NET 3.5 and SQL Server 2008.I have a very weird problem. When I execute the procedure from my ASP.NETapplication (either from my PC or the Web server), it's timing out. At thesame time when I execute the same procedure with the same parameters fromthe SQL Server Management Studio - it executes instantly, so aparently thereis nothing wrong with it.This applies only to the few procedures, with most of them I don't have anyissues.To add to this mistery, this problem is intermittent, i.e. 50% of the time everything works OK.It seems that something is happening somewhere in the middle tier between myapplication and the SQL Server, but I have no idea what could it be and howto find the problem. I've increased the command timeout time to the max, and this is not an issue - the procedure in the SQL server works almost instantly. The number of connections is not an issue either - usually no more than one or two users are connected at the time. This is not an IIS issue either - when the application doesn't work, it doesn't work on the web server and my computer at the same time. When it does work - it also works in both places. I'm just lost. It seems that this problem started after we upgraded our SQL Server to 2008, never had any issues like this before.I would appreciate any comments on this.Thank you,Peter 

View Complete Post

More Related Resource Links

Procedure For Executing a SSIS package from .Net Application



I developed a ssis package and deployed to the MSDB location of the SQL server2005 server.

I developed a vb.net application and calling the SSIS package.

Its working fine  and executing the package.

Right now in my system SQL server 2005 is installed.

When I am executing the same application from the system in which SQL server environment is not there I am getting error.

What should I need to do If I want to run the same application from the system which don't have any SQL server environment.

Thanks in advance.

Using the BDC API how to catch the returned code when executing a stored procedure?

using BDC API, how can i catch the return code a stored procedure returns?

I tried Entity.Execute to execute a generic method. However, it returns an empty Entity table.

I know you can do it by setting up an output variable. I prefer returning an integer for tracking errors.

Any ideas?



Error Executing CLR Stored Procedure "Item has already been added. Key in dictionary"

Hello, I'm consuming a web service through assemblies in a Sql Server 2005 database. The client was made with VB.net 2005. Everything was fine in the deploy phase but once I compile the assembly generated in my sql server database and try to execute the CLR stored procedure defined in the assembly it crashes throwing the following error: Error: There was an error generating the XML document. Inner Exception: Item has already been added. Key in dictionary: 'SqlCifin.InfoComercial.ParametrosConsultaDTO' Key being added: 'SqlCifin.InfoComercial.ParametrosConsultaDTO' Where SqlCifin is the name of the assembly, InfoComercial is the web reference namespace and ParametrosConsultaDTO is a complex type defined in the WSDL to encapsulate the request parameters. I tried almost everything but nothing seems to work: Already checked the enviroment variables and . I would appreciate any help you can provide me.  PD: I'm using WSE 3.0. Thanks, Andres Diab.

Why does this query timeout in an application but not in Management Studio?

I have a query that looks something like this:   SELECT TOP 1 * FROM Customers c (NOLOCK) WHERE Key = (mykey) AND NOT EXISTS (SELECT 0 FROM Invoices i (NOLOCK) WHERE i.key = c.key AND i.Date > GETDATE() )   When I run this inside an (ODBC) application, it times out.   When I run it within SSMS, it works fine.  That might make you think its an application problem, but the timeout only occurs for one specific customer ... even in the application, it works fine for all other key values.    Any idea where I can even start looking for a solution to this?  Thanks.

Executing a job from a stored procedure stopped working

I've got a stored procedure in database A that calls the sp_start_job stored procedure in msdb as follows:   CREATE PROCEDURE xxxxx WITH EXECUTE AS 'domain\username'   AS   EXEC msdb.dbo.sp_start_job B'jobname' ;   RETURN   The domain\username is the in the database sysadmin role and the owner of the job.  To make this work originally, I had to change the msdb database to be trusted.   This worked for the past several months.   Now it doesn't work (perhaps after a reboot but not sure).  The error I get is "The EXECUTE permission was denied on the object 'sp_start_job', database 'msdb', schema 'dbo'   I looked to make sure that the account had grant execute rights and it does.  I tried setting it via GRANT statement and it was granted successfully yet the error still occurs.  I've tried changing accounts and anything else I can think of to no avail.   Any ideas how to troubleshoot this issue.  I've tried all the tricks I can think of.   Thanks - SM

Executing an SSIS package from an stored procedure and passing a parameter to it:

Hello all, I'm trying to execute an SSIS package from an stored procedure, using xp_cmdshell. When I execute the package, hard coding the value on the variable, I get rows inserted to my destination tables, which indicates my package pulled the correct data based on the TransactionID parameter. When I execute the package from the stored procedure, the package executes without issues, but I get no rows inserted into my destination tables, which leads me to think it is a data type issue, between the package and the variables I'm using within the stored procedure. The variable TransactionID on the SSIS package, is a string data type, therefore I'm passing it as a varchar from the stored procedure. Am I doing this correctly? Maybe I'm missing something, can you guys see anything wrong? Also, I tried login into the server and executing these 2 commands on the cmd prompt: One with "" quotes between the TransactionID value: dtexec /FILE "D:\SSISPackages\MyOrderCheckProcess\MyOrderCheck_RenewalOrder.dtsx" /CONFIGFILE "D:\SSISPackages\MyOrderCheckProcess\MyOrderCheckProcess_Config.dtsConfig" /CHECKPOINTING OFF  /REPORTING EWCDI  /SET \Package.Variables[User::TransactionID].Properties[Value];"470219"   And also one without quotes between the TransactionID value: dtexec /FILE "D:\SSISPackages\MyOrderCheckProcess\MyOrde

Error while executing SSIS package from a Stored Procedure


I am getting an error while executing a SSIS Package from SQL Server Stored Procedure.  But when I run it in BIDS, it executes successfully. Any help on this ???

SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occured.  Error Code: 0x80040ED. An OLE DB record is available. Source "Microsoft OLE DB Provider for Oracle" Hresult 0x80040eD Description: "ORA-01017: invalid username/password; logon denied"

executing stored procedure from different server


'Hi All,

If have two servers A and B.I have a stored procedure in server A.But i need to execute the Stored procedure from server B.

i have a job in server B, in the step of that job,it should be executing the stored procedure from Server A. how can we do this.there is no linked server.

Exec sp_prcLoadData (this is in server A,but i need to execute it from Server B.)


Thanks in Advance

executing stored procedure from different server


'Hi All,

If have two servers A and B.I have a stored procedure in server A.But i need to execute the Stored procedure from server B.

i have a job in server B, in the step of that job,it should be executing the stored procedure from Server A. how can we do this.there is no linked server.

Exec sp_prcLoadData (this is in server A,but i need to execute it from Server B.)


Thanks in Advance

Executing SharePoint console application without sharing user credentials


I have a console application, which uses SharePoint object model to do some business operation, therefore it has been deployed on SharePoint server. Without sharing username/pwd, earlier we allow several users to access this console application by providing remote desktop file (.rdp) file. This .rdp file (ver5.1) contains username and encrypted password. With recent version 6.0 of .rdp, it still prompts for password. You may argue that it is due to security constraint.

What is the best approach to allow more users to run this console application without sharing user credentials, without modifying the console application.

Thanks in advance


J Justin


How to prevent running or executing of an application when it is already executing.


Folks, How to prevent a 2nd run or execution of an application when it is already executing.

Thank you

Session Timeout in WPF browser application


Hi All,

I have to design a web browser application in WPF with a session timeout facility. The requirement to provide a session timeout after 1 hours. How can this be achieved? Also i need to implement login based menu access levels in this application. How can i achieve both these?


Executing a SSIS pkg from a stored procedure



I have a SSIS 2005 pkg and I want to launch it into a loop inside a stored procedure in SQL Server 2005.

Is it possible, please? How? Many thanks

Executing CLR stored procedure


I have two CLR procedures with that consume web services. The assembly is set to Unsafe and also has trustworthy ON on the database. But when I try to execute the procedure I get following error:


Msg 10314, Level 16, State 11, Line 4

An error occurred in the Microsoft .NET Framework while trying to load assembly id 65539. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error: 

System.IO.FileLoadException: Could not load file or assembly 'hbfclrprocs, Version=, Culture=neutral, PublicKeyToken=8a327fb4d6c336b8' or one of its dependencies. An error relating to security occurred. (Exception from HRESULT: 0x8013150A)


   at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)

   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)

   at System.Reflection.Assembly.InternalLoad(Strin

Not working a stored procedure executing in vb net instead of running it via sqlcmd


I created a tored procedure which runs perfect using sqlcmd command, it works also using "Step Into stored procedure" from sserver explorer using Visual studio net. But when i execute this procedure using "ExecuteNonQuery" it doesn't work. Does anyone has any idea why is that?

Thanks for help


Microsoft's Collaborative Application Markup Language (CAML) Loop

discovered an interesting error recently while working with Microsoft's Collaborative Application Markup Language (CAML) that, surprisingly, had received no ink. Partly what surprises me about this is that the error may require you to rewrite large sections of your code if you haven't previously considered this SharePoint limitation. I'll start with some context, but first of all the error is:

Integrating a Legacy Web Application in SharePoint

This month we will continue with the theme of deploying Microsoft's SharePoint as a company intranet by describing a method for integrating a legacy Web application inside a SharePoint site.

In many companies the intranet site is not just a home page with announcements. It houses Web applications used by many different departments. In last month's article, I built a page to search the employee table in Northwind (the sample database included in Microsoft's SQL Server). This month, I will move the Web pages used to add/remove records from the table into the SharePoint intranet.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend