Tag Archives: rear end

Exchange 2016 OWA login exception

today, I received an alert message from the script. There is an Exchange server OWA that cannot log in!

did a manual test and found a real problem with the following error message:

check the logs for this server and find the following information

1. The request to access OWA has received 500 internal server error at the HTTP level (error refers to the OWA backend problem)


(2) POST /owa/auth.owa & ClientId=D743AEEDADF24394B3932A43FD81A704& CorrelationID=< empty>; & cafeReqId=4d419796-dfb2-4242-bfc3-33558bd9c81c; & encoding=; 443 test0001 127.0.0.1 Mozilla/5.0 + + Windows NT + 6.3; +WOW64; Trident +/7.0; + the rv: 11.0) + + Gecko like https://localhost/owa/auth/logon.aspx?replaceCurrent=1& ureason=5& reason=0 302 0 0 0

2018-10-19 02:377.0.0.1 GET /owa & ClientId=D743AEEDADF24394B3932A43FD81A704& CorrelationID=< empty>; & ClientRequestId=636755132782181904& cafeReqId=62c96cbe-fa86-42dd-afde-30ba14ededb5; & encoding=; 443 test0001 127.0.0.1 Mozilla/5.0 + + Windows NT + 6.3; +WOW64; Trident +/7.0; + the rv: 11.0) + + Gecko like https://localhost/owa/auth/logon.aspx?replaceCurrent=1& ureason=5& reason=0 500 0 0 31

2, then get the OWA terminal display error

NegotiateSecurityContext failed with for host ‘bjmail6.sohu-inc.com’ with status ‘LogonDenied’

3. Check the Event log

Event ID 1309 is from the Web Event of ASP.NET 4.0.30319.0, the specific information is as follows (the author selects the problem section for demonstration)

through the analysis of the log, I found that Thread account name was actually my domain account, which is obviously wrong, the correct one should be the SYSTEM account

by the above three concludes that the problem should be Exchange, OWA problem back-end IIS virtual directory

check my IIS configuration

found the problem, OWA’s physical path credentialis actually my account, the correct configuration here is

reconfigure and restart IIS or OWA application pool. After the restart, test again and find that the user can access normally. After observation for a period of time, the above problem log does not appear again, and then the problem is considered to be solved successfully.

reproduced in: https://www.cnblogs.com/zhr1217/p/9835445.html

How to compare the equality of structures in golang

if the object is created by the same struct without complex type can be directly used by == on the ratio and pointer

Simple type

sortable data type

Integer
Floating point
String

data type that can be compared

in addition to the above three, there are
Boolean,
Complex,
Pointer,
Channel,
Interface
Array

complex non-comparable data type

Slice
Map
Function

as follows

type User struct {
	age  int
	name string
}

func main() {
	user := User{
		1,
		"d",
	}
	user2 := User{
		1,
		"d",
	}
	fmt.Println(user == user2)  //打印的结果是true 会去自动对比内部的属性是否相等
	//但是如果结构体内部含有map,slice,Function 使用==比较编译会报错
}

the == operator
example

can be used if two objects that are not created in the same structure can be converted to each other and do not contain non-comparable member variables

type USER struct {
	age  int
	name string
	u    Name
}
type Name struct {
	a string
}
type USER2 struct {
	age  int
	name string
	u    Name
}

func main() {
	user := USER{
		1,
		"d",
		Name{""},
	}
	user3 := USER2{
		1,
		"d",
		Name{""},
	}
	user2 := USER(user3)
	fmt.Println(user2 == user) //编译通过 打印结果是true
}

refer to official document