I’m creating a very simplistic MVC3 website. I need to add no database authenication.
I’m using a standard MVC project with the scaffolded account controller.
In the web.config file I have
<authentication mode="Forms">
<forms loginUrl="~/Account/LogOn">
<credentials passwordFormat="Clear">
<user name="admin" password="mypassword" />
</credentials>
</forms>
</authentication>
I get the following error. (I’m using casinni, This error is usally because an Application hasnt been declared)
It is an error to use a section registered as
allowDefinition=’MachineToApplication’ beyond application level. This
error can be caused by a virtual directory not being configured as an
application in IIS.
Any ideas how to fix?
I’ve been a massive numpty! I’ve been editing the wrong web.config file!
I edited the one under the /views folder when I should have edited the one under the root, doh!