SERVERPROPERTY('ProductVersion') as ProductVersion,
SERVERPROPERTY('ProductLevel') as ProductLevel,
SERVERPROPERTY('Edition') as Edition
In my case, enabling the guest account and adding
Everyone did not help (with a share on an older box with Windows Server 2008 SP2 in a domain and a Windows Server 2012 R2 machine from outside of the domain).
After following the excellent guide posted by Nikola Radosavljevic, anonymous access finally worked in my scenario.
Summary of steps:
|
cd\Windows\Microsoft.NET\Framework64\v4.0.30319
aspnet_regiis.exe -iru
public class AddressComponent
{
public string long_name { get; set; }
public string short_name { get; set; }
public List<string> types { get; set; }
}
public class Bounds
{
public Location northeast { get; set; }
public Location southwest { get; set; }
}
public class Location
{
public double lat { get; set; }
public double lng { get; set; }
}
public class Geometry
{
public Bounds bounds { get; set; }
public Location location { get; set; }
public string location_type { get; set; }
public Bounds viewport { get; set; }
}
public class Result
{
public List<AddressComponent> address_components { get; set; }
public string formatted_address { get; set; }
public Geometry geometry { get; set; }
public bool partial_match { get; set; }
public List<string> types { get; set; }
}
public class RootObject
{
public List<Result> results { get; set; }
public string status { get; set; }
}
var root = JsonConvert.DeserializeObject<RootObject>(result);
foreach (var singleResult in root.results)
{
var location = singleResult.geometry.location;
var latitude = location.lat;
var longitude = location.lng;
// Do whatever you want with them.
}
|
Other way is using of built-in method start timer & event TimerEvent.
Header:
Source:
|
sudo apt-get install xinetd tftpd tftp
service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no
}
sudo mkdir /tftpboot
sudo chmod -R 777 /tftpboot
sudo chown -R nobody /tftpboot
sudo /etc/init.d/xinetd restart