Skip to content

Commit 96dbc60

Browse files
committed
Merge remote branch 'origin/master'
2 parents cd1de26 + 40e90e0 commit 96dbc60

File tree

3 files changed

+19
-106
lines changed

3 files changed

+19
-106
lines changed

src/ServiceStack.Hello/Global.asax.cs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,14 @@
77
namespace ServiceStack.Hello
88
{
99
/// Create the name of your Web Service (i.e. the Request DTO)
10-
[DataContract]
11-
[Description("ServiceStack's Hello World web service.")]
12-
[RestService("/hello")] //Optional: Define an alternate REST-ful url for this service
13-
[RestService("/hello/{Name}")]
14-
[RestService("/hello/{Name*}")]
1510
public class Hello
1611
{
17-
[DataMember]
1812
public string Name { get; set; }
1913
}
2014

2115
/// Define your Web Service response (i.e. Response DTO)
22-
[DataContract]
2316
public class HelloResponse
2417
{
25-
[DataMember]
2618
public string Result { get; set; }
2719
}
2820

@@ -45,7 +37,13 @@ public class HelloAppHost : AppHostBase
4537
public HelloAppHost()
4638
: base("Hello Web Services", typeof(HelloService).Assembly) { }
4739

48-
public override void Configure(Funq.Container container) { }
40+
public override void Configure(Funq.Container container)
41+
{
42+
//register user-defined REST-ful urls
43+
Routes
44+
.Add<Hello>("/hello")
45+
.Add<Hello>("/hello/{Name}");
46+
}
4947
}
5048

5149
protected void Application_Start(object sender, EventArgs e)

src/ServiceStack.Hello/ServiceStack.Hello.csproj

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,16 @@
3838
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
3939
</PropertyGroup>
4040
<ItemGroup>
41-
<Reference Include="ServiceStack">
42-
<HintPath>..\..\lib\ServiceStack.dll</HintPath>
41+
<Reference Include="ServiceStack, Version=3.9.3.0, Culture=neutral, processorArchitecture=MSIL">
42+
<SpecificVersion>False</SpecificVersion>
43+
<HintPath>packages\ServiceStack.3.9.3\lib\net35\ServiceStack.dll</HintPath>
4344
</Reference>
44-
<Reference Include="ServiceStack.Interfaces">
45-
<HintPath>..\..\lib\ServiceStack.Interfaces.dll</HintPath>
45+
<Reference Include="ServiceStack.Common, Version=3.9.3.0, Culture=neutral, processorArchitecture=MSIL">
46+
<SpecificVersion>False</SpecificVersion>
47+
<HintPath>packages\ServiceStack.Common.3.9.3\lib\net35\ServiceStack.Common.dll</HintPath>
48+
</Reference>
49+
<Reference Include="ServiceStack.Interfaces, Version=3.9.0.0, Culture=neutral, processorArchitecture=MSIL">
50+
<HintPath>packages\ServiceStack.Common.3.9.3\lib\net35\ServiceStack.Interfaces.dll</HintPath>
4651
</Reference>
4752
<Reference Include="System" />
4853
<Reference Include="System.Runtime.Serialization">
@@ -71,6 +76,9 @@
7176
</Compile>
7277
<Compile Include="Properties\AssemblyInfo.cs" />
7378
</ItemGroup>
79+
<ItemGroup>
80+
<Content Include="packages.config" />
81+
</ItemGroup>
7482
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
7583
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
7684
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

src/ServiceStack.Hello/Web.config

Lines changed: 0 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,5 @@
11
<?xml version="1.0"?>
22
<configuration>
3-
<configSections>
4-
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
5-
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
6-
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
7-
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
8-
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
9-
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
10-
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
11-
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
12-
</sectionGroup>
13-
</sectionGroup>
14-
</sectionGroup>
15-
</configSections>
16-
<appSettings/>
17-
<connectionStrings/>
18-
19-
203
<!-- ServiceStack: Required to host at: /servicestack -->
214
<location path="servicestack">
225
<system.web>
@@ -34,68 +17,6 @@
3417
</handlers>
3518
</system.webServer>
3619
</location>
37-
38-
39-
<system.web>
40-
<!--
41-
Set compilation debug="true" to insert debugging
42-
symbols into the compiled page. Because this
43-
affects performance, set this value to true only
44-
during development.
45-
-->
46-
<compilation debug="true">
47-
<assemblies>
48-
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
49-
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
50-
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
51-
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
52-
</assemblies>
53-
</compilation>
54-
<!--
55-
The <authentication> section enables configuration
56-
of the security authentication mode used by
57-
ASP.NET to identify an incoming user.
58-
-->
59-
<authentication mode="Windows"/>
60-
<!--
61-
The <customErrors> section enables configuration
62-
of what to do if/when an unhandled error occurs
63-
during the execution of a request. Specifically,
64-
it enables developers to configure html error pages
65-
to be displayed in place of a error stack trace.
66-
67-
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
68-
<error statusCode="403" redirect="NoAccess.htm" />
69-
<error statusCode="404" redirect="FileNotFound.htm" />
70-
</customErrors>
71-
-->
72-
<pages>
73-
<controls>
74-
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
75-
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
76-
</controls>
77-
</pages>
78-
<httpHandlers>
79-
<remove verb="*" path="*.asmx"/>
80-
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
81-
<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"/>
82-
<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"/>
83-
84-
<!-- ServiceStack: Required for MONO -->
85-
<add path="servicestack*" type="ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory, ServiceStack" verb="*"/>
86-
</httpHandlers>
87-
<httpModules>
88-
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
89-
</httpModules>
90-
</system.web>
91-
<system.codedom>
92-
<compilers>
93-
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
94-
<providerOption name="CompilerVersion" value="v3.5"/>
95-
<providerOption name="WarnAsError" value="false"/>
96-
</compiler>
97-
</compilers>
98-
</system.codedom>
9920
<!--
10021
The system.webServer section is required for running ASP.NET AJAX under Internet
10122
Information Services 7.0. It is not necessary for previous version of IIS.
@@ -119,18 +40,4 @@
11940
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
12041
</handlers>
12142
</system.webServer>
122-
<runtime>
123-
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" appliesTo="v2.0.50727"><dependentAssembly>
124-
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
125-
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
126-
</dependentAssembly>
127-
<dependentAssembly>
128-
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
129-
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
130-
</dependentAssembly>
131-
</assemblyBinding></runtime>
132-
<system.serviceModel>
133-
<bindings/>
134-
<client/>
135-
</system.serviceModel>
13643
</configuration>

0 commit comments

Comments
 (0)