microsoft / Partner-Center-Storefront

A storefront that enables reseller partners to onboard customers and place orders for these customers.
MIT License
20 stars 55 forks source link

Connection String: [No connection string specified] #27

Open endritm00 opened 4 years ago

endritm00 commented 4 years ago

Connection String: [No connection string specified], Resource: https://vault.azure.net, Authority: https://login.windows.net/8430550f-01d2-4dd8-a579-cfc7679facd9. Exception Message: Tried the following 4 methods to get an access token, but none of them worked. Parameters: Connection String: [No connection string specified], Resource: https://vault.azure.net, Authority: https://login.windows.net/8430550f-01d2-4dd8-a579-cfc7679facd9. Exception Message: Tried to get token using Managed Service Identity. Access token could not be acquired. An error occurred while sending the request. Parameters: Connection String: [No connection string specified], Resource: https://vault.azure.net, Authority: https://login.windows.net/8430550f-01d2-4dd8-a579-cfc7679facd9. Exception Message: Tried to get token using Visual Studio. Access token could not be acquired. Visual Studio Token provider file not found at "D:\local\LocalAppData.IdentityService\AzureServiceAuth\tokenprovider.json" Parameters: Connection String: [No connection string specified], Resource: https://vault.azure.net, Authority: https://login.windows.net/8430550f-01d2-4dd8-a579-cfc7679facd9. Exception Message: Tried to get token using Azure CLI. Access token could not be acquired. 'az' is not recognized as an internal or external command, operable program or batch file.

Parameters:` Connection String: [No connection string specified], Resource: https://vault.azure.net, Authority: https://login.windows.net/8430550f-01d2-4dd8-a579-cfc7679facd9. Exception Message: Tried to get token using Active Directory Integrated Authentication. Access token could not be acquired. Failed to get user name from the operating system.Inner Exception : The format of the specified domain name is invalid

After also having the end-point error like the other guy, I went and coded the end point in the Web.Config add key="webPortal.keyVaultEndpoint" value="https://teststorekey.vault.azure.net/" />

Only this seemed to solve the endpoint issue,but now I am having the connection string error also.

I tried deploying using the Deployment project file, but it also throws some powershell errors such as command not recognized, while I am not writing anything there just letting it run.

ghost commented 4 years ago

It is difficult to say for certain, but I believe this error is caused by the use of managed identity to access the resources. Details on how you can work around this when debugging locally can be found here

cmanasseh commented 4 years ago

I had to change the deployment file from AzureRm to Az commands and it worked.

jasonwlindsay commented 4 years ago

I had to change the deployment file from AzureRm to Az commands and it worked.

Is this an accepted answer to the issue? Is there an Az version of the deploy script that is available?