none
entityframework error RRS feed

  • Question

  • I am clueless about the following error.

    Error:
    {"EXECUTE permission denied on object 'sp_sdidebug', database 'master', owner 'dbo'."}
    "The underlying provider failed on Open."

    I am getting the above error when executing the following method from a particular page (where i need to call the method from a nested update panel), otherwise the method works fine, and i have nothing to do with 'sp_sdidebug' of master database....my application database is "ETGJewellry",  

    can anyone explain men what could be the reason ?

    public tbDesign GetDesignById(long designId)
            {
                tbDesign design = null;
                using (ETGJewelryEntities context = new ETGJewelryEntities())
                {
                    design = context.tbDesign
                        .Where(d => d.DesignId == designId)
                          .FirstOrDefault<tbDesign>();
                }

                return design;
            }


    Thanks Arindam Chakraborty .Net Designer & Developer. Mumbai, India.

    • Moved by edhickey Monday, June 13, 2011 3:05 PM (From:.NET 3.0/3.5 Windows Workflow Foundation)
    Sunday, June 12, 2011 8:10 AM

Answers

  • Hello Arindam.

    Thanks for your post.

    What's happening is that VS is automatically assuming you want to debug any store procs you might have, which requires the use of the sp_sdidebug, but of course you aren't trying to do that, so you have to turn it off. 

    To do this, please follow the steps as below:

    1. Open your project in VS.
    2. Click on the “Debug” menu and click on the “Attach to Process…” menu option. Then in the dialog box choose “aspnet_wp.exe” process and click on the “Select…” button at the top.

    3. You will get the “Select Code Type” dialog with the “Automatically determine the type of code to debug” selected. Instead choose the “Debug these code types” option and then choose the “Managed” checkbox.

    4. Try to recreate the problem again and I hope it works this time without the “EXECUTE permission denied on object ’sp_sdidebug’, database ‘master’, owner ‘dbo’.” error.

    Hope this can help you. I think you will be interested in this article: http://www.mockte.com/rewrite.php/read-49.html

     

    have a nice day,


    Jackie Sun [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.



    Tuesday, June 14, 2011 7:05 AM
    Moderator

All replies

  • Hello Arindam.

    Thanks for your post.

    What's happening is that VS is automatically assuming you want to debug any store procs you might have, which requires the use of the sp_sdidebug, but of course you aren't trying to do that, so you have to turn it off. 

    To do this, please follow the steps as below:

    1. Open your project in VS.
    2. Click on the “Debug” menu and click on the “Attach to Process…” menu option. Then in the dialog box choose “aspnet_wp.exe” process and click on the “Select…” button at the top.

    3. You will get the “Select Code Type” dialog with the “Automatically determine the type of code to debug” selected. Instead choose the “Debug these code types” option and then choose the “Managed” checkbox.

    4. Try to recreate the problem again and I hope it works this time without the “EXECUTE permission denied on object ’sp_sdidebug’, database ‘master’, owner ‘dbo’.” error.

    Hope this can help you. I think you will be interested in this article: http://www.mockte.com/rewrite.php/read-49.html

     

    have a nice day,


    Jackie Sun [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.



    Tuesday, June 14, 2011 7:05 AM
    Moderator
  • Thanks a lot Jackie ,

    It resolved my problem.

    But i am not able to understand the following two point about the behaviour of the error.

    1. why do i specially need to indicate the "Debug type" as "Managed" code only for this method,why other method works fine without doing that ? whats the logic behind it?

    2. the same method when i call starightly it works fine, but when i call from a event occuring inside a update panel this error occure. so what's reason ?

    If you can explain me the behaviour that will be really helpful, and interesting.

    Thanks a lot for your help.

     

     


    Thanks Arindam Chakraborty .Net Designer & Developer. Mumbai, India.
    Friday, June 17, 2011 7:06 AM