Skip to content

Commit 8accd3c

Browse files
authored
Merge pull request #10194 from NuGet/main
FI main to dev
2 parents fdd29e1 + 3a18689 commit 8accd3c

2 files changed

Lines changed: 23 additions & 2 deletions

File tree

src/NuGet.Services.Sql/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# NuGet.Services.Sql
2+
3+
A library that provides support for using Entra ID apps for generating tokens for authenticating SQL connections.
4+
Authenticating to Entra ID app is done using certificates, which are automatically refreshed from key vault.
5+
The tokens provided by Entra ID App are cached and reused as long as `AzureSqlConnectionFactory` instance is kept
6+
alive and reused for creating SQL connections.
7+
8+
## Caveats
9+
10+
When used in ASP.NET/ASP.NET Core app in an Azure app service attempts to retrieve a token from Entra ID app might
11+
fail with
12+
13+
> Failed to acquire access token for <DB name>.
14+
15+
With inner exception message:
16+
17+
> The system cannot find the file specified.
18+
19+
thrown by `X509Certificate2` constructor.
20+
21+
This can be worked around by [setting](https://stackoverflow.com/a/62790919) `WEBSITE_LOAD_USER_PROFILE=1` variable for the app service.

src/NuGetGallery/Views/Shared/Gallery/Layout.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
@ViewHelpers.ReleaseMeta()
6464
@ViewHelpers.InstrumentationScript(ViewBag)
6565
</head>
66-
<body id=@Url.Current()>
66+
<body @{if (Request.Url.GetComponents(UriComponents.Path, UriFormat.UriEscaped) == "") { <text>id="/"</text> } }>
6767
@Html.Partial("Gallery/Header")
6868
<div id="skippedToContent">
6969
@RenderBody()
@@ -73,4 +73,4 @@
7373
@Scripts.Render("~/Scripts/gallery/site.min.js")
7474
@RenderSection("BottomScripts", required: false)
7575
</body>
76-
</html>
76+
</html>

0 commit comments

Comments
 (0)