asp.net - Why @Html.AntiForgeryToken() returns null? -


i have configured web asp.net mvc app in iis on our server. after app starts exception occurs such below:

object reference not set instance of object. line 10: { line 11:     <div class="form-horizontal"> line 12:         @html.antiforgerytoken()  <-- here 

i've checked machinekey (in web.config) of app in iis :

<machinekey decryptionkey="autogenerate,isolateapps" validation="sha1" validationkey="autogenerate,isolateapps" /> 

i can't figure out problem!

update:

also, checked session,but it's not null. got session.sessionid in razor , got valid value (hutqqygxwbvvwaerztvamf1n).


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -