Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8968661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:29:09+00:00 2026-06-15T17:29:09+00:00

Using the new Service implementation, do I have to provide an Options method for

  • 0

Using the new Service implementation, do I have to provide an Options method for all of my services?

Using the old ServiceBase approach, which all my services currently use, OPTIONS returns OK without the Access-Control-Allow-Origin header.

Here’s an example:

https://github.com/JonCanning/SSCors

HelloService uses Service

GoodbyeService uses ServiceBase

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T17:29:10+00:00Added an answer on June 15, 2026 at 5:29 pm

    Because ServiceStack’s Old API enforced an interface-based API it only supported GET, POST, PUT, DELETE, PATCH requests. Handling OPTION requests we’re essentially a stop-gap work-around that had a single implementation to just emit the configured headers and close the response.

    With ServiceStack’s New API there is no longer any limitation as you can now handle any HTTP Verb by just using its name on your IService. This now lets you handle all verbs to specific requests individually. But now it’s no longer handled implicitly for you and need an implementation to handle it via a Service.

    You can continue to handle all OPTIONS requests by using any of the pre-defined hooks to handle it generically before it reaches the Service.

    E.g.

    Plugins.Add(new CorsFeature()); //Registers global CORS Headers
    
    this.RequestFilters.Add((httpReq, httpRes, requestDto) => {
       //Handles Request and closes Responses after emitting global HTTP Headers
        if (httpReq.HttpMethod == "OPTIONS") 
            httpRes.EndRequest();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am using web service asmx, whenever a new request comes, all objects will
I am new to using web services. I am assigned a task in which
I m new to using Web services using JavaScript. All I want is to
I am new to Java web-services and am working on one currently, using Apache
I'm using Apache CXF for my restful web services. I have a service defined
I am using a new service to pull xml data from a server. The
Does startService() create a new Service instance or using the existing one? For example,
Every new web service you create using visual studio comes with a predefined namespace
I am working on a web service project using gsoap. I am new to
I am new to using AppFabric to host WF services. I am trying to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.