Azure Cosmos DB Git hub sample EcommerceWebApp it is not working

manish verma 461 Reputation points
2022-02-02T12:05:25.697+00:00

Hi All,

we are using sample github sample -https://github.com/Azure-Samples/azure-cosmos-db-change-feed-dotnet-retail-sample

in this sample we have one application -EcommerceWebApp it is not working.

in Code it will beak in below if condition

if (!roleMgr.RoleExists("canEdit"))

{

idRoleResult = roleMgr.Create(new IdentityRole { Name = "canEdit" });
}

Error message-

System.Data.SqlClient.SqlException: '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

We really appreciate any help to run this program

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,671 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. GeethaThatipatri-MSFT 29,477 Reputation points Microsoft Employee
    2022-02-02T19:38:14.73+00:00

    Hi @manish verma Thanks for posting your query in Microsoft Q&A
    I understand that you are using the sample GitHub code and you are facing a connection issue.
    The exception message seems that there's no SQL server for it to connect to, or the instance is not accessible over the network.
    can you please check the connection and give it a try.

    Regards
    Geetha

    1 person found this answer helpful.

  2. manish verma 461 Reputation points
    2022-02-15T07:42:44.753+00:00

    thanks.

    it is working once sql connection is given


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.