problems Integrating an asp.net website into an asp.net mvc 4 application -


i creating asp.net mvc 4 application replace suite of existing projects including asp.net 3.5 website , windows forms.

i have spent many months developing asp.net mvc 4 application scratch , have been focusing on windows forms appliction.

i trying integrate asp.net 3.5 website....for trying add website project. have looked how , see of need...but have few problems.

i using areas. carrier area (where website applies) have added folder called aspnet...and have added webpages , other code folder....all of compiles.

i have modified routconfig.cs file adding line: routes.ignoreroute("{resource}.aspx/{*pathinfo}");

when added webpages project added code, ignoring project files , web.config asp.net website.....

i don't think need convert on project files @ all...but trying figure out web.config....i know can have web.config in aspnet folder....but put question.....

i tried copying existing file, had issues different .net version (website v3.5 , mvc application v4.0 of .net)....

my big concern how handle security...the website used forms authentication security , mvc application uses simplemembership.

all of reading have done focused on converting asp.net web applications, not websites on mvc.....and don't web.config file....

nor have found security...again have seen things on integrating security model of mvc existing asp.net web application, nothing on how asp.net website working mvc simplemembership.

help!!

both web forms , mvc use forms authentication security. differs membership/roles providers used. web forms traditionally used default asp.net providers, whereas mvc uses simplemembership providers. here setting in web.config configuring simplemembership providers.

<system.web> <compilation debug="true" targetframework="4.5" /> <httpruntime targetframework="4.5" /> <authentication mode="forms">   <forms loginurl="~/account/login" timeout="2880" /> </authentication> <rolemanager enabled="true" defaultprovider="simpleroleprovider">   <providers>     <clear/>     <add name="simpleroleprovider" type="webmatrix.webdata.simpleroleprovider, webmatrix.webdata"/>   </providers> </rolemanager> <membership defaultprovider="simplemembershipprovider">   <providers>     <clear/>     <add name="simplemembershipprovider" type="webmatrix.webdata.simplemembershipprovider, webmatrix.webdata" />   </providers> </membership> </system.web> 

notice configure forms authentication same way web forms. main difference setting role , membership provider simpleroleprovider , simplemembershipprovider respectively. need include assembly webmatrix.webdata in references. simplemembership uses ef code first initialization of database @ app start crucial. read article on seeding , customizing simplemembership give tips on how might want tackle database initialization in app. there open source project called simplesecurity decouples simplemembership application, make easier incorporate project , provides simple method call initialize it. can read more here.


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -