Silverlight/.Net RIA 服务 - 授权工作示例?

发布于 2024-08-04 02:44:07 字数 690 浏览 6 评论 0原文

我关注了大量有关 Ria Services 在将 Silverlight 与 ASP.Net 结合使用时所提供的功能的教程和演练/博客。本质上,我正在寻找 Ria Services 显然可以从 ASP.Net 获取授权功能的实时工作示例。 (如果它也适用于 ASP.NET MVC 就更好了)

Ria 服务授权实施失败的示例

导航到此页面上的实时演示链接...失败

这个可能可以工作,但是我无法让它在我的办公室计算机上工作(奇怪的设置似乎破坏了代码没有理由)

I have followed numerous tutorials and walkthroughs/blogs about the capabilities that Ria Services brings to the table when using Silverlight with ASP.Net. Essentially I am looking for a live working example of the authorization functionality that Ria Services can apparently take hold of from ASP.Net. (Even better if it works with ASP.NET MVC too)

Example of failed to work Ria Services authorization implementation

Navigate to the live demo link on this page....fails

This one may work however I couldn't get it to work on my office computer(strange setup that seems to break code for no reason)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

机场等船 2024-08-11 02:44:07

检查此处:在此处输入链接说明。有很多帖子提供了示例。它不完全是您想要的,但有一个设置完全授权的演练。

Check here: enter link description here. There is a bunch of posts giving samples. It not exactly what you want but has a walk-through for setting up full authorization.

救星 2024-08-11 02:44:07

布拉德·艾布拉姆斯有一些很好的信息。另请注意,Visual Studio 中的新“Silverlight Business Application”模板 -> “新项目”对话框已经设置了身份验证,您可以在其中随意使用它,而不必先弄清楚如何设置它。

http://blogs.msdn.com/brada/archive/2009/10/05/business-apps-example-for-silverlight- 3-rtm-and-net-ria-services-july-update-part-26-authentication-and-personalization.aspx

C# Silverlight 与 RIA 服务身份验证

Brad Abrams has some good information. Also note that the new "Silverlight Business Application" template in the Visual Studio -> New Project dialog has authentication set up already where you can mess around with it without having to figure out how to set it up first.

http://blogs.msdn.com/brada/archive/2009/10/05/business-apps-example-for-silverlight-3-rtm-and-net-ria-services-july-update-part-26-authentication-and-personalization.aspx

C# Silverlight with RIA Services Authentication

意中人 2024-08-11 02:44:07

很可能您还没有配置环境。在所使用的框架版本的 machine.config 文件中,您将找到已定义的 LocalSqlServer。您应该编辑此定义以指向提供您要使用的 aspnetdb 数据库的 SQL Server(如果您没有数据库,则首先进行设置)。

Machine.config 通常位于 c:\windows\microsoft.net\framework\v2.something\config

对于开发,您必须在工作站 machine.config 中进行配置,以使调试器的 Web 服务器使用您的产品认证数据库。对于生产,您必须在生产网络服务器上执行相同的配置。

64 位和 32 位框架实例有不同的路径,如果像我一样,您有版本 2、3、3.5 和 4 的 32 和 64 位版本,那么您就有“根”配置文件。如果你将它们全部追捕并设置全部,这将在以后避免无数的混乱。

Most likely you haven't configured your environment yet. In the machine.config file for the framework version in use, you will find LocalSqlServer defined. You should edit this definition to point at the SQL Server serving up the aspnetdb database that you want to use (and if you don't have one then start by setting up that).

Machine.config is generally in c:\windows\microsoft.net\framework\v2.something\config

For development you have to configure this in the workstation machine.config to make the debugger's webserver use your production authentication database. For production you have to do the same configuration on the production webserver.

There are different paths for 64 and 32 bit framework instances, and if like me you have 32 and 64 bit editions of version 2, 3, 3.5 and 4 then you have eight "root" configuration files. If you hunt them all down and set all of them it will save untold confusion later.

吐个泡泡 2024-08-11 02:44:07

这是我去年十月的博客中的内容:

Silverlight 的业务应用程序模板附带登录和注册页面。将它们连接到 ASPNETDB.mdf 非常容易。

只需将 LocalSqlServer 连接字符串添加到您的 web.config 文件中即可。例如,这是我用来连接 Sql Server 的。

这太容易了!

如果您在开发机器上使用 SqlExpress,它会变得更加容易。你不需要做任何事。只需创建一个新的 Silverlight Business 应用程序并启动它即可。进入登录页面并注册。这会很慢,但在后台,您的 ASPNETDB 刚刚创建并附加,您将登录。如果您随后查看 Web.config 文件,您将不会在任何地方看到连接字符串,因为默认值是用于这个魔法。当然,现实世界的连接需要像上面这样的自己的连接字符串。

格雷格

This is from my blog last october:

The Business Application Template for Silverlight comes with a login and register pages. It is very easy to connect these to a ASPNETDB.mdf.

Just add a LocalSqlServer connection string to your web.config file. For example, here is what I use to connect to Sql Server.

It’s almost too easy!

If you are using SqlExpress on your dev machine, it gets even easier. You don’t have to do anything. Just create a new Silverlight Business App and fire it up. Go to the log-on page and register. It will be slow, but in the background, your ASPNETDB was just created and attached, and you will be logged in. If you then look in the Web.config file, you won’t see a connection string anywhere, as the defaults are used for this piece of magic. Of course, a real world connection is going to need it’s own connection string like the above.

Greg

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文