Skip to content

Commit 870d299

Browse files
committed
Add StarterTemplate projects
1 parent add4b6c commit 870d299

38 files changed

+1600
-2
lines changed

Diff for: build/build.msbuild

+2
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@
55
<MSBuild Projects="../src/ServiceStack.Hello/ServiceStack.Hello.sln" Properties="Configuration=Release"/>
66
<MSBuild Projects="../src/ServiceStack.Northwind/ServiceStack.Northwind.sln" Properties="Configuration=Release"/>
77
<MSBuild Projects="../src/ServiceStack.MovieRest/ServiceStack.MovieRest.sln" Properties="Configuration=Release; Architecture=x86"/>
8+
9+
<MSBuild Projects="../src/ServiceStack.Examples/ServiceStack.Examples.sln" Properties="Configuration=Release"/>
810
</Target>
911
</Project>

Diff for: lib/ServiceStack.Common.dll

0 Bytes
Binary file not shown.

Diff for: lib/ServiceStack.Interfaces.dll

0 Bytes
Binary file not shown.

Diff for: lib/ServiceStack.ServiceInterface.dll

0 Bytes
Binary file not shown.

Diff for: lib/ServiceStack.dll

512 Bytes
Binary file not shown.

Diff for: src/ServiceStack.Hello/Web.config

+5-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<connectionStrings/>
1818

1919

20+
<!-- ServiceStack: Required to host at: /servicestack -->
2021
<location path="servicestack">
2122
<system.web>
2223
<httpHandlers>
@@ -80,7 +81,7 @@
8081
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
8182
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
8283

83-
<!-- Required for MONO -->
84+
<!-- ServiceStack: Required for MONO -->
8485
<add path="servicestack*" type="ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory, ServiceStack" verb="*"/>
8586
</httpHandlers>
8687
<httpModules>
@@ -100,7 +101,10 @@
100101
Information Services 7.0. It is not necessary for previous version of IIS.
101102
-->
102103
<system.webServer>
104+
105+
<!-- ServiceStack: Required -->
103106
<validation validateIntegratedModeConfiguration="false"/>
107+
104108
<modules>
105109
<remove name="ScriptModule"/>
106110
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

Diff for: src/ServiceStack.Hello/default.htm

