.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

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

Posted By:      Posted Date: October 25, 2010    Points: 0   Category :.NET Framework

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

Thank you

View Complete Post

More Related Resource Links

Procedure timeout when executing from the ASP.NET application

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 

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


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.

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


On page loading or executing all CSS flags are ignored and website is plain without formatting


 My problem is whenever i execute my app the first page that loads is the login page pointed to by my web.config file forms authentication, this page is meant to show CSS formatting for the info i am displaying but it is not. Any help with this problem would be great. A cut and paste of my problem is shown below as you can see there is no CSS.

jsfdnjldfngjfg here it is

Account Login
User Id:
Forgot Password?

I have inserted all the link as in:




Item cannot be found.(rsItemNotFound) when executing a report from a sharepoint Website

I have managed to integrate Report server with Sharepoint .
I created a report with it's data connection with microsoft Visual Studio 2005 , tested it , than deployed it to the specified document libraries in sharepoint.
Everything works fine till now.But when i try to execute the report from the document library in sharepoint the Message :
  • The item 'Reports/Report1.rdl' cannot be found. (rsItemNotFound) '. Even though the report1.rdl is inside the website and is returned when i do the search. Regards.

  • 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?



    Executing Command Logic in a View Model

    Through the use of the Windows Presentation Foundation's (WPF) advanced data-binding capabilities, the logical structure of a user interface can relatively easily be disconnected from its presentation. Bindable components can now contain nearly all of an application's user interface logic and in most circumstances, replace the need for controller objects from the classic Model-View-Controller (MVC) pattern. So it's no wonder that a new pattern for UI design has appeared

    Video: SharePoint 2010: Executing Code in the Sandbox

    Find out how the Sandboxed Solutions Service provides for a complete isolation system that ensures code running in a sandboxed solution cannot reach out to access information beyond the scope of the deployment. (Length: 12:01)

    One or more types failed to load - While creating a web application as well as running psconfig wiza



    I got this error while i was trying to create a web application - 'One or more types failed to load'. So i tried to run psconfig and got the same error.

    My Spec

    Windows Server 2008 R2 x64

    SharePoint Server 2007 x64 with MOSS SP1, MOSS SP2, WSS SP1 and WSS SP2

    Microsoft Office Professional 2010 x64

    Microsoft SQL Server 2005


    And, here is the complete error -


    Log Name:      Application
    Source:        SharePoint Products and Technologies Configuration Wizard
    Date:          8/27/2010 3:30:28 PM
    Event ID:      104
    Task Category: None
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      ZBDEV22.zenbridge.com
    Failed to register SharePoint services.
    An exception of type Microsoft.SharePoint.Upgrade.SPUpgradeException was thrown.  Additional exception information: One or more types failed to load. Please refer to the upgrade log for more details.
    Microsoft.SharePoint.Upgrade.SPUpgradeException: One or more types failed to load. Pleas

    Case statement is never executing


    Can some please advise as to why the case statement is never running


    Imports Microsoft.VisualBasic
    Imports AjaxControlToolkit
    Public Class MultilevelAccordion
        Inherits System.Web.UI.UserControl
        Implements System.Web.UI.ITemplate
        Dim templateType As AccordionItemType
        Sub New(ByVal type As AccordionItemType)
            templateType = type
        End Sub
        Sub New()
        End Sub
        Public Sub InstantiateIn(ByVal container As System.Web.UI.Control) _
              Implements System.Web.UI.ITemplate.InstantiateIn
            Dim ph As New PlaceHolder()
            Select Case (templateType)
                Case AccordionItemType.Header
                    Dim myLabel As Label = New Label()
                    myLabel.ID = "HeaderLabel"
                    AddHandler ph.DataBinding, New EventHandler(AddressOf Item_DataBinding)
                Case AccordionItemType.Content
                    AddHandler ph.DataBinding, New EventHandler(AddressOf Item_DataBinding)
            End Select
        End Sub
        Shared Sub Item_DataBinding(ByVal sender As Object, ByVal e As AccordionItemEventArgs)
            Dim ph As PlaceHolder = CType(sender, PlaceHolder)
            Dim headerValue As String = _

    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.

    Trouble executing ASP.NET app on 64-bit server

    Hi,I have an asp.net webapp that uses some unmanaged code and 3rd party pre-compiled libraries that I am pretty sure are 32-bit.  We developed this on a 32-bit machine with a 32-bit development windows server.  Now we are moving our web site to production where the box has Windows Server 2003 64-bit.  I was getting W3SCV errors about the framework at first:http://s18.photobucket.com/albums/b116/dtdono0/DOTNET/ISAPI_002.jpg I followed the instructions on this blog that talks about enabling the 32-bit version of ASP.NET: http://support.microsoft.com/kb/894435Now I get a new error and I cannot find any documentation on it.  http://s18.photobucket.com/albums/b116/dtdono0/DOTNET/ISAPI_001.jpgI looked up the error code 0x000000c1 and got the following:C:\Err>err 000000c1# for hex 0xc1 / decimal 193 :  SPECIAL_POOL_DETECTED_MEMORY_CORRUPTION                       bugcodes.h  SQL_193_severity_15                                           sql_err# The object or column name starting with '%.*ls' is too# long. The maximum length is %d characters.  ERROR_BAD_EXE_FORMAT                                          winerror.h# %1 is not a valid Win32 application.# 3 matches found for "000000c1"This really doesn't tell me much.  Any ideas?

    Error on executing VB file : The assembly does not allow partially trusted callers

    Dear All ! Though there are many posts stated with solutions, im still facing the error in my application. I have created a VB Class Library project in VS 2008 which on execution in another application (ERP) will open a VB form holding a report. Its working fine in Server machine. The report is drawn from a DB placed on another server. Everything works fine in Server. But in another machine its not.  I did opened the project from the local machine, Build it so tht the dll be caught in the ERP application and so it did, iam able to see the dll within the application. but on execution its throwing the error 'The Call to member failed. The assembly does not allow partially trusted callers ' What should i do in order to execute the project in all local machines application ??   Thanks in Advance... waiting for a solution.. Radhai.  

    Error while executing a package through SQL Server Agent

    Hi All,   I have a ssis package. It has 3 tasks, first task updates a record in Oracle database to set an Indicator to “Y”, second task process SSAS Cube and the third again updates the same record and sets the indicator to “N”. This package has 2 data sources, one is Oracle and the other is Analysis Services. I gave the credentials for the Oracle and use NT Authority for Analysis services.   When I am executing from BIDS package is executing successfully. But when I am calling the job to execute this package its throwing me the error. Below is the error.     Message Executed as user: User\Username. ...ion 9.00.4035.00 for 64-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    Started:  10:57:46 AM  Error: 2010-08-27 10:57:46.79     Code: 0xC0016016     Source:       Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.  End Error  Error: 2010-08-27 10:57:47.16     Code: 0xC0202009     Source: Ord_test Connection manager &q

    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

    How to keep my Workflow alive only during the time my client application is running ?

    Hi, I want to my workflow do some action when server  lose connection with client and at the same time client get exceptions about it. It is possible to implement some session mechanism or something like that with workflow service ? Regards Marcin
    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