Skip to content

Commit 835fe0a

Browse files
author
Sergey Kanzhelev
committed
initial commit
0 parents  commit 835fe0a

File tree

12 files changed

+532
-0
lines changed

12 files changed

+532
-0
lines changed

.gitignore

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
obj/
2+
bin/
3+
_ReSharper.*
4+
*.csproj.user
5+
*.resharper.user
6+
*.resharper
7+
*.suo
8+
*.cache
9+
*~
10+
*.swp
11+
*.resharper.user
12+
*.rptproj.user
13+
*.db
14+
*.ncrunchsolution
15+
*.ncrunchproject
16+
*.user
17+
*.log
18+
/Glimpse.All.crunchsolution.local.xml
19+
/TestResult.xml
20+
/builds/local/
21+
*.dotCover
22+
/source/Glimpse.WebForms.WingTip.Sample/App_Data/ErrorLog.txt
23+
/source/Glimpse.Mvc3.MusicStore.Sample/App_Data/ASPNETDB.MDF
24+
/source/Glimpse.Mvc3.MusicStore.Sample/App_Data/ASPNETDB_log.ldf
25+
/source/Glimpse.Mvc3.MusicStore.Sample/App_Data/MvcMusicStore.sdf
26+
/Packages.dgml
27+
/packages
28+
/.nuget/NuGet.Config
29+
TestResults
30+
/*.DotSettings.user
31+
*.DotSettings
32+
*.shfbproj_*
33+
working/
34+
Help/
35+
/source/Glimpse.WebForms.WingTip.Sample/App_Data/wingtiptoys.mdf
36+
/source/Glimpse.WebForms.WingTip.Sample/App_Data/wingtiptoys_log.ldf
37+
/source/Glimpse.WebForms.WingTip.Sample/App_Data/ErrorLog.txt
38+
39+
/source/Glimpse.Core.Net45/NuSpec/lib/net45/Glimpse.Core.dll
40+
41+
/source/Glimpse.Core.Net45/NuSpec/lib/net45/Glimpse.Core.pdb
42+
/source/Glimpse.AspNet.Net45/NuSpec/lib/net45/Glimpse.AspNet.dll
43+
44+
/source/Glimpse.AspNet.Net45/NuSpec/lib/net45/Glimpse.AspNet.pdb
45+
46+
/source/Glimpse.Mvc4.MusicStore.Sample/App_Data/ASPNETDB.MDF
47+
48+
/source/Glimpse.Mvc4.MusicStore.Sample/App_Data/ASPNETDB_log.ldf
49+
50+
/source/Glimpse.Mvc4.MusicStore.Sample/App_Data/MvcMusicStore.mdf
51+
52+
/source/Glimpse.Mvc4.MusicStore.Sample/App_Data/MvcMusicStore_log.ldf
53+
54+
csx/
55+
/.vs

App_Readme/Elmah.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
A new HTTP handler has been configured in your application for consulting the
2+
error log and its feeds. It is reachable at elmah.axd under your application
3+
root. If, for example, your application is deployed at http://www.example.com,
4+
the URL for ELMAH would be http://www.example.com/elmah.axd. You can, of
5+
course, change this path in your application's configuration file.
6+
7+
ELMAH is also set up to be secure such that it can only be accessed locally.
8+
You can enable remote access but then it is paramount that you secure access
9+
to authorized users or/and roles only. This can be done using standard
10+
authorization rules and configuration already built into ASP.NET. For more
11+
information, see http://code.google.com/p/elmah/wiki/SecuringErrorLogPages on
12+
the project site.
13+
14+
Please review the commented out authorization section under
15+
<location path="elmah.axd"> and make the appropriate changes.

DataServices/Packages.svc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+

2+
3+
<%@ ServiceHost Language="C#" Factory="System.Data.Services.DataServiceHostFactory, System.Data.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Service="NuGet.Server.DataServices.Packages" %>

DataServices/Routes.cs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
using System.Data.Services;
2+
using System.ServiceModel.Activation;
3+
using System.Web.Routing;
4+
using Ninject;
5+
using NuGet.Server;
6+
using NuGet.Server.DataServices;
7+
using NuGet.Server.Infrastructure;
8+
using RouteMagic;
9+
10+
[assembly: WebActivatorEx.PreApplicationStartMethod(typeof(PrivyFeed.NuGetRoutes), "Start")]
11+
12+
namespace PrivyFeed {
13+
public static class NuGetRoutes {
14+
public static void Start() {
15+
MapRoutes(RouteTable.Routes);
16+
}
17+
18+
private static void MapRoutes(RouteCollection routes) {
19+
// The default route is http://{root}/nuget/Packages
20+
var factory = new DataServiceHostFactory();
21+
var serviceRoute = new ServiceRoute("nuget", factory, typeof(Packages));
22+
serviceRoute.Defaults = new RouteValueDictionary { { "serviceType", "odata" } };
23+
serviceRoute.Constraints = new RouteValueDictionary { { "serviceType", "odata" } };
24+
routes.Add("nuget", serviceRoute);
25+
}
26+
27+
private static PackageService CreatePackageService() {
28+
return NinjectBootstrapper.Kernel.Get<PackageService>();
29+
}
30+
}
31+
}

Default.aspx

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<%@ Page Language="C#" %>
2+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3+
4+
<html xmlns="http://www.w3.org/1999/xhtml">
5+
<head id="Head1" runat="server">
6+
<title>NuGet Private Repository</title>
7+
<style>
8+
body { font-family: Calibri; }
9+
</style>
10+
</head>
11+
<body>
12+
<div>
13+
<h2>You are running NuGet.Server v<%= typeof(NuGet.Server.DataServices.Package).Assembly.GetName().Version %></h2>
14+
<p>
15+
Click <a href="<%= VirtualPathUtility.ToAbsolute("~/nuget/Packages") %>">here</a> to view your packages.
16+
</p>
17+
<fieldset style="width:800px">
18+
<legend><strong>Repository URLs</strong></legend>
19+
In the package manager settings, add the following URL to the list of
20+
Package Sources:
21+
<blockquote>
22+
<strong><%= Helpers.GetRepositoryUrl(Request.Url, Request.ApplicationPath) %></strong>
23+
</blockquote>
24+
<% if (String.IsNullOrEmpty(ConfigurationManager.AppSettings["apiKey"])) { %>
25+
To enable pushing packages to this feed using the nuget command line tool (nuget.exe). Set the api key appSetting in web.config.
26+
<% } %>
27+
<% else { %>
28+
Use the command below to push packages to this feed using the nuget command line tool (nuget.exe).
29+
<% } %>
30+
<blockquote>
31+
<strong>nuget push {package file} -s <%= Helpers.GetPushUrl(Request.Url, Request.ApplicationPath) %> {apikey}</strong>
32+
</blockquote>
33+
</fieldset>
34+
35+
<% if (Request.IsLocal) { %>
36+
<p style="font-size:1.1em">
37+
To add packages to the feed put package files (.nupkg files) in the folder "<% = NuGet.Server.Infrastructure.PackageUtility.PackagePhysicalPath%>".
38+
</p>
39+
<% } %>
40+
</div>
41+
</body>
42+
</html>

PrivyFeed.csproj

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
4+
<Import Project="..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props')" />
5+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
6+
<PropertyGroup>
7+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9+
<ProductVersion>
10+
</ProductVersion>
11+
<SchemaVersion>2.0</SchemaVersion>
12+
<ProjectGuid>{E3528EA3-BF1A-4F12-88EE-AFE8C8FB6EFB}</ProjectGuid>
13+
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
14+
<OutputType>Library</OutputType>
15+
<AppDesignerFolder>Properties</AppDesignerFolder>
16+
<RootNamespace>PrivyFeed</RootNamespace>
17+
<AssemblyName>PrivyFeed</AssemblyName>
18+
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
19+
<UseIISExpress>true</UseIISExpress>
20+
<IISExpressSSLPort />
21+
<IISExpressAnonymousAuthentication />
22+
<IISExpressWindowsAuthentication />
23+
<IISExpressUseClassicPipelineMode />
24+
<UseGlobalApplicationHostFile />
25+
<NuGetPackageImportStamp>
26+
</NuGetPackageImportStamp>
27+
</PropertyGroup>
28+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
29+
<DebugSymbols>true</DebugSymbols>
30+
<DebugType>full</DebugType>
31+
<Optimize>false</Optimize>
32+
<OutputPath>bin\</OutputPath>
33+
<DefineConstants>DEBUG;TRACE</DefineConstants>
34+
<ErrorReport>prompt</ErrorReport>
35+
<WarningLevel>4</WarningLevel>
36+
</PropertyGroup>
37+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
38+
<DebugType>pdbonly</DebugType>
39+
<Optimize>true</Optimize>
40+
<OutputPath>bin\</OutputPath>
41+
<DefineConstants>TRACE</DefineConstants>
42+
<ErrorReport>prompt</ErrorReport>
43+
<WarningLevel>4</WarningLevel>
44+
</PropertyGroup>
45+
<ItemGroup>
46+
<Reference Include="Elmah, Version=1.2.14706.0, Culture=neutral, processorArchitecture=MSIL">
47+
<HintPath>..\packages\elmah.corelibrary.1.2.2\lib\Elmah.dll</HintPath>
48+
<Private>True</Private>
49+
</Reference>
50+
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
51+
<HintPath>..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
52+
<Private>True</Private>
53+
</Reference>
54+
<Reference Include="Microsoft.CSharp" />
55+
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
56+
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
57+
<Private>True</Private>
58+
</Reference>
59+
<Reference Include="Microsoft.Web.XmlTransform, Version=2.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
60+
<HintPath>..\packages\Microsoft.Web.Xdt.2.1.1\lib\net40\Microsoft.Web.XmlTransform.dll</HintPath>
61+
<Private>True</Private>
62+
</Reference>
63+
<Reference Include="Ninject, Version=3.0.0.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL">
64+
<HintPath>..\packages\Ninject.3.0.1.10\lib\net45-full\Ninject.dll</HintPath>
65+
<Private>True</Private>
66+
</Reference>
67+
<Reference Include="NuGet.Core, Version=2.8.60717.93, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
68+
<HintPath>..\packages\NuGet.Core.2.8.6\lib\net40-Client\NuGet.Core.dll</HintPath>
69+
<Private>True</Private>
70+
</Reference>
71+
<Reference Include="NuGet.Server, Version=2.8.60717.93, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
72+
<HintPath>..\packages\NuGet.Server.2.8.6\lib\net45\NuGet.Server.dll</HintPath>
73+
<Private>True</Private>
74+
</Reference>
75+
<Reference Include="RouteMagic, Version=1.2.0.0, Culture=neutral, PublicKeyToken=84b59be021aa4cee, processorArchitecture=MSIL">
76+
<HintPath>..\packages\RouteMagic.1.2\lib\net40\RouteMagic.dll</HintPath>
77+
<Private>True</Private>
78+
</Reference>
79+
<Reference Include="System.Data.Services" />
80+
<Reference Include="System.ServiceModel" />
81+
<Reference Include="System.ServiceModel.Activation" />
82+
<Reference Include="System.ServiceModel.Web" />
83+
<Reference Include="System.Web.DynamicData" />
84+
<Reference Include="System.Web.Entity" />
85+
<Reference Include="System.Web.ApplicationServices" />
86+
<Reference Include="System.ComponentModel.DataAnnotations" />
87+
<Reference Include="System" />
88+
<Reference Include="System.Data" />
89+
<Reference Include="System.Core" />
90+
<Reference Include="System.Data.DataSetExtensions" />
91+
<Reference Include="System.Web.Extensions" />
92+
<Reference Include="System.Xml.Linq" />
93+
<Reference Include="System.Drawing" />
94+
<Reference Include="System.Web" />
95+
<Reference Include="System.Xml" />
96+
<Reference Include="System.Configuration" />
97+
<Reference Include="System.Web.Services" />
98+
<Reference Include="System.EnterpriseServices" />
99+
<Reference Include="WebActivatorEx, Version=2.0.0.0, Culture=neutral, PublicKeyToken=7b26dc2a43f6a0d4, processorArchitecture=MSIL">
100+
<HintPath>..\packages\WebActivatorEx.2.0.2\lib\net40\WebActivatorEx.dll</HintPath>
101+
<Private>True</Private>
102+
</Reference>
103+
</ItemGroup>
104+
<ItemGroup>
105+
<Content Include="packages.config" />
106+
<None Include="Web.Debug.config">
107+
<DependentUpon>Web.config</DependentUpon>
108+
</None>
109+
<None Include="Web.Release.config">
110+
<DependentUpon>Web.config</DependentUpon>
111+
</None>
112+
</ItemGroup>
113+
<ItemGroup>
114+
<Content Include="App_Readme\Elmah.txt" />
115+
<Content Include="DataServices\Packages.svc" />
116+
<Content Include="Default.aspx" />
117+
<Content Include="favicon.ico" />
118+
<Content Include="Packages\Readme.txt" />
119+
<Content Include="Web.config" />
120+
</ItemGroup>
121+
<ItemGroup>
122+
<Compile Include="DataServices\Routes.cs" />
123+
<Compile Include="Properties\AssemblyInfo.cs" />
124+
</ItemGroup>
125+
<PropertyGroup>
126+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
127+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
128+
</PropertyGroup>
129+
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
130+
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
131+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
132+
<ProjectExtensions>
133+
<VisualStudio>
134+
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
135+
<WebProjectProperties>
136+
<UseIIS>True</UseIIS>
137+
<AutoAssignPort>True</AutoAssignPort>
138+
<DevelopmentServerPort>31528</DevelopmentServerPort>
139+
<DevelopmentServerVPath>/</DevelopmentServerVPath>
140+
<IISUrl>http://localhost:31250/</IISUrl>
141+
<NTLMAuthentication>False</NTLMAuthentication>
142+
<UseCustomServer>False</UseCustomServer>
143+
<CustomServerUrl>
144+
</CustomServerUrl>
145+
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
146+
</WebProjectProperties>
147+
</FlavorProperties>
148+
</VisualStudio>
149+
</ProjectExtensions>
150+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
151+
<PropertyGroup>
152+
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
153+
</PropertyGroup>
154+
<Error Condition="!Exists('..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props'))" />
155+
<Error Condition="!Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
156+
</Target>
157+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
158+
Other similar extension points exist, see Microsoft.Common.targets.
159+
<Target Name="BeforeBuild">
160+
</Target>
161+
<Target Name="AfterBuild">
162+
</Target>
163+
-->
164+
</Project>

Properties/AssemblyInfo.cs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("PrivyFeed")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("PrivyFeed")]
13+
[assembly: AssemblyCopyright("Copyright © 2015")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("e3528ea3-bf1a-4f12-88ee-afe8c8fb6efb")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Revision and Build Numbers
33+
// by using the '*' as shown below:
34+
[assembly: AssemblyVersion("1.0.0.0")]
35+
[assembly: AssemblyFileVersion("1.0.0.0")]

Web.Debug.config

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
4+
5+
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
6+
<!--
7+
In the example below, the "SetAttributes" transform will change the value of
8+
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
9+
finds an attribute "name" that has a value of "MyDB".
10+
11+
<connectionStrings>
12+
<add name="MyDB"
13+
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
14+
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
15+
</connectionStrings>
16+
-->
17+
<system.web>
18+
<!--
19+
In the example below, the "Replace" transform will replace the entire
20+
<customErrors> section of your web.config file.
21+
Note that because there is only one customErrors section under the
22+
<system.web> node, there is no need to use the "xdt:Locator" attribute.
23+
24+
<customErrors defaultRedirect="GenericError.htm"
25+
mode="RemoteOnly" xdt:Transform="Replace">
26+
<error statusCode="500" redirect="InternalError.htm"/>
27+
</customErrors>
28+
-->
29+
</system.web>
30+
</configuration>

0 commit comments

Comments
 (0)