Exceptionless install some pit

zero. Reference website:

https://www.cnblogs.com/zgshi/p/9152196.html presentation on garden blog. Basically it describes how to install and put on top of IIS.

https://www.cnblogs.com/xiaobai123/p/9238415.html ExceptionLess above series expansion method

One. Installation Precautions

1. When first installed in accordance with the document, in fact, being given command execution Start.bat then the first link in the method can be solved. Start.bat which is the implementation of the Start-ElasticSearch.ps1 and Start-Website.ps1 command. Downloads elasticsearch-5.5.2 and kibana. The former is Exceptionless stored data.

wps1

2. When the site to IIS installed above, to start elasticsearch-service.bat server. Command line cmd in the current directory. Execution elasticsearch-service.bat install and elasticsearch-service.bat start. Check whether the service is run successfully in service.msc (service) in. Results as shown.

wps2

wps3

When running success can directly access http: // localhost: 9200 / The default port 9200. IIS can access normal.

wps4

two. Add items in the Exceptionless

1. Add Item

wps5

You can have multiple projects under one organization.

wps6

Click on Add project. Substantially into the page as selected or MVC WebApi. Similar in two ways.

wps7

如果为Mvc的话,首先要通过NuGet获取Exceptionless.Mvc的dll。然后再web.config添加配置。Apikey就是网站生产的apikey。然后serverurl为Exceptionless网站。

wps8

wps9

如果为WebApi。还是加入相同的配置。然后再webaiConfig中注册。

wps10

wps11

ex.ToExceptionless().Submit()。这可以再catch中使用这个,代码意思就是将异常发送到网站中。

三.本地运行ok部署到服务器上面的坑

1. 在安装Exceptionless的时候其实要先启动elasticsearch.bat。为了让启动方便,也提供了elasticsearch-service作为windows本地运行服务的方案。操作也很简单 在目录下 执行elasticsearch-service.bat install 便可以。但是我运行的时候报了命令语法不正确的。然后用编辑器打开了elasticsearch-service.bat的文件。将第一行注释掉去,命令便可以一条一条执行。对于bat文件调试技巧可以去百度搜索。

wps12

后来发现,原来是目录里面有括号 导致找不到文件。然后把目录改正确,又发现没有JAVA_HOME的系统变量批处理文件找不到。但我服务器是已经安装了的。所有我来了一个骚操作。直接将JAVA_HOME这个变量写死。然后服务便正常安装上去了。

wps13

效果如下,默认可以通过localhost:9200访问 。效果如下则为成功

wps14

wps15

2. 本地部署的时候使用的都使用的localhost。这里特别要注意。现在有两个网站都要改成对应的服务器ip。一个是exceptionLess的网站 localhost:50000 和elasticsearch的localhost:9200。 总共改三个地方。

修改elasticsearch:

wps16

Network.host:XXXX (服务器的ip)

wps17

Exceptionless: To modify these two files

wps18

Mosaic places is the server ip

wps19

The first place is modified corresponding elasticsearch IP address. The second is Base_URL.


Modified correspondence relationship: http://www.fwhyy.com/2016/09/use-exceptionLess/ details see here.

3. If it is, then Ali cloud, but also about security groups and firewall configuration.

Guess you like

Origin www.cnblogs.com/shaoqi/p/11752348.html