2008年3月26日 星期三
TransactionScope 之 timeout
2008年3月24日 星期一
Office 2007 轉存 PDF
2008年3月21日 星期五
Windows integration WCF config settings
2008年3月20日 星期四
此服務的安全性設定需要 Windows 驗證,但裝載此服務的 IIS 應用程式未啟用該驗證
2008年2月22日 星期五
db_owner 與 database owner
2008年2月20日 星期三
fire stored procedure and forget
Ado.net 好像沒有一個 ExecuteNoneQueryWithoutWaiting 的指令哦!
�好,SQL Server 2005 有一些功能。
建立一個Job,讓�Job 跑此stored procedure做為第一個 step。 再以 ado.net 執行此 stored procedure 即可。
EXEC msdb.dbo.sp_start_job @job_name = 'JobName'
2008年2月15日 星期五
Could not find a base address that matches scheme https for the endpoint with binding WSHttpBinding. Registered base address schemes are [http]
奇怪的是,我是使用 http://localhost/service/service.svc 來測試的,為何一直有 https 的出現呢?
設定如下:
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="WindowsBinding">
<security mode="Transport">
<transport clientCredentialType="Windows" proxyCredentialType="Windows" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="IssueTracking.IssueServiceBehavior">
<serviceMetadata httpGetEnabled="true"
httpsGetEnabled="false" />
<serviceDebug includeExceptionDetailInFaults="false" />
<serviceCredentials>
<windowsAuthentication includeWindowsGroups="true" allowAnonymousLogons="false" />
</serviceCredentials>
<serviceAuthorization />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="IssueTracking.IssueServiceBehavior"
name="IssueTracking.IssueService">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="WindowsBinding"
contract="IssueTracking.IIssueService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
</system.serviceModel>
後來,google 了很久,才漸漸覺的,這是微軟的設計。因為 web service 是不安全的,因此會要求走 SSL。
因此,改走 basciHttpBinding ,並改成<security mode="TransportCredentialOnly">
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="basicBinding">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" proxyCredentialType="Windows" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="IssueTracking.IssueServiceBehavior">
<serviceMetadata httpGetEnabled="true"
httpsGetEnabled="false" />
<serviceDebug includeExceptionDetailInFaults="false" />
<serviceCredentials>
<windowsAuthentication includeWindowsGroups="true" allowAnonymousLogons="false" />
</serviceCredentials>
<serviceAuthorization />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="IssueTracking.IssueServiceBehavior"
name="IssueTracking.IssueService">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicBinding"
contract="IssueTracking.IIssueService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
</system.serviceModel>
就ok 了