Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. SharePoint
  4. create Web-Part for Login-Authentication - sandboxed solution [modified]

create Web-Part for Login-Authentication - sandboxed solution [modified]

Scheduled Pinned Locked Moved SharePoint
databasequestionsql-serversysadminsecurity
12 Posts 4 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P PleaseHelpCP

    Hello Friends, I am new in Web-part development. I want to create web-part. In that I need to authenticate loginname and password.(it will check it from sql server 2008 database).After successful login, it redirects to another page. how can i do this ?

    modified on Thursday, January 20, 2011 5:20 AM

    N Offline
    N Offline
    Not Active
    wrote on last edited by
    #2

    You are talking about Forms-based Authentication. Since you didn't specify what version of SharePoint you are using, look here[^] or here[^]

    Prachee G wrote:

    pls tell me complete procedure from scratch to end.

    Simply, no. 1) There is far too much to teach you here. 2) You need to show some effort on your own 3) I get paid to do it work, not give it away.


    I know the language. I've read a book. - _Madmatt

    1 Reply Last reply
    0
    • P PleaseHelpCP

      Hello Friends, I am new in Web-part development. I want to create web-part. In that I need to authenticate loginname and password.(it will check it from sql server 2008 database).After successful login, it redirects to another page. how can i do this ?

      modified on Thursday, January 20, 2011 5:20 AM

      S Offline
      S Offline
      saanj
      wrote on last edited by
      #3

      I completely agree with Mark as you should try at your end first and then come back to us if you have any questions. There is no one in the code project whos is having time or getting paid for giving you the complete steps from start to end. Sometimes people may feel quite harsh when you ask someone to do so in CP. People are here to help you out but not supposed to do your work. For custom login webpart checkout the following link: http://blogs.msdn.com/b/kaevans/archive/2010/07/09/creating-a-custom-login-page-for-sharepoint-2010.aspx[^] Visual Studio 2010 has a great feature to package the source files into a deployable WSP file. For example, create an Empty SharePoint 2010 Project in Visual Studio 2010 and add a WebPart (for your custom login screen). Once you are done with the coding, then right click on the project and click on Package. A WSP will be automatically generated and stored inside bin/debug or bin/release based on the Visual Studio Solution Configuration. I hope that you have some stuffs to start. All the best. :)

      There is no foolish question, there is no final answer...

      P A 2 Replies Last reply
      0
      • S saanj

        I completely agree with Mark as you should try at your end first and then come back to us if you have any questions. There is no one in the code project whos is having time or getting paid for giving you the complete steps from start to end. Sometimes people may feel quite harsh when you ask someone to do so in CP. People are here to help you out but not supposed to do your work. For custom login webpart checkout the following link: http://blogs.msdn.com/b/kaevans/archive/2010/07/09/creating-a-custom-login-page-for-sharepoint-2010.aspx[^] Visual Studio 2010 has a great feature to package the source files into a deployable WSP file. For example, create an Empty SharePoint 2010 Project in Visual Studio 2010 and add a WebPart (for your custom login screen). Once you are done with the coding, then right click on the project and click on Package. A WSP will be automatically generated and stored inside bin/debug or bin/release based on the Visual Studio Solution Configuration. I hope that you have some stuffs to start. All the best. :)

        There is no foolish question, there is no final answer...

        P Offline
        P Offline
        PleaseHelpCP
        wrote on last edited by
        #4

        both mark & saanj people new to this development platform write such queries. its not like they do not try.

        S N 2 Replies Last reply
        0
        • P PleaseHelpCP

          both mark & saanj people new to this development platform write such queries. its not like they do not try.

          S Offline
          S Offline
          saanj
          wrote on last edited by
          #5

          Yeah, I agree with you. 5 votes for your comment. Correct me if I am wrong but MugsPat and Prachee G are the same person. So, we are getting a reply from the same person who originally asked the question. As far as our feedback are concerned, people should know what they should do and they should not in CP. That's how a new becomes old. Both Mark and myself shared some links and thoughts to your questions and unfortunately you criticize us by simply voting 1 instead of working on the solutions. Reply back if the links are not useful or if you have any questions. All the best again!

          There is no foolish question, there is no final answer...

          modified on Tuesday, January 18, 2011 1:53 AM

          P 1 Reply Last reply
          0
          • S saanj

            Yeah, I agree with you. 5 votes for your comment. Correct me if I am wrong but MugsPat and Prachee G are the same person. So, we are getting a reply from the same person who originally asked the question. As far as our feedback are concerned, people should know what they should do and they should not in CP. That's how a new becomes old. Both Mark and myself shared some links and thoughts to your questions and unfortunately you criticize us by simply voting 1 instead of working on the solutions. Reply back if the links are not useful or if you have any questions. All the best again!

            There is no foolish question, there is no final answer...

            modified on Tuesday, January 18, 2011 1:53 AM

            P Offline
            P Offline
            PleaseHelpCP
            wrote on last edited by
            #6

            May be the way of asking is wrong. I have the same query asked above. Firstly i am using sharepoint 2010 & vs2010. I have to develop sandboxed solution. I have created web part (not visual web part) in it. I am unable to user login control as it is disabled. I have created login control using Microsoft.SharePoint.Utilities & Microsoft.SharePoint.IdentityModel namespaces. I want to know 1. can we use in-built login control in web part? 2. how to use javascript in login control created using above mentioned namespaces? hope i'll get some fruitful replies thnks

            S N 2 Replies Last reply
            0
            • P PleaseHelpCP

              May be the way of asking is wrong. I have the same query asked above. Firstly i am using sharepoint 2010 & vs2010. I have to develop sandboxed solution. I have created web part (not visual web part) in it. I am unable to user login control as it is disabled. I have created login control using Microsoft.SharePoint.Utilities & Microsoft.SharePoint.IdentityModel namespaces. I want to know 1. can we use in-built login control in web part? 2. how to use javascript in login control created using above mentioned namespaces? hope i'll get some fruitful replies thnks

              S Offline
              S Offline
              saanj
              wrote on last edited by
              #7

              Are you using the standard asp.net login control? Share the code for the login control.

              There is no foolish question, there is no final answer...

              P 1 Reply Last reply
              0
              • S saanj

                Are you using the standard asp.net login control? Share the code for the login control.

                There is no foolish question, there is no final answer...

                P Offline
                P Offline
                PleaseHelpCP
                wrote on last edited by
                #8

                i was trying to use standard asp.net login control in web page & reference that page in web part so that it becomes reusable and formatting becomes easy ....unfortunately didnt get any useful links. so used utilities & IdentityModel namespaces to create following control // create a login control var loginControl = new Login(); // hide the control if the User is already logged in loginControl.Visible = !this.Page.User.Identity.IsAuthenticated; // add event handlers loginControl.Authenticate += new AuthenticateEventHandler(loginControl_Authenticate); /Controls.Add(loginControl); } void loginControl_Authenticate(object sender, AuthenticateEventArgs e) { // validate credentials var login = (sender as Login); e.Authenticated = SPClaimsUtility.AuthenticateFormsUser( this.Page.Request.Url, login.UserName, login.Password); }

                S 1 Reply Last reply
                0
                • P PleaseHelpCP

                  i was trying to use standard asp.net login control in web page & reference that page in web part so that it becomes reusable and formatting becomes easy ....unfortunately didnt get any useful links. so used utilities & IdentityModel namespaces to create following control // create a login control var loginControl = new Login(); // hide the control if the User is already logged in loginControl.Visible = !this.Page.User.Identity.IsAuthenticated; // add event handlers loginControl.Authenticate += new AuthenticateEventHandler(loginControl_Authenticate); /Controls.Add(loginControl); } void loginControl_Authenticate(object sender, AuthenticateEventArgs e) { // validate credentials var login = (sender as Login); e.Authenticated = SPClaimsUtility.AuthenticateFormsUser( this.Page.Request.Url, login.UserName, login.Password); }

                  S Offline
                  S Offline
                  saanj
                  wrote on last edited by
                  #9

                  Prachee, The following code that you are using is actually instantiating the ASP.NET Login controls:

                  var loginControl = new Login();

                  You may not have removed the following namespace:

                  System.Web.UI.WebControls

                  For an easy solution, you can consider using a Sandboxed Visual Webpart which gives you an ASCX file where you can add an ASP.NET Login Control. Your ASCX file will be auto embeeded with the Visual Web Part. I just added a Login control in my Sandboxed Visual Webpart and it's coming enabled only. I would like to suggest you to try.

                  There is no foolish question, there is no final answer...

                  1 Reply Last reply
                  0
                  • P PleaseHelpCP

                    both mark & saanj people new to this development platform write such queries. its not like they do not try.

                    N Offline
                    N Offline
                    Not Active
                    wrote on last edited by
                    #10

                    I disagree. Experience here and elsewhere has shown that newbies ask these types of question without looking for the answer themselves. 1) do to a lack knowledge and 2) most likely due to project timing and being over their head.


                    I know the language. I've read a book. - _Madmatt

                    1 Reply Last reply
                    0
                    • P PleaseHelpCP

                      May be the way of asking is wrong. I have the same query asked above. Firstly i am using sharepoint 2010 & vs2010. I have to develop sandboxed solution. I have created web part (not visual web part) in it. I am unable to user login control as it is disabled. I have created login control using Microsoft.SharePoint.Utilities & Microsoft.SharePoint.IdentityModel namespaces. I want to know 1. can we use in-built login control in web part? 2. how to use javascript in login control created using above mentioned namespaces? hope i'll get some fruitful replies thnks

                      N Offline
                      N Offline
                      Not Active
                      wrote on last edited by
                      #11

                      Is FBA enabled on the site? Have you made the necessary modifications to the web.config for the web application?


                      I know the language. I've read a book. - _Madmatt

                      1 Reply Last reply
                      0
                      • S saanj

                        I completely agree with Mark as you should try at your end first and then come back to us if you have any questions. There is no one in the code project whos is having time or getting paid for giving you the complete steps from start to end. Sometimes people may feel quite harsh when you ask someone to do so in CP. People are here to help you out but not supposed to do your work. For custom login webpart checkout the following link: http://blogs.msdn.com/b/kaevans/archive/2010/07/09/creating-a-custom-login-page-for-sharepoint-2010.aspx[^] Visual Studio 2010 has a great feature to package the source files into a deployable WSP file. For example, create an Empty SharePoint 2010 Project in Visual Studio 2010 and add a WebPart (for your custom login screen). Once you are done with the coding, then right click on the project and click on Package. A WSP will be automatically generated and stored inside bin/debug or bin/release based on the Visual Studio Solution Configuration. I hope that you have some stuffs to start. All the best. :)

                        There is no foolish question, there is no final answer...

                        A Offline
                        A Offline
                        anoop1982
                        wrote on last edited by
                        #12

                        you could have given a better reply...

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups