Application does no longer see the SQL stored procedures

Posted on 2008-11-12
Last Modified: 2013-12-17
I support the C# 2008 web application, SQL 2005. The web service uses the service account to talk to the database. Suddenly, literally overnight,  we started getting  the error : "Exception Message: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidOperationException: The stored procedure 'XXXX' doesn't exist."  launching the app. It can't find any of the stored procs, even though they exist in the database and the service account role's permissions haven't changed (from what we were told). It doesn't have the db_owner  authority but whatever access was given has always worked before. The problem occurs in all  environments including my local. When I debug it fails at the function below, line : parameterCache.SetParameters(objdbCommand, objDatabase);

public static void DiscoverSpInputParameters(SqlDatabase objDatabase, DbCommand objdbCommand)


parameterCache.SetParameters(objdbCommand, objDatabase);

foreach (DbParameter param in objdbCommand.Parameters)


if (param.Direction == ParameterDirection.ReturnValue)







It's a puzzle, since nothing was changed on the developer's side, the function has worked for years, first in VS 2005. My feeling is that something got changed on the  SQL server/database side  but our DBA's say that nothing was changed. Any input/suggestions/ideas would be greately appreciated!


Question by:ginabro
    LVL 13

    Expert Comment

    This definately sounds like a permissions related issue.

    What authentication method are you using to connect to the database? Can you verrify it from another machine? Are your stored procedures using the dbo schema or are they MySchema.MyProcedure?

    I would talk with your DBA's a bit more and ask them about the permissions...

    LVL 60

    Expert Comment

    Sounds to me like your connection string is connecting to the wrong database.

    Author Comment


    We use trusted connection to the database. The app was developed without specifying the schema. I took over the app recently and plan on adding the dbo.XXX schema to call the procs. However, not having any schema never caused any issues before. I tried adding the schema to one of the procs while troubleshooting, unfortunatel with no success.

    I confirmed that the connection string in the web.config points to the right db.

    LVL 13

    Accepted Solution

    Ask your DBA's to setup a Profile trace on the server and monitor what happens when you application attempts to connect. That will give you a better idea of which direction to point in.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
    In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now