CodeCloudy

Azure | .Net | JQuery | Javascript | Umbraco

Use a proxy with filezilla

Step 1: Download & Setup Tor Browser

Step 2: Follow below video

Tips: try the netstat command until you find port for 127.0.0.1. for me 127.0.0.1 & port 9151 worked

Advertisements
Leave a comment »

Umbraco Must

  1. Get Rid Of Ugley Page Not Found Page

http://jondjones.com/learn-umbraco-cms/umbraco-developers-guide/how-to-configure-umbraco/how-to-create-a-404-page-in-umbraco-7


2. Sometimes, the 404 redirect doesn’t work that can be setup using the url tracker in umbraco.

so, the reason was below: the RedirectRootNodeId needs to be valid. the main root.

aa.JPG

 

Leave a comment »

Visual Studio 2017 Adjustments

https://www.johanbostrom.se/blog/how-to-disable-the-built-in-chrome-from-starting-when-debugging-in-visual-studio-2017

 

https://stackoverflow.com/questions/8311303/cannot-obtain-value-of-local-or-argument-as-it-is-not-available-at-this-instruct

Leave a comment »

Capture Dynamic value change in Elements using on change

 

$(‘#abc2’).on(‘change’, function(){
$(‘#abc1’).val($(this).val())
})

$(‘#abc1’).on(‘change’, function(){
alert(‘1’)
})

var originalVal = $.fn.val;
$.fn.val = function(){
var result =originalVal.apply(this,arguments);
if(arguments.length>0)
$(this).change(); // OR with custom event $(this).trigger(‘value-changed’);
return result;
};

 

http://jsfiddle.net/aw1htjzo/

Leave a comment »

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

Rub below command Script:

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

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.

 

But, in 3rd party hosted remote sql servers where you have less control over, it’s difficult to do this change.

now the user is trying to login using the schema dbo, but the database migrated is having a custom schema. due to this the login can’t access any tables of the database. so, it will continuously give the error invalid object.

in that case, below script is a life saver :

REPLACE BELOW OLDSCHEMA with your old schema.

SELECT ‘ALTER SCHEMA dbo TRANSFER ‘ + s.Name + ‘.’ + o.Name
FROM sys.Objects o
INNER JOIN sys.Schemas s on o.schema_id = s.schema_id
WHERE s.Name = ‘OLDSCHEMA’
And (o.Type = ‘U’ Or o.Type = ‘P’ Or o.Type = ‘V’)

 

you will get below result. and copy and paste in a sql query and execute. Now, all should be good.

ALTER SCHEMA dbo TRANSFER socialse_care.cmsTagRelationship
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoUser
ALTER SCHEMA dbo TRANSFER socialse_care.cmsTaskType
ALTER SCHEMA dbo TRANSFER socialse_care.cmsTask
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoNode
ALTER SCHEMA dbo TRANSFER socialse_care.cmsContentType
ALTER SCHEMA dbo TRANSFER socialse_care.cmsContentType2ContentType
ALTER SCHEMA dbo TRANSFER socialse_care.cmsContentTypeAllowedContentType
ALTER SCHEMA dbo TRANSFER socialse_care.cmsTemplate
ALTER SCHEMA dbo TRANSFER socialse_care.cmsContent
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoUser2NodeNotify
ALTER SCHEMA dbo TRANSFER socialse_care.cmsContentVersion
ALTER SCHEMA dbo TRANSFER socialse_care.cmsDocument
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoServer
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoAccess
ALTER SCHEMA dbo TRANSFER socialse_care.cmsDocumentType
ALTER SCHEMA dbo TRANSFER socialse_care.cmsDataType
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoAccessRule
ALTER SCHEMA dbo TRANSFER socialse_care.cmsDataTypePreValues
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoCacheInstruction
ALTER SCHEMA dbo TRANSFER socialse_care.cmsDictionary
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoExternalLogin
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoLanguage
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoMigration
ALTER SCHEMA dbo TRANSFER socialse_care.cmsLanguageText
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoRedirectUrl
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoDomains
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoLock
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoLog
ALTER SCHEMA dbo TRANSFER socialse_care.cmsMacro
ALTER SCHEMA dbo TRANSFER socialse_care.cmsMacroProperty
ALTER SCHEMA dbo TRANSFER socialse_care.UCUserSettings
ALTER SCHEMA dbo TRANSFER socialse_care.cmsMemberType
ALTER SCHEMA dbo TRANSFER socialse_care.cmsMember
ALTER SCHEMA dbo TRANSFER socialse_care.cmsMember2MemberGroup
ALTER SCHEMA dbo TRANSFER socialse_care.cmsContentXml
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoUserGroup
ALTER SCHEMA dbo TRANSFER socialse_care.cmsPreviewXml
ALTER SCHEMA dbo TRANSFER socialse_care.cmsPropertyTypeGroup
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoUser2UserGroup
ALTER SCHEMA dbo TRANSFER socialse_care.cmsPropertyType
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoUserGroup2App
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoUserGroup2NodePermission
ALTER SCHEMA dbo TRANSFER socialse_care.cmsPropertyData
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoUserStartNode
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoRelationType
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoRelation
ALTER SCHEMA dbo TRANSFER socialse_care.cmsTags

 

 

Leave a comment »

Umbraco Life Savers

Error:

The model item passed into the dictionary is of type ‘Umbraco.Web.Models.PartialViewMacroModel’, but this dictionary requires a model item of type ‘CWSStart.Web.Models.LoginViewModel’.

Solution:

http://stackoverflow.com/questions/28708282/this-dictionary-requires-a-model-item-of-type-umbraco-web-models-partialviewmac

The issue was that another member of my team had created a Banner.cshtml file in /Views/MacroPartials and this Partial View was being loaded instead of my one.

My case:

i had a view with the same name on the AuthSurface folder and in the views folder.

 

Leave a comment »

IIS

Services that make up the IIS 7 Web server include:

Service

Display Name

Description

Executable

Default Startup

AppHostSVC

Application Host Helper Service

Stores configuration history and application pool mapping in history subdirectories at set intervals.

svchost.exe

Automatic

FTPSVC

FTP Publishing Service

Enables IIS 7 Web servers to be File Transfer Protocol (FTP) servers.

svchost.exe

Manual

IISADMIN

IIS Admin Service

For IIS 6.0 metabase configuration compatibility

inetinfo.exe

Automatic

MSFTPSVC

FTP Publishing Service 6

Enables IIS 6 Web servers to be File Transfer Protocol (FTP) servers.

inetinfo.exe

Manual

W3SVC

World Wide Web Publishing Service

Provides Web connectivity and administration through IIS Manager

svchost.exe

Automatic

WAS

Windows Process Activation Service

Provides process activation, resource and health management services for message-activated applications.

svchost.exe

Manual

WMSVC

Web Management Service

Enables remote management of a Web server.

wmsvc.exe

Manual

To troubleshoot and manage services you can use the Services snap-in to the Microsoft Management Console. The MMC Services snap-in has feature for:

  • Monitoring the status of services.
  • Starting, stopping, pausing and resuming, or disabling services.
  • Viewing service properties and dependencies.
  • Setting up recovery actions to deal with service failures.

https://blogs.iis.net/tomwoolums/the-services-behind-internet-information-services-7-0

Leave a comment »