Thursday, March 1, 2012

How to validate a form without Model validation setting in ASP.NET MVC3?

Use jQuery validation plugin directly
<script src="@Url.Content("~/Scripts/jquery-ui.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.js")" type="text/javascript"></script>
@using (Html.BeginForm("ActionName", "ControllerName", FormMethod.Get, new { id="FormName"}))
{
   <text>Required Field:</text>
    Write(Html.TextBox("id", "", new {@class = "required" }));
    <input type="submit" value="Go" />
}
<script type="text/javascript">
    $(document).ready(function () {
        $("#FormName").validate();
    });
</script>






What is IIS Application Pool?

Application pool is a grouping of URLs that is routed to one or more worker processes. Application pools significantly increase both the reliability and manageability of a Web infrastructure.

 Reference:
http://technet.microsoft.com/en-us/library/cc735247(v=WS.10).aspx






How to solve “Access to the path 'C:\inetpub\wwwroot\' is denied.” In ASP.NET?

-        Go to IIS Manager to find out the identity for the application pool (Default is: IIS AppPool\DefaultAppPool)
-        Go to the folder in file explorer. In security tab, add this user into permission list



Reference:
Application Pool Identities
http://learn.iis.net/page.aspx/624/application-pool-identities/