asp.net mvc 3 - change from Webforms views to Razor views not working -
i updated mvc views webforms razor.
what did rewrite manually code in razor , excluded aspx project. far good.
now strange happening when run web site. still webforms views if excluded them project , replaced them razor views.
i did add web config file :
<configsections> <sectiongroup name="system.web.webpages.razor" type="system.web.webpages.razor.configuration.razorwebsectiongroup, system.web.webpages.razor, version=1.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35"> <section name="host" type="system.web.webpages.razor.configuration.hostsection, system.web.webpages.razor, version=1.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" requirepermission="false" /> <section name="pages" type="system.web.webpages.razor.configuration.razorpagessection, system.web.webpages.razor, version=1.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" requirepermission="false" /> </sectiongroup> </configsections> <system.web.webpages.razor> <host factorytype="system.web.mvc.mvcwebrazorhostfactory, system.web.mvc, version=3.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" /> <pages pagebasetype="system.web.mvc.webviewpage"> <namespaces> <add namespace="system.web" /> <add namespace="system.web.mvc" /> <add namespace="system.web.mvc.ajax" /> <add namespace="system.web.mvc.html" /> <add namespace="system.web.routing" /> </namespaces> </pages> </system.web.webpages.razor>
i added block web config views folder. added _viewstart.cshtml
i don't think iis pays attention .csproj
files. if .aspx
files still in directory, find them, , .aspx
has precedence on .cshtml
files. you'll have delete them or move them. (or write own viewengine, doubt that's worth this.)
Comments
Post a Comment