English 中文(简体)
通过Ajax员额处理安全储蓄的最佳做法,如p.net MVC 3
原标题:Best practise for handling secure saving through Ajax posts asp.net MVC 3

I am working on a Asp.Net MVC 3/knockout.js site for several users where they can save information about their websites Here is a simple version of the model

class{
string Id
string Name
string Url
string Description
}

我想要建立一个反应非常灵敏的国际倡议,以便通过Ajax实现所有负荷节约。

因此,情况是,用户在名单上添加了播音网站,并点击了避风扇,贴上控制器的“行动方法”。

一切产品都进行罚款。

问题在于:

怎样才能确保用户不篡改阴道,并且实际上正在拯救其他用户网站的信息?

当然,Id是冷漠的,但任何具备某些网络知识的邪恶者都可以轻易改变id。

最佳回答

You should use authentication. Decorate the action that will perform the update with the Authorize attribute. This will ensure that the user that is sending the AJAX request is authenticated, and he cannot change his username. Then you will check in your database if the id of the site he is trying to update belongs to him. You will of course have a table that will contain the mapping between users and sites.

如果用户拖网点贴出并贴出某个地点的某些价值,则控制者采取行动时将发现该点,以核实某个地点是否属于某一用户名称。 他不能篡改其用户名称,因为其储存在加密认证库中,当然除非他有不同的用户名,在这种情况下他已经知道密码。

问题回答

暂无回答




相关问题
ajax login using httpRequest?

I am trying to develop my login script to give feedback to the user if the login is valid or not. Basically if it isn t correct a div box will show saying its wrong, if its correct it will show its ...

Virtual Tour using sketch up, ajax, flash technologies

I want to know if there are existing technology that make your 3d models in sketch into virtual tours, using either Ajax or Flash for web presentation. If there s none, which will be a good approach ...

How can i update div continuously

I have asp.net application where i have a div which showing the value from other site. The value of that site is changing continuously. I want that my div will automatically update in some interval ...

热门标签