.NET ASP.Net 2.0 IIS

The page was not displayed because the request entity is too large. iis7

“The page was not displayed because the request entity is too large.”

 

I think this will fix the issue IF you have SSL enabled:

Setting uploadReadAheadSize in applicationHost.config file on IIS7.5 would resolve your issue in both cases. You can modify this value directly in applicationhost.config.

1) Select the site under Default Web Site

2) Select Configuration Editor

3) Within Section Dropdown, select “system.webServer/serverRuntime”

4) Enter a higher value for “uploadReadAheadSize” such as 1048576 bytes. Default is 49152 bytes.

During client renegotiation process, the request entity body must be preloaded using SSL preload. SSL preload will use the value of the UploadReadAheadSize metabase property, which is used for ISAPI extensions

Reference: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/7e0d74d3-ca01-4d36-8ac7-6b2ca03fd383.mspx?mfr=true

 

Code Snippets SQL Server Transact-SQL

DBCC SHRINKFILE (Transact-SQL)

A. Shrinking a data file to a specified target size

The following example shrinks the size of a data file named DataFile1 in the UserDB user database to 7 MB.


USE UserDB;
GO
DBCC SHRINKFILE (DataFile1, 7);
GO

B. Shrinking a log file to a specified target size

The following example shrinks the log file in the AdventureWorks database to 1 MB. To allow the DBCC SHRINKFILE command to shrink the file, the file is first truncated by setting the database recovery model to SIMPLE.


USE AdventureWorks2012;
GO
-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE AdventureWorks2012
SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (AdventureWorks2012_Log, 1);
GO
-- Reset the database recovery model.
ALTER DATABASE AdventureWorks2012
SET RECOVERY FULL;
GO

C. Truncating a data file

The following example truncates the primary data file in the AdventureWorks database. The sys.database_files catalog view is queried to obtain the file_id of the data file.


 

USE AdventureWorks2012;
GO
SELECT file_id, name
FROM sys.database_files;
GO
DBCC SHRINKFILE (1, TRUNCATEONLY);

D. Emptying a file

The following example demonstrates the procedure for emptying a file so that it can be removed from the database. For the purposes of this example, a data file is first created and it is assumed that the file contains data.


USE AdventureWorks2012;
GO
-- Create a data file and assume it contains data.
ALTER DATABASE AdventureWorks2012
ADD FILE (
NAME = Test1data,
FILENAME = 'C:\t1data.ndf',
SIZE = 5MB
);
GO
-- Empty the data file.
DBCC SHRINKFILE (Test1data, EMPTYFILE);
GO
-- Remove the data file from the database.
ALTER DATABASE AdventureWorks2012
REMOVE FILE Test1data;
GO

https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-shrinkfile-transact-sql

Code Snippets Networking NTP

Windows Domain and NTP Servers

Find your PDC Emulator

Get-ADDomainController -Discover -Service PrimaryDC

Transfer domain roles if needed

https://technet.microsoft.com/pt-pt/library/cc816944(v=ws.10).aspx

ntp Servers Pt

http://www.pool.ntp.org/zone/pt
pool.ntp.org

Set NTP

https://blogs.technet.microsoft.com/nepapfe/2013/03/01/its-simple-time-configuration-in-active-directory/

Using w32tm.exe

Run the following command on the PDC emulator:

w32tm /config /manualpeerlist:timeserver /syncfromflags:manual /reliable:yes /update

(where timeserver is a –space delimited– list of your time source servers)

Once done, restart W32Time service.

net stop w32time
net start w32time

Run the following command on all other DCs (that are not PDC):

w32tm /config /syncfromflags:domhier /update

Once done, restart W32Time service.

FIND DC’servers

PS   nltest /dclist:mydomain.local

 

Configurar o NTP no Linux
https://pplware.sapo.pt/linux/ntp-sincronize-o-relogio-do-seu-linux/

1- Vamos começar por instalar o ntp

yum install ntp

2- Agora activamos o serviço

chkconfig ntpd on

Indicação do servidor a usar para sincronizar o nosso relógio. Para esse vou usar um dos disponibilizados pelo Observatório Astronómico de Lisboa

ntpdate ntp02.oal.ul.pt

Nota: O Observatório Astronómico de Lisboa disponibiliza 2 servidores para configuração dos relógios. Quem pretender usar os dois deve editar o ficheiro /etc/ntp.conf e incluir a seguinte informação:

server ntp02.oal.ul.pt
server ntp04.oal.ul.pt

3- Iniciar o serviço do ntpd

