问题标签 [servicestack-bsd]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
634 浏览

servicestack - ServiceStack Funq RequestScope

If I register a type with RequestScope.Request, and then I autowire it in a service, I know the object's lifetime scope will be respected.

Will this also hold true if I resolve the type in a non auto wired way, i.e.:

Also how can I confirm this? Thanks

0 投票
1 回答
147 浏览

servicestack - 如何在不使用 Route 属性的情况下创建摘要/注释

我想在后面的代码中创建摘要,因为我的所有路由当前都在 AppConfig 类中配置,但据我所知,只能使用 Route 属性包含摘要。

前任:

但我的路线配置如下:

基本上我想做类似的事情:

目前有没有办法做到这一点?

编辑:

我正在使用 ServiceStack 版本 3.9.71

0 投票
1 回答
605 浏览

servicestack - ServiceStack.ServiceInterface.dll not on nuget (included manually)

I was just reviewing my project's dependencies, and I remembered something I did a while ago.

When I first included the Validation Feature, i browsed servicestack's source, and since it was at ServiceInterface.dll and that wasn't at nuget, I just compiled it manually, and manually included the library. However I want to include it through nuget.

Am I missing something here?

Thanks (using 3.9.71)

0 投票
1 回答
1059 浏览

authentication - 如何检查用户是否在服务堆栈客户端中进行了身份验证?

我有自托管的服务堆栈服务器。在客户端应用程序中,它是 Windows 窗体,我想在用户未通过身份验证时显示登录表单。一种方法是尝试发送请求并WebServiceException像在AuthTest中一样捕获。

我正在寻找与客户端等效的@if(Request.IsAuthenticated)SocialBootstrapApi示例)。

0 投票
1 回答
1743 浏览

.net - .NET 3.5 上的 ServiceStack.Client

我的项目必须使用 .NET 3.5,并且我正在尝试为 ServiceStack .NET 4.0 服务器创建客户端。我是 Win 7、VS 2010、.NET 3.5。在网上搜索了几个小时后,我在这里找到了旧版本的 ServiceStack: https ://github.com/ServiceStackV3/ServiceStackV3

你可以像这样安装它:

这成功了,但后来我发现没有可以找到此调用的客户端方法:

然后我尝试安装客户端:

它找不到这个包。如何创建 .NET 3.5 客户端?我已经尝试了很多事情,包括找到一个已知的先前版本的客户端,但我对 Github 的了解还不够,无法找到一个。

0 投票
1 回答
1280 浏览

c# - ServiceStack 3.9.71 中缺少类型

我正在ServiceStack 3.9.71上开发服务基础架构(管理面板 + 网络服务) 。当我开始开发过程时,没有错误或警告,所有项目都编译并运行完美。当我尝试在 Linux 上部署应用程序时出现问题:管理控制面板没有从那里启动 ( mono fastcgi-server4)。

我备份了所有项目ServiceStackServiceStack Razor从解决方案中的所有项目中删除了所有依赖项,然后重新安装了它们。之后,在编译器日志中会出现很多遗漏类型的警告。我试图运行应用程序,但它们因错误而崩溃。

下面列出了编译器日志。我使用的是俄文版Visual Studio 2012 Express,所以我用谷歌翻译翻译的所有消息。

我在其他项目上没有发现同样的问题,也是基于我两个月前开发的ServiceStack 3.9.71。

0 投票
4 回答
5986 浏览

asp.net - 启动 ServiceStack 时无法加载类型“ServiceStack.ServiceHost.IService”

在我的 AppHost 上调用 Init() 时出现上述错误。

这是一个干净的 asp.net v 4.5 空 Web 应用程序,按照入门教程提供了一个简单的 HelloWorld 服务。

我专门使用安装了旧版本的 ServiceStack:

其中安装参考:

我得到的错误是:

它说它无法加载类型,但我不知道为什么?

以下是 nuget 的输出:

0 投票
1 回答
1034 浏览

c# - ServiceStack.OrmLite - 我可以做类似 Db.Select 的事情吗()?

如何Select使用Service.OrmLite两个表中的数据JOIN而不为此目的创建另一个 Poco (Coal+Data)。

我有 Poco for Coal 和 CoalData,例如:

在 Dapper 中很简单

0 投票
0 回答
85 浏览

c# - ServiceStack:当我在服务中抛出 [MyCustom]Exception 时,我得到“[MyCustom]Exception 未被用户代码处理”

Service课堂上我有Post方法:

当我点击F5(Debug->Run) 服务代码在 catch 结束时停止并说:“UniqueIndexException 未被用户代码处理”并且在我的客户端代码中,我必须捕获一般 WebException 而不是 WebServiceException 像文档所说的here

我错过了什么?

如何使抛出 new UniqueIndexException(); 在调试模式下运行时不要停止我的代码执行以及如何知道在服务中抛出了 UniqueIndexException()。WebException 的 InnerException 为空。

0 投票
1 回答
92 浏览

servicestack - 服务 CORS 和路由属性

我启用了 CORS 功能。我发现如果我没有:

根据我的请求 dto,然后我得到一个 404。

当我使用CorsFeature, 和PreRequestFilter下面的时,我不明白这个 404 来自哪里。(我也有身份验证属性,但我正在使用它进行无状态身份验证)。

有任何想法吗?PS。仍在 3.9.x 上

编辑: 我真正的问题可能应该是:

这给出了 404,并且根本没有命中 PreRequestFilter。为什么?