ASP.NET authentication -


i develop site, uses authentication ticket api of other service. have method getsessionticket() api. , question: can asp.net authentication thats depends cookie? remove section membership provider @ web.config:

<add name="applicationservices"      connectionstring="data source=.\sqlexpress;integrated security=sspi;attachdbfilename=|datadirectory|aspnetdb.mdf;user instance=true"      providername="system.data.sqlclient" /> <membership>   <providers>     <clear/>     <add name="aspnetsqlmembershipprovider" type="system.web.security.sqlmembershipprovider" connectionstringname="applicationservices"          enablepasswordretrieval="false" enablepasswordreset="true" requiresquestionandanswer="false" requiresuniqueemail="false"          maxinvalidpasswordattempts="5" minrequiredpasswordlength="6" minrequirednonalphanumericcharacters="0" passwordattemptwindow="10"          applicationname="/" />   </providers> </membership> <profile>   <providers>     <clear/>     <add name="aspnetsqlprofileprovider" type="system.web.profile.sqlprofileprovider" connectionstringname="applicationservices" applicationname="/" />   </providers> </profile>--> <rolemanager enabled="false">   <providers>     <clear/>     <add name="aspnetsqlroleprovider" type="system.web.security.sqlroleprovider" connectionstringname="applicationservices" applicationname="/" />     <add name="aspnetwindowstokenroleprovider" type="system.web.security.windowstokenroleprovider" applicationname="/" />   </providers> </rolemanager> 

and left this:

<authentication mode="forms">   <forms loginurl="~/account/logon" timeout="2880" /> </authentication> 

logon logic looks like:

var ticket = securityservice.getsessionticket(model.username, model.password); formsauthentication.setauthcookie(ticket.sessionuserid.tostring(), true); 

is ok? asp.net authorization based on cookie , not require sql server or aspnetdb.mdf, yes?

yes fine this, doing implementing forms authentication, without membership database. not required use membership datbase achieve authentication, , setting cookies in code fine.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -