Search Results

Search found 4 results on 1 pages for 'listentorick'.

Page 1/1 | 1 

  • Why should I Use ASP.NET Membership security model?

    - by ListenToRick
    I'm updating my website at the moment and figure that if I am to update my login/security mode, now is a good time. I have looked through the Membership model which is included in ASP.NET but I'm convinced that it will provide any benefit apart from being familiar to other .NET deevlopers. There seems to be quite a lot of documentation for it, but little discussion for why its worth the effort. Can anybody shed some light upon this?

    Read the article

  • Testing SMTP with .net

    - by ListenToRick
    I need to configure a SMTP server for testing my website which sends emails (for registration confirmation etc). I dont actually want the email to be sent, I just want to make sure that my code is correct. So I want to be able to check that the email is placed in a queue folder for example. Can anybody recommend a SMTP server which is easy to configure?

    Read the article

  • ASP.NET MVC Form repopulation

    - by ListenToRick
    I have a controller with two actions: [AcceptVerbs("GET")] public ActionResult Add() { PrepareViewDataForAddAction(); return View(); } [AcceptVerbs("POST")] public ActionResult Add([GigBinderAttribute]Gig gig, FormCollection formCollection) { if (ViewData.ModelState.IsValid) { GigManager.Save(gig); return RedirectToAction("Index", gig.ID); } PrepareViewDataForAddAction(); return View(gig); } As you can see, when the form posts its data, the Add action uses a GigBinder (An implemenation of IModelBinder) In this binder I have: if (int.TryParse(bindingContext.HttpContext.Request.Form["StartDate.Hour"], out hour)) { gig.StartDate.Hour = hour; } else { bindingContext.ModelState.AddModelError("Doors", "You need to tell us when the doors open"); } The form contains a text box with id "StartDate.Hour". As you can see above, the GigBinder tests to see that the user has typed in an integer into the textbox with id "StartDate.Hour". If not, a model error is added to the modelstate using AddModelError. Since the gigs property gigs.StartDate.Hour is strongly typed, I cannot set its value to, for example, "TEST" if the user has typed this into the forms textbox. Hence, I cant set the value of gigs.StartDate.Hour since the user has entered a string rather than an integer. Since the Add Action returns the view and passes the model (return View(gig);) if the modelstate is invalid, when the form is re-displayed with validation mssages, the value "TEST" is not displayed in the textbox. Instead, it will be the default value of gig.StartDate.Hour. How do I get round this problem? I really stuck!

    Read the article

  • Spring.net customer namespace parser

    - by ListenToRick
    I have a customer parser which looks like this: [NamespaceParser( Namespace = "http://mysite/schema/cache", SchemaLocationAssemblyHint = typeof(CacheNamespaceParser ), SchemaLocation = "/cache.xsd" ) ] public class CacheNamespaceParser : NamespaceParserSupport { public override void Init() { RegisterObjectDefinitionParser("cache", new CacheParser ()); } } public class CacheParser : AbstractSimpleObjectDefinitionParser { protected override Type GetObjectType(XmlElement element) { return typeof(CacheDefinition); } protected override void DoParse(XmlElement element, ObjectDefinitionBuilder builder) { } protected override bool ShouldGenerateIdAsFallback { get { return true; } } } in the web config i have the following configuration.... <spring> <parsers> <parser type="Spring.Data.Config.DatabaseNamespaceParser, Spring.Data"/> <parser type="App.Web.CacheNamespaceParser, WebApp" /> </parsers> When I run the project I get the following error: An error occurred creating the configuration section handler for spring/parsers: Invalid resource name. Name has to be in 'assembly:<assemblyName>/<namespace>/<resourceName>' format. I put a break point in the CacheNamespaceParser init method and it is called. If I remove from the web config all is well! Any ideas whats wrong

    Read the article

1