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 9222667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:53:12+00:00 2026-06-18T03:53:12+00:00

Looking at the ServiceStack.UseCases example project. I am trying to use the jsonserviceclient to

  • 0

Looking at the ServiceStack.UseCases example project. I am trying to use the jsonserviceclient to call the HelloRequest service after I have called the authentication service. No matter what I do it appears to be failing and returning the Not Found error message. Anyone know what I am doing wrong?

   protected void Button1_Click(object sender, EventArgs e)
    {
        var baseUrl = Request.Url.GetLeftPart(UriPartial.Authority) + "/api";
        var client = new JsonServiceClient(baseUrl);
        client.UserName = "admin";
        client.Password = "123";
        client.SetCredentials("admin", "123");
        client.AlwaysSendBasicAuthHeader = true;
        client.Send(new HelloRequest { Name = "Mike" });
    }

The server has the service configured like

 public class AppHost : AppHostBase
{
    public AppHost() : base("Custom Authentication Example", typeof(AppHost).Assembly) { }

    public override void Configure(Container container)
    {
        // register storage for user sessions 
        container.Register<ICacheClient>(new MemoryCacheClient());

        // Register AuthFeature with custom user session and custom auth provider
        Plugins.Add(new AuthFeature(
            () => new CustomUserSession(), 
            new[] { new CustomCredentialsAuthProvider() }
        ));
    }
}

What I would really like is a good solution to the following problem I have. I have an existing system with an existing user database and custom authentication process. I am now trying to expose the functions of the system as web services using servicestack. I program using bog standard webforms so the MVC examples dont work too well for me. I am just looking for the best solution for my particular scenario where I can authenticate callers to my webservice with the majority of my clients using webforms in .NET

  • 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-18T03:53:13+00:00Added an answer on June 18, 2026 at 3:53 am

    You also need to have Basic Auth enabled on the server you’re trying to authenticate with.
    See the SocialBootstrapApi AppHost for an example:

    Plugins.Add(new AuthFeature(
        () => new CustomUserSession(), //Use your own typed Custom UserSession type
        new IAuthProvider[] {
            new BasicAuthProvider(),                    //Sign-in with Basic Auth
        }));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking to use ServiceStack for an upcoming project, but I want to
I am looking at the Rockstars example and ServiceStack.Razor. How do I go about
For example Service Stack does this to with the Northwind database: http://www.servicestack.net/ServiceStack.Northwind/customers/ALFKI?format=html Is there
I'm trying to implement ServiceStack into my MVC3 project, and am following the tutorial
Looking to do a bit of refactoring... Using NHibernate I have this query currently
Looking at the Ehcahce implementation of net.sf.cache.JS107, I am trying to achieve the following
Looking for best advice on how to do this: I have an insert like
I'm looking for at using ServiceStack for the services part of a web application
How does ServiceStack handle concurrent calls? I'm looking for equivalent of ConcurrencyMode.Multiple in WCF.
Looking for a simple blog engine that will support article management. I have standalone

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.