asp.net mvc - RedirectToAction hangs without redirecting -
i have following code registering users in app
[httppost] public virtual actionresult register( registermodel model ) { if ( !modelstate.isvalid ) { //invalid - redisplay form errors return view( model ); } try { membershipuser mu = _manager.registeruser( model ); //send confirmation email here } catch ( registrationexception rex ) { modelstate.addmodelerror( "", rex.message ); } return redirecttoaction( "index", "home" ); }
if user correctly registered on system redirecting him home page of app with
return redirecttoaction( "index", "home" );
i have code working in dev box , in staging server. when publish on production server accessible through internet hangs on last call, after sending email, without redirecting user @ all.
any idea?
lorenzo,
i think may have error (configuration and/or disabled) remote mail setup , error being 'swallowed' in try/catch block. try disabling block , should able see actual error occurred on server. gut feel issue lies!! i've gone down path many time, you're not alone.
the joys of switching 'live' environment...
cheers...
Comments
Post a Comment