Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
118 changed files
with
1,650 additions
and
1,071 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System.Data.Entity; | ||
using System.Data.Entity.Infrastructure; | ||
using System.Data.Entity.SqlServer; | ||
using System.Runtime.Remoting.Messaging; | ||
|
||
namespace NuGetGallery | ||
{ | ||
public class EntitiesConfiguration | ||
: DbConfiguration | ||
{ | ||
public EntitiesConfiguration() | ||
{ | ||
// Configure Connection Resiliency / Retry Logic | ||
// See https://msdn.microsoft.com/en-us/data/dn456835.aspx and msdn.microsoft.com/en-us/data/dn307226 | ||
SetExecutionStrategy("System.Data.SqlClient", () => SuspendExecutionStrategy | ||
? (IDbExecutionStrategy)new DefaultExecutionStrategy() : new SqlAzureExecutionStrategy()); | ||
} | ||
|
||
public static bool SuspendExecutionStrategy | ||
{ | ||
get | ||
{ | ||
return (bool?)CallContext.LogicalGetData("SuspendExecutionStrategy") ?? false; | ||
} | ||
set | ||
{ | ||
CallContext.LogicalSetData("SuspendExecutionStrategy", value); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 0 additions & 11 deletions
11
src/NuGetGallery.Operations/Tasks/HandleFailedPackageEditsTask.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/NuGetGallery/Areas/Admin/DynamicData/Content/Images/web.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
The purpose of this file is to block access to the template files, that are not meant | ||
to be directly requested. | ||
--> | ||
<configuration> | ||
<system.web> | ||
<httpHandlers> | ||
<clear /> | ||
</httpHandlers> | ||
</system.web> | ||
|
||
<system.webServer> | ||
<validation validateIntegratedModeConfiguration="false"/> | ||
<handlers> | ||
<clear /> | ||
<add | ||
name="StaticFile" | ||
path="*" verb="*" | ||
modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" | ||
resourceType="Either" | ||
requireAccess="Read" /> | ||
</handlers> | ||
</system.webServer> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 10 additions & 10 deletions
20
src/NuGetGallery/Areas/Admin/DynamicData/EntityTemplates/Default.ascx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
<%@ Control Language="C#" CodeBehind="Default.ascx.cs" Inherits="NuGetGallery.Areas.Admin.DynamicData.DefaultEntityTemplate" %> | ||
<%@ Control Language="C#" CodeBehind="Default.ascx.cs" Inherits="NuGetGallery.DefaultEntityTemplate" %> | ||
|
||
<asp:EntityTemplate runat="server" ID="EntityTemplate1"> | ||
<ItemTemplate> | ||
<tr class="td"> | ||
<td class="DDLightHeader"> | ||
<asp:Label runat="server" OnInit="Label_Init" /> | ||
</td> | ||
<td> | ||
<asp:DynamicControl runat="server" OnInit="DynamicControl_Init" /> | ||
</td> | ||
</tr> | ||
</ItemTemplate> | ||
<tr class="td"> | ||
<td class="DDLightHeader"> | ||
<asp:Label runat="server" OnInit="Label_Init" /> | ||
</td> | ||
<td> | ||
<asp:DynamicControl runat="server" OnInit="DynamicControl_Init" /> | ||
</td> | ||
</tr> | ||
</ItemTemplate> | ||
</asp:EntityTemplate> | ||
|
Oops, something went wrong.