CodeCloudy

Azure | .Net | JQuery | Javascript | Umbraco

Easiest way to fix the svn icon overlay issue in windows 10

Rub below command Script:

https://gist.github.com/HelderMagalhaes/37ca7bbdba2b693006c46df1d8481705

Advertisements
Leave a comment »

Log Everything in a complex object C#

Download and add reference of this dll > Newtonsoft.Json.dll or Json.NET

use below method to log the entire complex object:

public static string ToJson(object value)
{

var settings = new JsonSerializerSettings
{
ReferenceLoopHandling = ReferenceLoopHandling.Ignore
};

return JsonConvert.SerializeObject(value, Newtonsoft.Json.Formatting.Indented, settings);

}

Leave a comment »

Request.Url

Get Only the Domain with protocol. in simple words base or first part of it.

String strPathAndQuery = HttpContext.Current.Request.Url.PathAndQuery;
String strUrl = HttpContext.Current.Request.Url.AbsoluteUri.Replace(strPathAndQuery, “/”);

Other Tips from Stackoverflow:

Main URL : http://localhost:8080/mysite/page.aspx?p1=1&p2=2

Get different parts of URL in C#.

Value of HttpContext.Current.Request.Url.Host
localhost

Value of HttpContext.Current.Request.Url.Authority
localhost:8080

Value of HttpContext.Current.Request.Url.AbsolutePath
/mysite/page.aspx

Value of HttpContext.Current.Request.ApplicationPath
/mysite

Value of HttpContext.Current.Request.Url.AbsoluteUri
http://localhost:8080/mysite/page.aspx?p1=1&p2=2

Value of HttpContext.Current.Request.RawUrl
/mysite/page.aspx?p1=1&p2=2

Value of HttpContext.Current.Request.Url.PathAndQuery
/mysite/page.aspx?p1=1&p2=2
Leave a comment »

Umbraco admin login doesn’t work after migrating Live to Local

Umbraco admin login doesn’t work after migrating Live to Local

Since, The schema is different, can’t login. simply change it for the user.

 

Leave a comment »