如何...定义名称空间“成员资格"? [英] How do I...Define a namespace "Membership"?

查看:116
本文介绍了如何...定义名称空间“成员资格"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Microsoft.AspNet.Membership.OpenAuth;

namespace ContosoUniversity
{
    internal static class AuthConfig
    {
        public static void RegisterOpenAuth()
        {
             See http://go.microsoft.com/fwlink/?LinkId=252803 for details on setting up this ASP.NET
             application to support logging in via external services.

            OpenAuth.AuthenticationClients.AddTwitter(
                consumerKey: "your Twitter consumer key",
                consumerSecret: "your Twitter consumer secret");

            OpenAuth.AuthenticationClients.AddFacebook(
              appId: "XXXXXXXXXXXXX",
            appSecret: "XXXXXXXXXXXXXXXXX");

            OpenAuth.AuthenticationClients.AddMicrosoft(
                clientId: "your Microsoft account client id",
                clientSecret: "your Microsoft account client secret");

            OpenAuth.AuthenticationClients.AddGoogle();
        }
    }
}

推荐答案

开发不是您可以通过的课程,而是搜索互联网,然后复制并粘贴找到的内容.这种方法行不通,因为开发需要您考虑发现的内容并对其进行调整以适合您的需求.

对于上面的代码片段",这显然不是您要做的事情:其中一些不是代码,而是有关为了使其工作而必须执行的操作的说明.其他人显然是要用特定的信息代替您的部分-任何阅读该内容而不是盲目粘贴的人都将意识到这一点,因此我只能假设您不会打扰,并希望我们这样做一切为了你.

我们不是来做您的作业.这种方法不会使您顺利完成课程,当然也不会帮助您在课程结束时通过考试,如果该方法行得通,那么在现实世界中尝试和使用该模型将是一个非常糟糕的模型.在任何工作中尝试该方法,都不会持续很长时间!
所以...自己尝试.考虑一下您的任务以及发现的内容,然后尝试确定您需要做的事情.如果您遇到特定问题,请询问此问题,我们将尽最大努力为您提供帮助.但是我们不会为您做所有这一切.
Development is not a course that you can pass but searching the internet, and copy and pasting what you find. That approach won''t work, because development requires that you think about what you find and adapt it to fit your needs.

In the case of the "code fragment" above, that is clearly not something you have done: some of it is not code, but instructions as to what you have to do in order to get it working. Others are chunks that are clearly meant to to replace by you with specific information - and anyone who read that instead of pasting blindly would have realised that, so I can only assume that you can''t be bothered, and want us to do it all for you.

We are not here to do your homework. This approach will not get you through your course, will certainly not help you pass an exam at the end of it, and if it did work would be a very bad model to try and use in the real world. Try that in any job and you won''t last long!
So...try it yourself. Think about your task, and what you have found and try to work out what you need to do. If you meet a specific problem, then please ask about that and we will do our best to help. But we aren''t going to do it all for you.


这篇关于如何...定义名称空间“成员资格"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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