我在somee.com上部署了我的asp.net Web应用程序,每当我登录到这个站点(ipc.somee.com)时,它给我一个网络相关的错误,如:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated …Run Code Online (Sandbox Code Playgroud) sql-server asp.net connection-string database-connection sql-server-2008
是否可以在Asp.Net Web应用程序中仅允许每个用户进行一次并发登录?
我正在开发一个Web应用程序,我希望确保该网站每个用户一次只能登录一次.如何检查当前用户是否已登录.
建议正确的登录方法,以便我们处理这个问题.我认为我们应该使用sql server session state来处理这个问题.你的建议是什么?
我想到了一个解决方案.我不知道它是否合适.我们可以这样做:
当用户登录系统时,我们在用户列中插入会话ID.(我们将使用数据库会话,以便我们可以轻松获取所有与会话相关的数据,如isexpired,expiredatetime等).
当同一用户尝试第二次登录时,我们将检查该会话ID列并检查该会话是否已过期.如果会话未过期,我们将不允许用户登录.
每次用户注销时更新用户会话ID.
请以正确的方式建议.
我有一个Product包含3列的表名:
Product-id
name
Price
Run Code Online (Sandbox Code Playgroud)
在name列中,显示所有产品名称.
示例:1340 GPS,1340T GPS等
当我写作
select top 10 * from product where contains(name,'1340');
Run Code Online (Sandbox Code Playgroud)
结果1行 1340 GPS
但是当我搜索
select top 10 * from product where name like '%1340%';
Run Code Online (Sandbox Code Playgroud)
然后结果是1340 GPS and 1340T GPS.
实际上我的要求是我将使用,contains()但它必须显示像LIKE运算符这样的行.
怎么做:?
请帮忙
提前致谢
我正在开发一个应用程序,我想在其中制作与屏幕分辨率和屏幕大小无关的字体大小.所有分辨率和所有屏幕尺寸的字体大小应相同.如何用javascript和css做到这一点?
我认为Pixel每点是硬件相关的东西所以我不确定javascript和css是否可以访问它.
我尝试了很多替代品,但找不到确切的解决方案.