You can use the following code to determine is a user is passing in the correct username and password.
try
{
using (PrincipalContext pc = new PrincipalContext(ContextType.Domain, "SERVERNAME"))
{
bool isValid = pc.ValidateCredentials("USERNAME", "PASSWORD");
}
}
80220e29-ec59-40ca-9699-81c3959e1737|0|.0
Get the "Boot from secondary plex" message when booting after recovering from a mirrored drive? Use msconfig, from Start-Run, to edit the boot options.
faa94ffe-7d08-48cf-aa59-34ba7e96b17e|0|.0
http://weblogs.asp.net/scottgu/archive/2010/07/16/code-first-development-with-entity-framework-4.aspx
http://weblogs.asp.net/scottgu/archive/2010/07/23/entity-framework-4-code-first-custom-database-schema-mapping.aspx
http://msdn.microsoft.com/en-us/data/cc546554.aspx
103bcaba-8b83-4da4-ba55-5a35e273ea4b|0|.0
To “migrate/compare” views from one database to the other, you can get the create view statement directly from the database.
http://msdn.microsoft.com/en-us/library/ms345522.aspx
http://msdn.microsoft.com/en-us/library/ms345522.aspx#_FAQ35
SELECT * FROM sys.sql_modules
SELECT definition FROM sys.sql_modules WHERE object_id = OBJECT_ID('<view name>');
SELECT V1.name,M1.definition FROM sys.views AS V1
LEFT OUTER JOIN sys.sql_modules AS M1 ON M1.object_id=V1.object_id
849b9f88-6e7e-4576-9086-9b439cb40f2a|0|.0
Posted by
david on
9/14/2010 2:06 AM |
Comments (0)
Class address ranges:
Start End # Networks # Hosts
Class A = 1.0.0.0 -> 127.255.255.255 -> 128 -> 16,777,216
Class B = 128.0.0.0 -> 191.255.255.255 -> 16,384 -> 65,536
Class C = 192.0.1.0 -> 223.255.255.255 -> 2,097,152 -> 256
Reserved address ranges for private use (non-routed)
10.0.0.0 -> 10.255.255.255
172.16.0.0 -> 172.31.255.255
192.168.0.0 -> 192.168.255.255
Other reserved addresses:
127.0.0.0 loopback and IPC on the local host
224.0.0.0 -> 239.255.255.255 multicast addresses
Netmask Netmask (binary) CIDR Usable IPs Total IP Addresses
_____________________________________________________________________________________________________
255.255.255.255 11111111.11111111.11111111.11111111 /32 single addr 1
255.255.255.254 11111111.11111111.11111111.11111110 /31 Unuseable 2
255.255.255.252 11111111.11111111.11111111.11111100 /30 2 4
255.255.255.248 11111111.11111111.11111111.11111000 /29 6 8
255.255.255.240 11111111.11111111.11111111.11110000 /28 14 16
255.255.255.224 11111111.11111111.11111111.11100000 /27 30 32
255.255.255.192 11111111.11111111.11111111.11000000 /26 62 64
255.255.255.128 11111111.11111111.11111111.10000000 /25 126 128
255.255.255.0 11111111.11111111.11111111.00000000 /24 254 256 Class C
255.255.254.0 11111111.11111111.11111110.00000000 /23 510 512 2 Class C
255.255.252.0 11111111.11111111.11111100.00000000 /22 1022 1024 4 Class C
255.255.248.0 11111111.11111111.11111000.00000000 /21 2046 2048 8 Class C
255.255.240.0 11111111.11111111.11110000.00000000 /20 4094 4096 16 Class C
255.255.224.0 11111111.11111111.11100000.00000000 /19 8190 8192 32 Class C
255.255.192.0 11111111.11111111.11000000.00000000 /18 16382 16384 64 Class C
255.255.128.0 11111111.11111111.10000000.00000000 /17 32766 32768 128 Class C
255.255.0.0 11111111.11111111.00000000.00000000 /16 65534 65536 Class B
255.254.0.0 11111111.11111110.00000000.00000000 /15 131070 131072 2 Class B
255.252.0.0 11111111.11111100.00000000.00000000 /14 262142 262144 4 Class B
255.248.0.0 11111111.11111000.00000000.00000000 /13 524286 524288 8 Class B
255.240.0.0 11111111.11110000.00000000.00000000 /12 1048574 1048576 16 Class B
255.224.0.0 11111111.11100000.00000000.00000000 /11 2097150 2097152 32 Class B
255.192.0.0 11111111.11000000.00000000.00000000 /10 4194302 4194304 64 Class B
255.128.0.0 11111111.10000000.00000000.00000000 /9 8388606 8388608 128 Class B
255.0.0.0 11111111.00000000.00000000.00000000 /8 16777214 16777216 Class A
254.0.0.0 11111110.00000000.00000000.00000000 /7
252.0.0.0 11111100.00000000.00000000.00000000 /6
248.0.0.0 11111000.00000000.00000000.00000000 /5
240.0.0.0 11110000.00000000.00000000.00000000 /4
224.0.0.0 11100000.00000000.00000000.00000000 /3
192.0.0.0 11000000.00000000.00000000.00000000 /2
128.0.0.0 10000000.00000000.00000000.00000000 /1
0.0.0.0 00000000.00000000.00000000.00000000 /0 IP space
6be48a2a-01e5-479e-991c-9a20f91ba80e|0|.0
It became necessary to get a listing of all the Active Directory servers in the network. The following VB script did just the job. The entire article is at TechNet.
Save it as a file, for example, listAD.vbs and run it from the command line C:\>cscript listAD.vbs.
Technet Blog Entry
On Error Resume Next
Set objRootDSE = GetObject("LDAP://RootDSE")
strConfigurationNC = objRootDSE.Get("configurationNamingContext")
strSitesContainer = "LDAP://cn=Sites," & strConfigurationNC
Set objSitesContainer = GetObject(strSitesContainer)
objSitesContainer.Filter = Array("site")
For Each objSite In objSitesContainer
Wscript.Echo objSite.CN
strSiteName = objSite.Name
strServerPath = "LDAP://cn=Servers," & strSiteName & ",cn=Sites," & _
strConfigurationNC
Set colServers = GetObject(strServerPath)
For Each objServer In colServers
WScript.Echo vbTab & objServer.CN
Next
Wscript.Echo
Next
600a0b11-1a98-4e7a-a3d0-a85b6b6cb4c1|0|.0
The following will create a temp table and use an undocumented stored procedure to run a command on each table in the database. The command is another stored procedure that will get the space used by the data and index for the tables.
You can query the temp table to calculate the sizes.
CREATE TABLE #T1(
TableName varchar(128),
Rows varchar(11),
Reserved varchar(18),
DataSize varchar(18),
IndexSize varchar(18),
Unused varchar(18)
);
EXEC sp_MSforeachtable @command1=""INSERT #T1 EXEC sp_spaceused '?'"";
SELECT TableName,Rows,DataSize,IndexSize FROM #T1;
DROP TABLE #T1;
f76173f3-a60a-44ea-af2c-0a026c601299|0|.0
Tags: .NET, PDF, C# |
Categories: .NET
Posted by
david on
6/11/2010 6:40 AM |
Comments (0)
I stumbled across this .NET PDF library while looking for a way to automatically generate signs for a project I'm working on.
http://www.paologios.com/
c2eca706-ffc3-4f44-8dc9-54131c2cc52d|0|.0
It looks like they redid the interface so this site is much easier to use now.
http://www.openclipart.org/
a4a7de73-b2c3-41f0-8283-7283027e15ca|0|.0