Skip to main content

ServiceStackPage

Assembly: ServiceStack.dll
View Source
Declaration
public class ServiceStackPage : Page, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, INamingContainer, IFilterResolutionService, IHttpHandler, IHasServiceStackProvider

Properties

UnauthorizedRedirectUrl

Default redirect URL if [Authenticate] attribute doesn't permit access.

View Source
Declaration
public virtual string UnauthorizedRedirectUrl { get; }

ForbiddenRedirectUrl

Default redirect URL if Required Role or Permission attributes doesn't permit access.

View Source
Declaration
public virtual string ForbiddenRedirectUrl { get; }

ServiceStackProvider

View Source
Declaration
public virtual IServiceStackProvider ServiceStackProvider { get; }

AppSettings

View Source
Declaration
public virtual IAppSettings AppSettings { get; }

ServiceStackRequest

View Source
Declaration
public virtual IHttpRequest ServiceStackRequest { get; }

ServiceStackResponse

View Source
Declaration
public virtual IHttpResponse ServiceStackResponse { get; }

Cache

View Source
Declaration
public virtual ICacheClient Cache { get; }

CacheAsync

View Source
Declaration
public virtual ICacheClientAsync CacheAsync { get; }

Db

View Source
Declaration
public virtual IDbConnection Db { get; }

Redis

View Source
Declaration
public virtual IRedisClient Redis { get; }

MessageProducer

View Source
Declaration
public virtual IMessageProducer MessageProducer { get; }

AuthRepository

View Source
Declaration
public virtual IAuthRepository AuthRepository { get; }

AuthRepositoryAsync

View Source
Declaration
public virtual IAuthRepositoryAsync AuthRepositoryAsync { get; }

SessionFactory

View Source
Declaration
public virtual ISessionFactory SessionFactory { get; }

SessionBag

View Source
Declaration
public virtual ISession SessionBag { get; }

SessionBagAsync

View Source
Declaration
public virtual ISessionAsync SessionBagAsync { get; }

IsAuthenticated

View Source
Declaration
public virtual bool IsAuthenticated { get; }

Gateway

View Source
Declaration
public virtual IServiceGateway Gateway { get; }

RpcGateway

View Source
Declaration
public virtual RpcGateway RpcGateway { get; }

Methods

ServiceStack_PreLoad(Object, EventArgs)

View Source
Declaration
protected virtual void ServiceStack_PreLoad(object sender, EventArgs e)
Parameters
TypeName
System.Objectsender
System.EventArgse

GetRedisAsync()

View Source
Declaration
public virtual ValueTask<IRedisClientAsync> GetRedisAsync()
Returns

ValueTask<ServiceStack.Redis.IRedisClientAsync>

GetSession(Boolean)

View Source
Declaration
public virtual IAuthSession GetSession(bool reload = true)
Returns

ServiceStack.Auth.IAuthSession

Parameters
TypeName
System.Booleanreload

GetSessionAsync(Boolean, CancellationToken)

View Source
Declaration
public virtual Task<IAuthSession> GetSessionAsync(bool reload = false, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<ServiceStack.Auth.IAuthSession>

Parameters
TypeName
System.Booleanreload
System.Threading.CancellationTokentoken

SessionAs<TUserSession>()

View Source
Declaration
public virtual TUserSession SessionAs<TUserSession>()
Returns

<TUserSession>

Type Parameters
  • TUserSession

SessionAsAsync<TUserSession>(CancellationToken)

View Source
Declaration
public virtual Task<TUserSession> SessionAsAsync<TUserSession>(CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<TUserSession>>

Parameters
TypeName
System.Threading.CancellationTokentoken
Type Parameters
  • TUserSession

SaveSession(IAuthSession, Nullable<TimeSpan>)

View Source
Declaration
[Obsolete("Use SaveSessionAsync")]
protected virtual void SaveSession(IAuthSession session, TimeSpan? expiresIn = null)
Parameters
TypeName
ServiceStack.Auth.IAuthSessionsession
System.Nullable<System.TimeSpan>expiresIn

SaveSessionAsync(IAuthSession, Nullable<TimeSpan>, CancellationToken)

View Source
Declaration
public virtual Task SaveSessionAsync(IAuthSession session, TimeSpan? expiresIn = null, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.Auth.IAuthSessionsession
System.Nullable<System.TimeSpan>expiresIn
System.Threading.CancellationTokentoken

ClearSession()

View Source
Declaration
public virtual void ClearSession()

ClearSessionAsync(CancellationToken)

View Source
Declaration
public virtual Task ClearSessionAsync(CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.Threading.CancellationTokentoken

TryResolve<T>()

View Source
Declaration
public virtual T TryResolve<T>()
Returns

<T>

Type Parameters
  • T

ResolveService<T>()

View Source
Declaration
public virtual T ResolveService<T>()
Returns

<T>

Type Parameters
  • T

ForwardRequestToServiceStack(IRequest)

View Source
Declaration
public virtual object ForwardRequestToServiceStack(IRequest request = null)
Returns

System.Object

Parameters
TypeName
ServiceStack.Web.IRequestrequest

Dispose()

View Source
Declaration
public override void Dispose()

EndServiceStackRequest()

View Source
Declaration
public virtual void EndServiceStackRequest()

Implements

  • System.ComponentModel.IComponent
  • System.IDisposable
  • System.Web.UI.IParserAccessor
  • System.Web.UI.IUrlResolutionService
  • System.Web.UI.IDataBindingsAccessor
  • System.Web.UI.IControlBuilderAccessor
  • System.Web.UI.IControlDesignerAccessor
  • System.Web.UI.IExpressionsAccessor
  • System.Web.UI.INamingContainer
  • System.Web.UI.IFilterResolutionService
  • System.Web.IHttpHandler
  • ServiceStack.IHasServiceStackProvider