server error in '/' application. configuration error description: error occurred during processing of configuration file required service request. please review specific error details below , modify configuration file appropriately. parser error message: error use section registered allowdefinition='machinetoapplication' beyond application level. error can caused virtual directory not being configured application in iis. line 40: <machinekey validationkey="c5be943dd83c87adf51cdbf28aad5624bb309cb9257b260222e418aeeda4e9d53f9306fa9bae7ede9a50159cf41d792aeccc71ca58e2cf36b134bac51386e673,isolateapps" line 41: decryptionkey="24334bd07ef93d06d979abfe3ab773100704c23cf6b96335,isolateapps" line 42: validation="hmacsha256" decryption="aes" /> show additional configuration errors: error use section registered allowdefinition='machinetoapplication' beyond application level. error can caused virtual directory not being configured application in iis. (c:\communicationmodule\emailtemplate.ui\areas\sso\views\web.config line 45)
here using single sign on using mvc 4.
this site following: single sign on using mvc 4
here code:
[system.web.mvc.httpget] [system.web.mvc.allowanonymous] public actionresult login(string returnurl) { if (request.isauthenticated) { return redirecttoaction("index", "home"); } viewbag.returnurl = returnurl; return view(); } [system.web.mvc.allowanonymous] [system.web.mvc.httppost] [validateantiforgerytoken] public actionresult login(string username, string password, string returnurl) { if (formsauthentication.authenticate(username, password)) { formsauthentication.setauthcookie(username, false); if (!string.isnullorempty(returnurl)) { return redirect(returnurl); } else { return redirecttoaction("index", "home"); } } else { modelstate.addmodelerror(string.empty, "invalid login details"); viewbag.returnurl = returnurl; return view(); } }
here web.config file:
<machinekey validationkey="c5be943dd83c87adf51cdbf28aad5624bb309cb9257b260222e418aeeda4e9d53f9306fa9bae7ede9a50159cf41d792aeccc71ca58e2cf36b134bac51386e673,isolateapps" decryptionkey="24334bd07ef93d06d979abfe3ab773100704c23cf6b96335,isolateapps" validation="hmacsha256" decryption="aes" /> <authentication mode="forms"> <forms name="singlesignon" loginurl="http://localhost:1849/sso/ssotemplate/login" timeout="480" slidingexpiration="true"> <credentials passwordformat="sha1"> <user name="demo" password="89e495e7941cf9e40e6980d14a16bf023ccd4c91"/> <!--password = demo--> </credentials> </forms> </authentication>
i generate new machine key in iis also.
how solve problem???
Comments
Post a Comment