Running new MVC3 solution in VS2010 ASP.NET development server; where is membership database? -



Running new MVC3 solution in VS2010 ASP.NET development server; where is membership database? -

i'll preface saying: don't understand how membership providers work in asp.net, , i'm trying understand them better.

i created new mvc3 solution in vs2010. can run within asp.net's development server, , works great - cool. i'm little confused how forms authentication working within asp.net development server.

consider stock version of accountcontroller.cs:

[httppost] public actionresult logon(logonmodel model, string returnurl) { if (modelstate.isvalid) { if (membership.validateuser(model.username, model.password)) { formsauthentication.setauthcookie(model.username, model.rememberme); if (url.islocalurl(returnurl) && returnurl.length > 1 && returnurl.startswith("/") && !returnurl.startswith("//") && !returnurl.startswith("/\\")) { homecoming redirect(returnurl); } else { homecoming redirecttoaction("index", "home"); } } else { modelstate.addmodelerror("", "the user name or password provided incorrect."); } }

it uses membership class validate usernames , passwords registered through mvc3 website. that's great, it, but... how work? within asp.net development server?

is there database can somehow open , , see test info i've entered? it?

like said, don't understand how works - , if can't figure out asp.net development server, won't able figure out in iis. i've read through microsoft's introduction membership documentation, don't sense job @ explaining how working @ lower level; seems membership "built-in" - ok, that's cool, there has more story that, right?

once register user checkout ~/app_data folder of application. that's database goes default. of course of study might need running sqlexpress instance.

open web.config , @ this:

<connectionstrings> <add name="applicationservices" connectionstring="data source=.\sqlexpress;integrated security=sspi;attachdbfilename=|datadirectory|aspnetdb.mdf;user instance=true" providername="system.data.sqlclient" /> </connectionstrings>

then modify connection string , utilize real sql server database in production environment instead of storing locally in files.

asp.net-mvc-3 asp.net-membership

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -