¡@

Home 

c# Programming Glossary: servername

Speed up File.Exists for non existing network shares

http://stackoverflow.com/questions/1232953/speed-up-file-exists-for-non-existing-network-shares

processed End Sub Private Function IsDriveReady ByVal serverName As String As Boolean Dim bReturnStatus As Boolean False ' SET.. a valid ip address Dim ipAddressOrHostName As String serverName Dim data As String aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa Dim buffer..

WCF contract mismatch problem

http://stackoverflow.com/questions/1264431/wcf-contract-mismatch-problem

endPoint new EndpointAddress new Uri net.tcp serverName 9990 TestService1 ChannelFactory IService1 channel new ChannelFactory.. host baseAddresses add baseAddress http serverName 9999 TestService1 add baseAddress net.tcp serverName 9990 TestService1.. http serverName 9999 TestService1 add baseAddress net.tcp serverName 9990 TestService1 baseAddresses host service services system.serviceModel..

How to restore a database from C#

http://stackoverflow.com/questions/1466651/how-to-restore-a-database-from-c-sharp

String databaseName String backUpFile String serverName String userName String password Restore sqlRestore new Restore.. ServerConnection connection new ServerConnection serverName userName password Server sqlServer new Server connection sqlRestore.Action.. String databaseName String userName String password String serverName ServerConnection connection new ServerConnection serverName..

.NET Process Monitor

http://stackoverflow.com/questions/1986249/net-process-monitor

Process process Process.GetProcessesByName processName serverName c# process system share improve this question WMI provides..

Show Authentication dialog in C# for windows Vista/7

http://stackoverflow.com/questions/4134882/show-authentication-dialog-in-c-sharp-for-windows-vista-7

flags public static void GetCredentialsVistaAndUp string serverName out NetworkCredential networkCredential CREDUI_INFO credui.. credui.pszCaptionText Please enter the credentails for serverName credui.pszMessageText DisplayedMessage credui.cbSize Marshal.SizeOf..

Deleting database from C#

http://stackoverflow.com/questions/5170429/deleting-database-from-c-sharp

Here is the code which worked for me var server new Server serverName Can use overload that specifies foreach Database db in server.Databases.. model though I have not tested it var server new Server serverName Can use overload that specifies foreach Database db in server.Databases..

C# start Windows Service programmatically

http://stackoverflow.com/questions/6667799/c-sharp-start-windows-service-programmatically

service new ServiceController serviceName serverName http msdn.microsoft.com en us library aa331793 28v VS.71 29.aspx..

Using SSL and SslStream for peer to peer authentication?

http://stackoverflow.com/questions/695802/using-ssl-and-sslstream-for-peer-to-peer-authentication

In the Client Program.cs file make sure you set serverName yourhostname.com and that it matches the name in the certificate.. bool authenticationPassed true try string serverName System.Environment.MachineName X509Certificate cert GetServerCert.. certs.Add cert sslStream.AuthenticateAsClient serverName certs SslProtocols.Default false check cert revokation catch..

Get the exact time for a remote server

http://stackoverflow.com/questions/1008111/get-the-exact-time-for-a-remote-server

for its current time Similar functionality to net time servername but returning a datestamp that includes seconds. Thanks c#..

Speed up File.Exists for non existing network shares

http://stackoverflow.com/questions/1232953/speed-up-file-exists-for-non-existing-network-shares

is the WNetGetConnection API function that gets the UNC servername share of the drive 2. The second is our main method The Button1_Click.. If dri.DriveType IO.DriveType.Network Then 'Get the UNC servername share for the ' drive letter returned by dri.Name Dim UNC As.. 0 2 UNC 100 'Presuming the drive is mapped servername share ' Parse the servername out of the UNC Dim server As String..

LDAP Authentication in ASP.Net MVC

http://stackoverflow.com/questions/1401667/ldap-authentication-in-asp-net-mvc

add name ADConnectionString connectionString LDAP servername port# DC domainname connectionStrings The connection string..

Sharepoint web services — The HTTP request is unauthorized with client authentication scheme 'Ntlm'. The authentication header received from the server was 'NTLM'

http://stackoverflow.com/questions/2608887/sharepoint-web-services-the-http-request-is-unauthorized-with-client-authenti

web service. Your URL will probably look like http servername sites SiteCollection SubSite _vti_bin Lists.asmx I named my.. listsWebSvc.Url http servername sites SiteCollection SubSite _vti_bin Lists.asmx XmlNode node.. the URL to the Lists.asmx service on your server Ex http servername sites SiteCollection SubSite _vti_bin Lists.asmx Click Go Click..

Crystal Reports for Visual Studio 2010 Error

http://stackoverflow.com/questions/4294762/crystal-reports-for-visual-studio-2010-error

report.Load path report.SetDatabaseLogon username password servername databasename rptViewer.ReportSource report On the report.Load..

C# '@' before a String [duplicate]

http://stackoverflow.com/questions/4879152/c-sharp-before-a-string

For example if you were working with a UNC path this @ servername share folder is nicer than this servername share folder share..

Get List of Users From Active Directory In A Given AD Group

http://stackoverflow.com/questions/513124/get-list-of-users-from-active-directory-in-a-given-ad-group

dc domain dc com With DNS prefix all three work LDAP servername ou ouname dc domain dc com LDAP servername.domain.com ou ouname.. three work LDAP servername ou ouname dc domain dc com LDAP servername.domain.com ou ouname dc domain dc com LDAP domain.com ou ouname..

SqlDataSourceEnumerator.Instance.GetDataSources() does not locate local SQL server 2008 instance

http://stackoverflow.com/questions/6824188/sqldatasourceenumerator-instance-getdatasources-does-not-locate-local-sql-serv

foreach DataRow source in sqlSources.Rows string servername string instanceName source InstanceName .ToString if string.IsNullOrEmpty.. .ToString if string.IsNullOrEmpty instanceName servername source InstanceName ' ' source ServerName else servername.. source InstanceName ' ' source ServerName else servername source ServerName Console.WriteLine Server Name 0 servername..

FileSystemWatcher Fails to access network drive

http://stackoverflow.com/questions/960318/filesystemwatcher-fails-to-access-network-drive

are pointing the watcher at the root share of the server servername which may not be a valid file system share I know it returns.. the watcher to a share beneath the root something like servername c would be a good test example if you have remote administrative..

Creating Virtual directory in IIS with c#

http://stackoverflow.com/questions/1243600/creating-virtual-directory-in-iis-with-c-sharp

new MSBuild.Community.Tasks.IIS.WebDirectoryCreate ServerName localhost VirtualDirectoryPhysicalPath websiteFolder.FullName..

How do you retrieve a list of logged-in/connected users in .NET?

http://stackoverflow.com/questions/132620/how-do-you-retrieve-a-list-of-logged-in-connected-users-in-net

IntPtr WTSOpenServer MarshalAs UnmanagedType.LPStr String pServerName DllImport wtsapi32.dll static extern void WTSCloseServer IntPtr.. ServerHandle public static void ListUsers String ServerName IntPtr serverHandle IntPtr.Zero List String resultList new List.. String resultList new List string serverHandle OpenServer ServerName try IntPtr SessionInfoPtr IntPtr.Zero IntPtr userPtr IntPtr.Zero..

Check if SQL server (any version) is installed?

http://stackoverflow.com/questions/2381055/check-if-sql-server-any-version-is-installed

Console.WriteLine Console.WriteLine Server Name row ServerName Console.WriteLine Instance Name row InstanceName Console.WriteLine..

SCOPE_IDENTITY in C# - range

http://stackoverflow.com/questions/3913115/scope-identity-in-c-sharp-range

resultOne 0 resultTwo 0 oCnn.ConnectionString Server ServerName Database DatabaseName Trusted_Connection true sSQL INSERT INTO..

List all virtual directories in IIS 5,6 and 7

http://stackoverflow.com/questions/3938467/list-all-virtual-directories-in-iis-5-6-and-7

improve this question have you tried using GetObject IIS ServerName W3SVC You do it in VBS like this 'Get the IIS Server Object.. this 'Get the IIS Server Object Set oW3SVC GetObject IIS ServerName W3SVC 1 ROOT For Each oVirtualDirectory In oW3SVC Set oFile..

How can I get an active UNC Path in DFS programatically

http://stackoverflow.com/questions/3938669/how-can-i-get-an-active-unc-path-in-dfs-programatically

in oObjectCollection sHostNames.Add oItem.Properties ServerName .Value.ToString return sHostNames Hope it makes sense share..

Can .NET load and parse a properties file equivalent to Java Properties class?

http://stackoverflow.com/questions/485659/can-net-load-and-parse-a-properties-file-equivalent-to-java-properties-class

by an equals sign and the value such as the following ServerName prod srv1 Port 8888 CustomProperty Any value In Java the Properties.. fis System.out.println myProperties.getProperty ServerName System.out.println myProperties.getProperty CustomProperty I.. row.Split ' ' .Skip 1 .ToArray Console.WriteLine data ServerName Edit Updated to reflect Paul's comment. share improve this..

Logoff interactive users in Windows from a service

http://stackoverflow.com/questions/5207506/logoff-interactive-users-in-windows-from-a-service

IntPtr WTSOpenServer MarshalAs UnmanagedType.LPStr String pServerName DllImport wtsapi32.dll static extern void WTSCloseServer IntPtr.. IntPtr WTSOpenServer MarshalAs UnmanagedType.LPStr String pServerName DllImport wtsapi32.dll static extern void WTSCloseServer IntPtr.. string args string input string.Empty Console.Write Enter ServerName Enter 0 to default to local input Console.ReadLine IntPtr server..

SqlDataSourceEnumerator.Instance.GetDataSources() does not locate local SQL server 2008 instance

http://stackoverflow.com/questions/6824188/sqldatasourceenumerator-instance-getdatasources-does-not-locate-local-sql-serv

instanceName Console.WriteLine Server Name 0 source ServerName Console.WriteLine Instance Name 0 source InstanceName Console.WriteLine.. instanceName servername source InstanceName ' ' source ServerName else servername source ServerName Console.WriteLine Server.. ' ' source ServerName else servername source ServerName Console.WriteLine Server Name 0 servername Console.WriteLine..

How To Change DataType of a DataColumn in a DataTable?

http://stackoverflow.com/questions/9028029/how-to-change-datatype-of-a-datacolumn-in-a-datatable

new System.Data.SqlClient.SqlConnection Data Source ServerName Initial Catalog DatabaseName Integrated Security SSPI Connect..