I am trying to open razor view templates in Page Inspector mode and those are not shown. What I get instead is the error The resource cannot be found.
My path to open the View Page is View/Admin/Login.cshtml
Earlier I have used the controller with the name AdminController
but now I am using the controller with a different name. What I have done is divide the AdminController
into multiple controllers in order to ease out things. I have one named LoginController
.
When I run the project all views are working fine, but not in page inspector mode.
How can this page inspector problem be resolved?
Check following place of your code:
webconfig
<appSettings>
<add key="loginUrl" value="[ControllerName]/[LoginActionName]" /> ...
if it is still render wrong, then add following to system.web in web config too(if you use Form Authenticate):
<authentication mode="Forms">
<forms loginUrl="[ControllerName]/[LoginActionName]" timeout="2880" />
</authentication>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.