Products

Solutions

Resources

Partners

Community

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0create dotnetnuke user outside of web applicationcreate dotnetnuke user outside of web application
Previous
 
Next
New Post
11/28/2007 4:59 AM
 

my web application cominucates with a win app , my problem is i can't register a new user through win app,(the "InitialiseProfile" method raised error so i have to comment it)

i used a code like this :

                                     DotNetNuke.Entities.Users.UserInfo userInfo = new DotNetNuke.Entities.Users.UserInfo();

                //userInfo.Profile.InitialiseProfile(0,true);
                userInfo.AffiliateID = -1;
                userInfo.DisplayName = username;
                userInfo.Email = email;
                userInfo.FirstName = userInfo.Profile.FirstName = "";
                userInfo.LastName = userInfo.Profile.LastName = "";
                userInfo.IsSuperUser = false;
                userInfo.Membership.Approved = true;
                userInfo.Membership.CreatedDate = DateTime.Now;
                userInfo.Membership.Email = email;
                userInfo.Membership.Password = password;
                userInfo.Membership.UpdatePassword = true;
                userInfo.Membership.Username = username;
                userInfo.Username = username;
                userInfo.PortalID = 0;
                userInfo.Profile.PreferredLocale = "fa-IR";
               

                status = DotNetNuke.Entities.Users.UserController.CreateUser(ref userInfo);
it never worked :-(
i supposed it may because of a connection string problem, so i add a web.config to my win app and a proper connectionstring but it still has the same general non specific non detailed exception of  "userController threw exception"
i will appreciate any help. how i can create dnn users outside of web app?
 
New Post
12/1/2007 12:21 AM
 

finally i decided to insert required values directly into db by myself it worked but not with hashed passwords, i have to find a way to hash passwords and then store them in db. for encrypting pass & salt i use EncryptPassword method of Membership class, it depends on machine Key and i don't know how to add a web.config to win app, actually i add one but not worked, still looking in machine.config :)

now the question is how i can hash passwords using asp methods?

any idea?

 
New Post
12/1/2007 12:52 AM
 

ahhhhhhh, holy mother of jesus christ

i tried to do user registration outside of db by calling CreateUser method of membership but there is same problem : which db to connect where we should look, what we should do?

 
New Post
12/1/2007 4:00 AM
 

I think one solution is to create a web service that your winforms app can call. I haven't used it before, but it looks like M. Washington's IWeb allows you to create web services: http://iweb.adefwebserver.com/Home/tabid/36/Default.aspx

Good luck!

 
New Post
12/1/2007 5:29 AM
 

thank u for replying

i'll check it

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0create dotnetnuke user outside of web applicationcreate dotnetnuke user outside of web application


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out