Equivalent of ID IN in LINQ
0The IN query will get results within the given range
SQL
select * from tablename where id in(12,34,56)
Equivalent LINQ TO SQL (VB.NET)
From c In db.tablename Where (New Integer() {12,34,56}).Contains(c.id)
Equivalent LINQ TO SQL (C#)
from c in db.tablenamewhere (new int[] {
12,
34,
56
}).Contains(c.id)
How to fully trust a asp.net application (using command line and GUI )
0Some server do not have “Microsoft .NET Framework 2.0 Configuration” in there administrative Tools
they can use CasPol.exe to Fully Trust a website.
Please run the following code in command line.
%windir%\Microsoft.NET\Framework\v2.0.50727\caspol -quiet -m -ag All_Code -url “http://localhost/*” FullTrust
you can also download .NET Framework 2.0 Software Development Kit (SDK) to install Microsoft .NET Framework 2.0 Configuration
and you can trust a website using the GUI like below
1. From the Start menu, point to Administrative Tools, and then click Microsoft .NET Framework 2.0 Configuration.
If you don’t have Administrative Tools on the Start menu, from the Control Panel open Administrative Tools, and then double-click Microsoft .NETFramework 2.0 Configuration.
2. Under My Computer, expand the Runtime Security Policy node, the Machine node, Code Groups node, the All_Code node, and then right-click the All_Code node and click New to open the Create Code Group dialog box.
3. Name the new code group 'MY WEB APPLICATION NAME', and then click Next.
4. Select a ‘Site’ membership condition from the drop down box
5. Under ‘Site name’ type in the URL to my web application
6. Give ‘FullTrust’ permission set and click Finish
7. To apply the new settings, close and restart your browser
mysql host is blocked because of many connection errors
0Error:
“host is blocked because of many connection errors unblock with ‘mysqladmin flush-hosts’”
to fix this increase ‘max_connect_errors’ which is 10 by default.
If you can afford to restart the MySQL server, enter below to your my.cnf and restart the MySQL service.
[mysqld]
max_connect_errors = 1000
If you can’t afford to restart the MySQL server, follow below steps.
In MySQL pormpt,
Recent Comments