.net core web api sql error error while profiling

i am trying to profile .net core web api in staging server. I have selected.net core application,selected dll ,add environment variable as required connection  string with Trusted_Connection=True;  and selected browser.

When i click on start profiling browser open with localhost:5000. When i do the soap request /curl request to thiis endpoint (with localhost:5000) profiling happens. But response came with 500 internal error.

When i checked the application log .Its giving sql error. (Sql server in another system/server. )
System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

My question here is i am using trusted connection string. Is it because of any permission isuue.
Which account ants profiler is trying to connect sql server.  Please help me on this?


  • Russell DRussell D Posts: 1,319 Diamond 5
    edited October 1, 2018 1:55PM
    When profiling, we don't actually connect to any database on our own. We instrument methods used to execute queries, intercepting data such as a query, database name and connection string. 

    It merely counts wall clock time for:
    • Time: The time until the first result for the query was returned.
      The time it took the call to execute on the server isn't recorded. This means that no time data is available for SQL calls in CPU time mode.
    • Time With Children: The total execution time for the call and all its children within this stack trace.
    • Hit Count: The number of times the query was called within this stack trace.
    Have you visited our Help Centre?
  • chitchatchitchat Posts: 17 New member
    the .net code is one system and sql is another server. While profiling i am getting access denied error.
    NET CORE api profiling
    1. Select the start up dll
    2. add environment variable (connection string trusted one)
    3.Select browser 
    4.start profiling 
    5. Browser open with localhost:5000
    6. profilier showed profiling started  
    7. Using the same end point in soap execute the post method
    8. Profiling  started . In response got 500 internal error
    9. When i checked application log it says access denied.

    please suggest...?do i need specific access for my id in sql db?
Sign In or Register to comment.