/etc/init.d/ntpd start 
Code Snippets

Windows server 2K12R2 Second hard drive says write-protected

Find your PDC Emulator

Get-ADDomainController -Discover -Service PrimaryDC

Transfer domain roles if needed

https://technet.microsoft.com/pt-pt/library/cc816944(v=ws.10).aspx

ntp Servers Pt

http://www.pool.ntp.org/zone/pt
pool.ntp.org

Set NTP

https://blogs.technet.microsoft.com/nepapfe/2013/03/01/its-simple-time-configuration-in-active-directory

Using w32tm.exe

Run the following command on the PDC emulator:

w32tm /config /manualpeerlist:timeserver /syncfromflags:manual /reliable:yes /update

(where timeserver is a –space delimited– list of your time source servers)

Once done, restart W32Time service.

net stop w32time
net start w32time

Run the following command on all other DCs (that are not PDC):

w32tm /config /syncfromflags:domhier /update

Once done, restart W32Time service.

FIND DC servers

PS C:\Users\Administrador> nltest /dclist:mydomain.local
Tips & tricks Utils

Lista com compilação de algumas entidades de multibanco úteis:

omo saber a quem pertence uma entidade / referência MB de pagamento de serviços?

read more »

Code Snippets SQL

MySQL DATE_FORMAT

DATE_FORMAT(date,format)

%a    Abbreviated weekday name (Sun-Sat)
%b    Abbreviated month name (Jan-Dec)
%c    Month, numeric (0-12)
%D    Day of month with English suffix (0th, 1st, 2nd, 3rd, ?)
%d    Day of month, numeric (00-31)
%e    Day of month, numeric (0-31)
%f    Microseconds (000000-999999)
%H    Hour (00-23)
%h    Hour (01-12)
%I    Hour (01-12)
%i    Minutes, numeric (00-59)
%j    Day of year (001-366)
%k    Hour (0-23)
%l    Hour (1-12)
%M    Month name (January-December)
%m    Month, numeric (00-12)
%p    AM or PM
%r    Time, 12-hour (hh:mm:ss followed by AM or PM)
%S    Seconds (00-59)
%s    Seconds (00-59)
%T    Time, 24-hour (hh:mm:ss)
%U    Week (00-53) where Sunday is the first day of week
%u    Week (00-53) where Monday is the first day of week
%V    Week (01-53) where Sunday is the first day of week, used with %X
%v    Week (01-53) where Monday is the first day of week, used with %x
%W    Weekday name (Sunday-Saturday)
%w    Day of the week (0=Sunday, 6=Saturday)
%X    Year for the week where Sunday is the first day of week, four digits, used with %V
%x    Year for the week where Monday is the first day of week, four digits, used with %v
%Y    Year, numeric, four digits
%y    Year, numeric, two digits

The following script uses the DATE_FORMAT() function to display different formats. We will use the NOW() function to get the current date/time:

DATE_FORMAT(NOW(),’%b %d %Y %h:%i %p’)
DATE_FORMAT(NOW(),’%m-%d-%Y’)
DATE_FORMAT(NOW(),’%d %b %y’)
DATE_FORMAT(NOW(),’%d %b %Y %T:%f’)

The result would look something like this:

Nov 04 2014 11:45 PM
11-04-2014
04 Nov 14
04 Nov 2014 11:45:34:243

Azure Microsoft Office365

Azure Password Sync

Check your synchronization user security tab, or in domain properties if “Replicating Directory Changes” and “Replicating Directory Changes All” is checked.

Microsoft Windows server

OEM Windows Server 2016 Core Licensing Calculator

Below you will find a link to the OEM licensing calculator for Windows Serer 2016 Standard and Datacenter.

OEM Windows Server 2016 Core Licensing Calculator (.XLSX)

Uncategorized

Secret Codes for Android Phones

The main functionality of having secret codes hidden within a mobile device was originally intended for the employees of the respective devices to trouble shoot and perform procedures. Yet now, living in a digital world, everyone has access to this information.

read more »

Microsoft Windows server

How to setup Active Directory (AD) In Windows Server 2016

Windows server 2016 is the upcoming server operating system from Microsoft scheduled to be release sometime around the 3rd quarter of 2016. In this tutorial I will go through step by step on how to install the Active Directory ( AD ) role on Windows Server 2016. If you are setting up the server for production is recommended to set a static IP address on the server before you start the AD installation. Also before you start the AD installation, rename the server now if you need to, once you have installed the AD role on the server, it is not easy to change the name without breaking a lots of things.

read more »