This page has moved to docs.servicestack.net/iis
ServiceStack integrates with your existing ASP.NET Web Application by registering an ASP.NET HttpHandler used to route HTTP requests to ServiceStack. The configuration below supports both IIS/6.0 and Mono as well as IIS7+ new handler mappings under <system.webServer>
:
Add this configuration in your Web.config
to host ServiceStack at the /
root path:
<!-- For IIS 6.0/Mono -->
<system.web>
<httpHandlers>
<add path="*" type="ServiceStack.HttpHandlerFactory, ServiceStack"
verb="*"/>
</httpHandlers>
</system.web>
<!-- For IIS 7.0+ -->
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<handlers>
<add path="*" name="ServiceStack.Factory" preCondition="integratedMode"
type="ServiceStack.HttpHandlerFactory, ServiceStack"
verb="*" resourceType="Unspecified" allowPathInfo="true" />
</handlers>
</system.webServer>
Tip: If you want to host your webservice on a custom path to avoid conflicts with another web framework (eg ASP.Net MVC), see https://github.com/ServiceStack/ServiceStack/wiki/Run-servicestack-side-by-side-with-another-web-framework.
Note: Due to limitations in IIS 6 - host ServiceStack at a /custompath which must end with
.ashx
, e.g:path="api.ashx"
If you want to use ServiceStack together with an existing ASP.NET Web Framework, you can instead host ServiceStack at /api
path with:
<location path="api">
<system.web>
<httpHandlers>
<add path="*" type="ServiceStack.HttpHandlerFactory, ServiceStack"
verb="*"/>
</httpHandlers>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<validation validateIntegratedModeConfiguration="false" />
<handlers>
<add path="*" name="ServiceStack.Factory"
type="ServiceStack.HttpHandlerFactory, ServiceStack"
verb="*" preCondition="integratedMode"
resourceType="Unspecified" allowPathInfo="true" />
</handlers>
</system.webServer>
</location>
To use ServiceStack together with ASP.NET MVC follow the steps in the Mvc integration docs.
If you are running IIS 7.5 you may need to disable the WebDAV module to enable PUT
and DELETE
verbs. You can do this globally through IIS or locally through a web.config.
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<remove name="WebDAVModule" />
</modules>
</system.webServer>
- Why ServiceStack?
- Important role of DTOs
- What is a message based web service?
- Advantages of message based web services
- Why remote services should use separate DTOs
-
Getting Started
-
Designing APIs
-
Reference
-
Clients
-
Formats
-
View Engines 4. Razor & Markdown Razor
-
Hosts
-
Security
-
Advanced
- Configuration options
- Access HTTP specific features in services
- Logging
- Serialization/deserialization
- Request/response filters
- Filter attributes
- Concurrency Model
- Built-in profiling
- Form Hijacking Prevention
- Auto-Mapping
- HTTP Utils
- Dump Utils
- Virtual File System
- Config API
- Physical Project Structure
- Modularizing Services
- MVC Integration
- ServiceStack Integration
- Embedded Native Desktop Apps
- Auto Batched Requests
- Versioning
- Multitenancy
-
Caching
-
HTTP Caching 1. CacheResponse Attribute 2. Cache Aware Clients
-
Auto Query
-
AutoQuery Data 1. AutoQuery Memory 2. AutoQuery Service 3. AutoQuery DynamoDB
-
Server Events
-
Service Gateway
-
Encrypted Messaging
-
Plugins
-
Tests
-
ServiceStackVS
-
Other Languages
-
Amazon Web Services
-
Deployment
-
Install 3rd Party Products
-
Use Cases
-
Performance
-
Other Products
-
Future