public string IP()
{
string ip = ""
if (HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"] != null)
{
ip = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
if (!string.IsNullOrEmpty(ip))
{
string[] ipRange = ip.Split(",".ToCharArray());
ip = ipRange[0];
}
}
if (string.IsNullOrEmpty(ip))
if (HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"] != null)
ip = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"].ToString();
ip = ip.Trim();
return ip;
}
APPCMD:
appcmd is an IIS tool used to manage IIS server. It provides many functions that can be used to manager server related activities like create/configure sites, start/recycle/stop app pools, etc.
Retrieve Password of an App Pool identity account:
-
To retrieve password for an app pool identity account, open the command prompt in administrative mode.
-
Navigate to C:\Windows\System32\inetsrv directory. This is the location where appcmd.exe exists.
-
Type the below command and press enter.
appcmd.exe list apppool <<app_pool_name>> /text:*
For example: I have an app pool in my IIS named SampleAppPool which has been assigned a particular account’s identity whose password I would like to retrieve. So I would enter the below command in command prompt.
-
Press enter and the result will be as shown below. Due to security reasons, I have removed the username and password from the image but trust me, it shows the username and password there.
Referance: https://amoghnatu.net/2015/01/15/get-password-for-iis-application-pool-account/
Yazdığınız script’i kaydetmeden sildiniz mi?
Management strudio’nu hata verip kapandı ve satırlarca sql’inizi recover edemiyor musunuz?
Temp dosyalarda bulamadınız mı?
Script’inizi bir defa çalıştırdıysanız üzülmeyin, hala kurtarabilirsiniz
Nasıl mı?
Şöyle;
use [DBName]
go
select execquery.last_execution_time as [Date Time], execsql.text as [Script]
from sys.dm_exec_query_stats as execquery
CROSS APPLY sys.dm_exec_sql_text(execquery.sql_handle) AS execsql
where convert(date,execquery.last_execution_time)='20170808'
order by execquery.last_execution_time
Tüm veri tabanları hakkında başvuru kaynağı için kullanılır.
http://www.veritabani.gen.tr/