sql html版ui,GitHub - JamesDunne/sql.ashx: SQL Query Executor with HTML/js UI

该项目包含两个关键文件:sql.ashx和sqlui.html。sql.ashx是一个简单的HTTP处理程序,用于执行SQL查询和命令,并返回JSON格式的响应对象。sqlui.html是一个HTML5单页用户界面,用于与sql.ashx交互并执行输入的SQL查询。它处理服务器/数据库连接、超时、结果的表格格式化,并带有键盘快捷键。部署只需将两个文件上传到ASP.NET主机目录。注意,sql.ashx使用HTTP基本认证进行保护,并且可以通过修改源代码设置用户名和密码。如果需要集成安全性,可以使用应用程序池的身份连接数据库。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

sql.ashx

SQL Query Executor backend handler for ASP.NET with an HTML5 single-page user interface.

What is it?

This project consists of exactly two important files: sql.ashx and sqlui.html

The sql.ashx file is a simple HTTP handler contained in a single-file deployment package that is used to execute SQL

queries and commands against a MS SQL Server database (2005 or later) and return JSON-formatted response objects for the

HTML UI to consume. It is essentially a self-contained web service.

The sqlui.html file is a self-contained HTML5 single-page user interface for talking to sql.ashx and executing the

SQL queries that you type in. It also handles server/database connection details, time-outs, tabular formatting of

results, and even comes with very productive keyboard shortcuts.

The two files are best hosted on an internal (non-public) web services ASP.NET host running some version of IIS. You

certainly do not want to host a SQL querying tool on a public web site.

Deployment

Deployment is as simple as copying up two files to your ASP.NET host directory: sql.ashx, sqlui.html.

Both files are self-contained with no external dependencies except for Newtonsoft.Json 4.5.11 for JSON serialization.

You'll want to obtain this DLL file via NuGet and copy it to the bin/ directory of the ASP.NET application.

The *.ashx handler mapping is required to be set up in order for sql.ashx to serve requests with. The default IIS

configuration (IIS versions 6, 7, and 8) should all work out of the box. The sqlui.html file must be served as regular

HTML5 content.

Important Notes

The sql.ashx handler is "protected" from unauthorized access via the HTTP Basic Authentication scheme. There is a

default username and password pair that are hard-coded. Look to line 41 (as of the time of this writing) to modify the

two string values httpBasicAuth_Username and httpBasicAuth_Password to suit your needs.

If Integrated Security connection mode is desired, be aware that the handler connects to the database via the identity

of the application pool of the hosting ASP.NET site.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值