直接插入 - An Insecure JSON Data Transference from C# Server Page to Smart Devices Case Share
2012-05-14 04:54
537 查看
What is JSON, click her
I'm working on a project with JSON.
Project Description
The page that reads database has existed already. The page is coded with C#. I need to reuse the page to the largest extent, and accommodate the data inquiries from smart devices with Android and iOS systems.
Solution
直接插入 the following line
SerResults jsonValidResult = new SerResults(true);
System.Runtime.Serialization.Json.DataContractJsonSerializer serial = new System.Runtime.Serialization.Json.DataContractJsonSerializer(jsonValidResult.GetType());
serial.WriteObject(Response.OutputStream, jsonValidResult);
Response.OutputStream.Close();
Result
Professor was pretty upset
![](http://static.blog.csdn.net/xheditor/xheditor_emot/default/knock.gif)
, because he believed this was an insecure solution. What should I do????
I'm working on a project with JSON.
Project Description
The page that reads database has existed already. The page is coded with C#. I need to reuse the page to the largest extent, and accommodate the data inquiries from smart devices with Android and iOS systems.
Solution
直接插入 the following line
SerResults jsonValidResult = new SerResults(true);
System.Runtime.Serialization.Json.DataContractJsonSerializer serial = new System.Runtime.Serialization.Json.DataContractJsonSerializer(jsonValidResult.GetType());
serial.WriteObject(Response.OutputStream, jsonValidResult);
Response.OutputStream.Close();
Result
Professor was pretty upset
![](http://static.blog.csdn.net/xheditor/xheditor_emot/default/knock.gif)
, because he believed this was an insecure solution. What should I do????
相关文章推荐
- Use Jquery to get json data from the server-side php page
- All-In-One Code Framework(AIO): 如何使用C#编写进程外的COM组件 (How to write an out-of-proc COM server in C#)
- Simple VBScript program to extract data from all worksheets in an Excel spreadsheet
- Embed client-side JavaScript in an ASP.NET 1.1 web page from server side code
- Simple VBScript program to extract data from all worksheets in an Excel spreadsheet
- EF 6.0 The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value. c#中的时间
- Moving from design to reality - building HedKandi.com in Microsoft Office SharePoint Server 2007
- An example to show how to make Tree structure data table in SQL server
- 插入mysql语句报错:1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near
- In-Place upgrade to Team Foundation Server (TFS) 2015 from TFS 2013Team Foundation Server TFS TFS 2015 TFS upgrade TFS with Sharepoint
- How to read data from csv file in c#
- Simplest way to serve static data from outside the application server in a Java web application
- Using Timer to get history values from EDNA database, an error is prompted in the page : "Sys.WebForms.PageRequestManagerTimeout
- ssh开发中插入数据时遇到 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right
- How To Use a DataReader Against an Oracle Stored Procedure in Visual C# .NET
- How to run an existing SQL Server Agent Job from C#
- 转载:Character data is represented incorrectly when the code page of the client computer differs from the code page of the database in SQL Server 2005
- 7 Easy Steps to Learn C#: Silverlight C# Compiler and Loading DLLs from a server at runtime in Silverlight
- using HttpClient and sending json data to RESTful server in adroind
- Use C# to get JSON Data from the Web and Map it to .NET Class => Made Easy! 转