+4-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
float: right;
126126
padding: 0 20px 20px 0;
127127
}
128-
128+
129129
H3.hr
130130
{
131131
border-top: 1px solid #ccc;
@@ -239,6 +239,9 @@ <h4>The location configuration below hosts your webservices at custom path: <b>/
239239
&lt;add path="servicestack*" type="ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory, ServiceStack" verb="*"/&gt;
240240
&lt;/httpHandlers&gt;
241241
&lt;/system.web&gt;
242+
&lt;system.webServer&gt;
243+
&lt;validation validateIntegratedModeConfiguration="false" /&gt;
244+
&lt;/system.webServer&gt;
242245
</code>
243246
<p>
244247
Note: due to limitations in IIS 6 - the <b>/custompath</b> must end with <b>.ashx</b>, e.g: <b>path="servicestack.ashx"</b>
+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
6+
<ProductVersion>8.0.30703</ProductVersion>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>{79950922-9EFF-44E1-993A-4EA20DEC780A}</ProjectGuid>
9+
<OutputType>Exe</OutputType>
10+
<AppDesignerFolder>Properties</AppDesignerFolder>
11+
<RootNamespace>ConsoleAppHost</RootNamespace>
12+
<AssemblyName>ConsoleAppHost</AssemblyName>
13+
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
14+
<FileAlignment>512</FileAlignment>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
17+
<PlatformTarget>x86</PlatformTarget>
18+
<DebugSymbols>true</DebugSymbols>
19+
<DebugType>full</DebugType>
20+
<Optimize>false</Optimize>
21+
<OutputPath>bin\Debug\</OutputPath>
22+
<DefineConstants>DEBUG;TRACE</DefineConstants>
23+
<ErrorReport>prompt</ErrorReport>
24+
<WarningLevel>4</WarningLevel>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
27+
<PlatformTarget>x86</PlatformTarget>
28+
<DebugType>pdbonly</DebugType>
29+
<Optimize>true</Optimize>
30+
<OutputPath>bin\Release\</OutputPath>
31+
<DefineConstants>TRACE</DefineConstants>
32+
<ErrorReport>prompt</ErrorReport>
33+
<WarningLevel>4</WarningLevel>
34+
</PropertyGroup>
35+
<ItemGroup>
36+
<Reference Include="ServiceStack">
37+
<HintPath>..\..\..\lib\ServiceStack.dll</HintPath>
38+
</Reference>
39+
<Reference Include="System" />
40+
<Reference Include="System.Core" />
41+
<Reference Include="System.Xml.Linq" />
42+
<Reference Include="System.Data.DataSetExtensions" />
43+
<Reference Include="System.Data" />
44+
<Reference Include="System.Xml" />
45+
</ItemGroup>
46+
<ItemGroup>
47+
<Compile Include="Program.cs" />
48+
<Compile Include="Properties\AssemblyInfo.cs" />
49+
</ItemGroup>
50+
<ItemGroup>
51+
<ProjectReference Include="..\StarterTemplates.Common\StarterTemplates.Common.csproj">
52+
<Project>{ACBF3D12-379A-41D7-87DB-C376CFCBD131}</Project>
53+
<Name>StarterTemplates.Common</Name>
54+
</ProjectReference>
55+
</ItemGroup>
56+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
57+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
58+
Other similar extension points exist, see Microsoft.Common.targets.
59+
<Target Name="BeforeBuild">
60+
</Target>
61+
<Target Name="AfterBuild">
62+
</Target>
63+
-->
64+
</Project>

Diff for: src/StarterTemplates/ConsoleAppHost/Program.cs

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using System;
2+
using System.Threading;
3+
using ServiceStack.WebHost.Endpoints;
4+
using StarterTemplates.Common;
5+
6+
namespace ConsoleAppHost
7+
{
8+
class Program
9+
{
10+
private const string ListeningOn = "http://localhost:82/";
11+
12+
static void Main(string[] args)
13+
{
14+
var appHost = new StarterTemplateAppListenerHost(ListeningOn, "ConsoleAppHost");
15+
appHost.Init();
16+
17+
Console.WriteLine("AppHost Created at {0}, listening on {1}",
18+
DateTime.Now, ListeningOn);
19+
20+
21+
Thread.Sleep(Timeout.Infinite);
22+
Console.WriteLine("ReadKey()");
23+
Console.ReadKey();
24+
}
25+
}
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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("ConsoleAppHost")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("ConsoleAppHost")]
13+
[assembly: AssemblyCopyright("Copyright © 2011")]
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("32220ea8-7335-46bc-94cb-db527aa8c091")]
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 Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]
+97
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProductVersion>
7+
</ProductVersion>
8+
<SchemaVersion>2.0</SchemaVersion>
9+
<ProjectGuid>{704AA56B-5343-4796-B6CE-70488AF5B31E}</ProjectGuid>
10+
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
11+
<OutputType>Library</OutputType>
12+
<AppDesignerFolder>Properties</AppDesignerFolder>
13+
<RootNamespace>CustomPath35</RootNamespace>
14+
<AssemblyName>CustomPath35</AssemblyName>
15+
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18+
<DebugSymbols>true</DebugSymbols>
19+
<DebugType>full</DebugType>
20+
<Optimize>false</Optimize>
21+
<OutputPath>bin\</OutputPath>
22+
<DefineConstants>DEBUG;TRACE</DefineConstants>
23+
<ErrorReport>prompt</ErrorReport>
24+
<WarningLevel>4</WarningLevel>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27+
<DebugType>pdbonly</DebugType>
28+
<Optimize>true</Optimize>
29+
<OutputPath>bin\</OutputPath>
30+
<DefineConstants>TRACE</DefineConstants>
31+
<ErrorReport>prompt</ErrorReport>
32+
<WarningLevel>4</WarningLevel>
33+
</PropertyGroup>
34+
<ItemGroup>
35+
<Reference Include="ServiceStack">
36+
<HintPath>..\..\..\lib\ServiceStack.dll</HintPath>
37+
</Reference>
38+
<Reference Include="System" />
39+
<Reference Include="System.Data" />
40+
<Reference Include="System.Core" />
41+
<Reference Include="System.Data.DataSetExtensions" />
42+
<Reference Include="System.Web.Extensions" />
43+
<Reference Include="System.Xml.Linq" />
44+
<Reference Include="System.Drawing" />
45+
<Reference Include="System.Web" />
46+
<Reference Include="System.Xml" />
47+
<Reference Include="System.Configuration" />
48+
<Reference Include="System.Web.Services" />
49+
<Reference Include="System.EnterpriseServices" />
50+
<Reference Include="System.Web.Mobile" />
51+
</ItemGroup>
52+
<ItemGroup>
53+
<Compile Include="Global.asax.cs">
54+
<DependentUpon>Global.asax</DependentUpon>
55+
</Compile>
56+
<Compile Include="Properties\AssemblyInfo.cs" />
57+
</ItemGroup>
58+
<ItemGroup>
59+
<Content Include="Web.config" />
60+
</ItemGroup>
61+
<ItemGroup>
62+
<Content Include="Global.asax" />
63+
</ItemGroup>
64+
<ItemGroup>
65+
<ProjectReference Include="..\StarterTemplates.Common\StarterTemplates.Common.csproj">
66+
<Project>{ACBF3D12-379A-41D7-87DB-C376CFCBD131}</Project>
67+
<Name>StarterTemplates.Common</Name>
68+
</ProjectReference>
69+
</ItemGroup>
70+
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
71+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
72+
<ProjectExtensions>
73+
<VisualStudio>
74+
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
75+
<WebProjectProperties>
76+
<UseIIS>True</UseIIS>
77+
<AutoAssignPort>True</AutoAssignPort>
78+
<DevelopmentServerPort>36946</DevelopmentServerPort>
79+
<DevelopmentServerVPath>/</DevelopmentServerVPath>
80+
<IISUrl>http://localhost/CustomPath35</IISUrl>
81+
<NTLMAuthentication>False</NTLMAuthentication>
82+
<UseCustomServer>False</UseCustomServer>
83+
<CustomServerUrl>
84+
</CustomServerUrl>
85+
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
86+
</WebProjectProperties>
87+
</FlavorProperties>
88+
</VisualStudio>
89+
</ProjectExtensions>
90+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
91+
Other similar extension points exist, see Microsoft.Common.targets.
92+
<Target Name="BeforeBuild">
93+
</Target>
94+
<Target Name="AfterBuild">
95+
</Target>
96+
-->
97+
</Project>

Diff for: src/StarterTemplates/CustomPath35/Global.asax

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<%@ Application Codebehind="Global.asax.cs" Inherits="CustomPath35.Global" Language="C#" %>

Diff for: src/StarterTemplates/CustomPath35/Global.asax.cs

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using System;
2+
using StarterTemplates.Common;
3+
4+
namespace CustomPath35
5+
{
6+
public class Global : System.Web.HttpApplication
7+
{
8+
void Application_Start(object sender, EventArgs e)
9+
{
10+
new StarterTemplateAppHost().Init();
11+
}
12+
}
13+
}
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("CustomPath35")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("CustomPath35")]
13+
[assembly: AssemblyCopyright("Copyright © 2011")]
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("bd938bef-c216-40f7-923c-4bae04680369")]
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")]

0 commit comments

Comments
 (0)