使用WPF的ASP.NET成员资格数据库 [英] ASP.NET Membership database using WPF

查看:56
本文介绍了使用WPF的ASP.NET成员资格数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hiya,

我想在WPF应用程序上使用ASP.NET成员数据库,因为我想要数据库的本地前端以及在线前端.

我已经尝试了以下视频示例: http://windowsclient.net/learn/video.aspx?v=293710

但是,当我按如下方式使用代码时,出现以下错误:

发生System.NotSupportedException
Message =不支持指定的方法.
来源= System.Web.Extensions

Hiya,

I am trying to use the ASP.NET membership database on a WPF application as I want a local front end for a database as well as a front end online.

I have tried the example on this video: http://windowsclient.net/learn/video.aspx?v=293710

However, when I use the code as follows I get the following error:

System.NotSupportedException occurred
Message=Specified method is not supported.
Source=System.Web.Extensions

Membership.CreateUser("gumby", "pokey");



此错误也适用于获取角色并登录用户.

有人可以提供任何有关如何解决此问题的建议吗?



This error also applies to getting roles and also logging users in.

Can anyone offer any advice as to how I can resolve this?

推荐答案

请参阅我对问题的评论:不清楚您要做什么,并且ASP.NET和WPF应用程序如何关联.我的印象是您正在尝试做完全错误的事情,但由于问题非常模糊,因此无法确定.

如果您有一些可以正常使用的ASP.NET应用程序,而您想在其他前端上重复使用,则可能应该考虑或创建WPF前端应用程序将使用的ASP.NET Web服务,或者更好的是,创建由IIS托管的WCF服务,并在您的WPF前端使用它.

请参阅: http://msdn.microsoft.com/en-us/library/ms972326.aspx [ ^ ].

这些CodeProject文章可能会有用:
了解ASP.NET中Web服务的基础 [ ^ ],
ASP.NET Web服务 [ http://msdn.microsoft.com/en-us/library/bb332338.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/aa751792.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/ms733766.aspx [ ^ ].

这些CodeProject文章可能会有用:
创建,托管(自助托管,IIS托管)和使用WCF服务 [ ^ ],
WCF和Web服务之间有什么区别? [ ^ ].

—SA
Please see my comment to the question: it is not clear what are you trying to do, and how ASP.NET and WPF application can be related. I have an impression that you are trying to do something totally wrong, but cannot be quite sure because of the very vague question.

If you have some working ASP.NET application you are trying to re-use with different front end, probably you should think about or creating an ASP.NET Web service you would consume by your WPF front-end application, or, better yet, to create a WCF service hosted by IIS and also consume it by your your WPF front-end.

Please see: http://msdn.microsoft.com/en-us/library/ms972326.aspx[^].

These CodeProject articles could be useful:
Understanding the Basics of Web Service in ASP.NET[^],
ASP.NET Web Service[^].

On WCF services, please see:
http://msdn.microsoft.com/en-us/library/bb332338.aspx[^],
http://msdn.microsoft.com/en-us/library/aa751792.aspx[^],
http://msdn.microsoft.com/en-us/library/ms733766.aspx[^].

These CodeProject articles could be useful:
Create, Host (Self Hosting, IIS hosting) and Consume WCF Service[^],
What''s the Difference between WCF and Web Services?[^].

—SA


这篇关于使用WPF的ASP.NET成员资格数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