2019年5月25日 星期六
2019年5月22日 星期三
[WCF] 使用 svcutil.exe 產生合約 Client 程式碼
https://dotblogs.com.tw/yc421206/2013/10/24/125428
C:\temp>svcutil /target:code net.tcp://localhost:5000/IHelloWCF/Mex
https://www.cnblogs.com/tianzhiliang/archive/2011/08/09/2132532.html
C:\temp>svcutil /target:code net.tcp://localhost:5000/IHelloWCF/Mex
https://www.cnblogs.com/tianzhiliang/archive/2011/08/09/2132532.html
2019年5月21日 星期二
WebServiceHost有何特别之处?
https://www.cnblogs.com/artech/archive/2012/02/08/WebServiceHost.html
WebServiceHost是ServiceHost的子类,而WebServiceHostFactory是对应的ServiceHostFactory
WebServiceHost是ServiceHost的子类,而WebServiceHostFactory是对应的ServiceHostFactory
2019年5月19日 星期日
使用 Elmah 來記錄 ASP.NET 網站的錯誤
https://www.huanlintalk.com/2013/02/something-about-elmah-error-logging.html
https://blog.miniasp.com/post/2013/03/12/ASPNET-MVC-4-and-ELMAH-Integration
<sectionGroup name="elmah">
<section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" />
<section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" />
<section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" />
<section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" />
</sectionGroup>
上面區塊宣告的要加入Web.config否則解析xml會認不得<elmah>
https://blog.miniasp.com/post/2013/03/12/ASPNET-MVC-4-and-ELMAH-Integration
<sectionGroup name="elmah">
<section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" />
<section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" />
<section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" />
<section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" />
</sectionGroup>
上面區塊宣告的要加入Web.config否則解析xml會認不得<elmah>
| 錯誤碼 | 0x80070032 |
|---|
| 設定錯誤 | 無法讀取設定區段 'elmah',因為它缺少區段宣告 |
|---|
設定來源:
125: </system.data>
126: <elmah>
127: <errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data/Elmah.Errors" />
2019年5月18日 星期六
ASP.NET移轉到ASP.NET Core-取得 Request URL 的各個部分
https://sites.google.com/site/netcorenote/asp-net-core/get-scheme-url-host
asp.net原本用Request.Url 在Core大部分需要改使用Context.Request
Microsoft.AspNetCore.Http.Extensions.UriHelper.GetDisplayUrl(Request) => http://localhost:60467/Home/About
【Request.Url.Scheme】Context.Request.Scheme => http
【Request.Url.Host】Context.Request.Host.Host => localhost
【Request.Url.Authority】Context.Request.Host.Value => localhost:60467
【Request.Url.LocalPath】Context.Request.Path => /Home/About
【Request.Url.Port】Context.Request.Host.Port => 60467
ASP.NET 如何取得 Request URL 的各個部分
https://blog.miniasp.com/post/2008/02/10/How-Do-I-Get-Paths-and-URL-fragments-from-the-HttpRequest-object
ASP.NET內抓取網址的方式一覽表(Request)
https://demo.tc/Post/230
asp.net原本用Request.Url 在Core大部分需要改使用Context.Request
Microsoft.AspNetCore.Http.Extensions.UriHelper.GetDisplayUrl(Request) => http://localhost:60467/Home/About
【Request.Url.Scheme】Context.Request.Scheme => http
【Request.Url.Host】Context.Request.Host.Host => localhost
【Request.Url.Authority】Context.Request.Host.Value => localhost:60467
【Request.Url.LocalPath】Context.Request.Path => /Home/About
【Request.Url.Port】Context.Request.Host.Port => 60467
ASP.NET 如何取得 Request URL 的各個部分
https://blog.miniasp.com/post/2008/02/10/How-Do-I-Get-Paths-and-URL-fragments-from-the-HttpRequest-object
ASP.NET內抓取網址的方式一覽表(Request)
https://demo.tc/Post/230
.NET Core迁移续集Win下莫名其妙的超时
https://mp.weixin.qq.com/s/23dFe5Kbe3ES8X1jH80B4w
无论你是new一个静态HttpClient还是通过HttpClientFactory去创建HttpClient,记得要将UseProxy=false
无论你是new一个静态HttpClient还是通过HttpClientFactory去创建HttpClient,记得要将UseProxy=false
訂閱:
文章 (Atom)