我错过了一些明显的东西.你如何将.dll放在安装目录下名为"bin"的子目录中?我正在尝试按照本教程:http: //www.tramontana.co.hu/wix/lesson5.php#5.3 来部署WCF Web服务.所以我需要复制.svc文件和.bin文件,以及其他一些文件,但从这两个文件开始.我在Visual Studio下使用Wix 3.5.
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLLOCATION" Name="TFBIC.RCT.WCFWebServicesWIXSetup">
<Component Id="ProductComponent" Guid="E9A375FB-DF6A-4806-8B0B-03BE4A50802F">
<File Id='SVC1' Name='CreateUpdateReturnService.svc' DiskId='1' Source='../TFBIC.RCT.WCFWebServices/CreateUpdateReturnService.svc' />
</Component>
</Directory>
<Directory Id="INSTALLLOCATION" Name="TFBIC.RCT.WCFWebServicesWIXSetup">
<Component Id="ProductComponent" Guid="E9A375FB-DF6A-4806-8B0B-03BE4A50802F">
<File Id='DLL1' Name='TFBIC.RCT.WCFWebServices.dll' DiskId='1' Source='../TFBIC.RCT.WCFWebServices/bin/TFBIC.RCT.WCFWebServices.dll' />
</Component>
</Directory>
</Directory>
<Component Id='TestWebVirtualDirComponent' Guid='9586807E-9065-48e8-8E73-13A9191962E5'>
<iis:WebVirtualDir Id='TestWebVirtualDir' Alias='Test' Directory='InstallDir'
WebSite='DefaultWebSite'>
<iis:WebApplication Id='TestWebApplication' Name='Test' />
</iis:WebVirtualDir>
</Component>
</Directory>
Run Code Online (Sandbox Code Playgroud)
我尝试将\ bin放在ID和name属性上,它也不喜欢(无效字符).
另外,使用IIS,是在c:\ program files或c:\ inetpub\wwwroot中安装的最佳实践?如何将默认目录切换到c:\ inetpub\wwwroot\myproj?
这些是我用WiX进行的各种首次实验.
什么是临时增加字体大小,然后返回正常(不使用CSS,或者CSS是更好的方法?)的新"样式"方式.
我想在我的文本中插入一个希伯来语单词,对于初学者来说,希伯来语字体太小了.我总是希望它比当前的字体大小更大,而不是固定到某个特定的大小.
下面的第1行工作(旧的做事方式).第2行的修复是什么?
This is normal. <font size="+2">bigger</font> back to norm.
<span style='{FONT-SIZE: +2}'> and also bigger</span>.
Run Code Online (Sandbox Code Playgroud) 我从BizTalk服务器调用存储过程并尝试调试它.
1)当外部进程调用存储过程时使用SQL调试器 2)使sp_tracegenerateevent在存储过程中工作
我一直在使用SQL Profiler作为我唯一的工具来了解发生了什么.但现在,我怀疑我的尝试/捕获是否正常工作.代码在SSMS中运行时工作正常,但是从BizTalk运行时有时看起来像try/catch一直在捕获.
ALTER PROCEDURE WhatItsName
@CatchErrors varchar(max) OUTPUT
AS
BEGIN
SET NOCOUNT ON;
SET XACT_ABORT OFF;
DECLARE @debugMessage varchar(max) = ''
DECLARE @RowCreateBy VARCHAR (100)
SET @RowCreateBy = '108004'
BEGIN TRY
SET @RowCreateBy = '108005'
END TRY
BEGIN CATCH
SET @debugMessage = 'set @RowCreatedBy Failed - how can this be ??? '
END CATCH
etc...
Run Code Online (Sandbox Code Playgroud)
基于我们在上面的探查器中看到的,我的try/catch是否按预期工作?
现在,当我从SSMS运行相同的存储过程时,就像"正常"一样.
BizTalk在DTC交易下运行所有内容.请注意,"BEGIN TRY"和"END TRY"语句显示在SSMS下的第二个配置文件中(并且"BEGIN CATCH"未按预期触发),并且它们不会显示在上面的第一个配置文件中(其中包含sproc)从BizTalk执行).
然后我在SSMS中的测试脚本中添加了"BEGIN DISTRIBUTED TRANSACTION",与上面的其他SSMS测试结果相同.
注意:我注意到这个模式有一个更复杂的问题,并希望简化它以便发布在这里.
是否有更聪明的方法来删除所有特殊字符而不是一系列约15个嵌套替换语句?
以下工作,但只处理三个字符(&符号,空白和句点).
select CustomerID, CustomerName,
Replace(Replace(Replace(CustomerName,'&',''),' ',''),'.','') as CustomerNameStripped
from Customer
Run Code Online (Sandbox Code Playgroud) $BizTalkHelper = "d:\Scripts\BizTalkHelper.ps1"
.$BizTalkHelper # "dot source" the helper library.
Write-Host *** BEGIN ***
Write-Host $(Get-Date) " Desc:" {GetHostStateDesc 1 }
Write-Host $(Get-Date) " Desc:" GetHostStateDesc 2
$result = GetHostStateDesc 1
Write-Host $result
Run Code Online (Sandbox Code Playgroud)
我的函数打印"你好",除了一个switch语句将1翻译为'Stopped',2翻译为'Start Pending',4翻译为'Running'等等...所以我知道它在前两个案例中没有被调用.
结果:
*** BEGIN ***
3/29/2013 11:03:34 AM Desc: GetHostStateDesc 1
3/29/2013 11:03:34 AM Desc: GetHostStateDesc 2
hello
Function GetHostStateDesc 1
Stopped
Run Code Online (Sandbox Code Playgroud) 有没有办法添加DATE_CREATED列,比如只有新行才能获取默认的sysdate?当我运行下面的ALTER时,所有先行行都将DATE_CREATED设置为ALTER脚本的运行时间; 我希望它们保持为空.
alter table abc.mytable
add
(DATE_CREATED date default sysdate null
);
Run Code Online (Sandbox Code Playgroud) 类定义如下:
public class BizTalkRESTTransmitHandler : IClientMessageInspector
Run Code Online (Sandbox Code Playgroud)
我是这个签名的方法:
public object BeforeSendRequest(ref Message request, IClientChannel channel)
Run Code Online (Sandbox Code Playgroud)
所以我认为我需要操纵通道对象.
原因是这是在BizTalk 2010 SendPort中使用以支持JSON.到目前为止我试过这个:
if (channel.RemoteAddress.Uri.AbsoluteUri == "http://api-stage2.mypartner.com/rest/events/2/"
|| channel.RemoteAddress.Uri.AbsoluteUri == "http://api.mypartner.com/rest/events/2/")
{
//TODO - "boxout" will become a variable obtained by parsing the message
Uri newUri = new Uri(channel.RemoteAddress.Uri.AbsoluteUri + "boxout");
channel.RemoteAddress.Uri = newUri;
}
Run Code Online (Sandbox Code Playgroud)
上面给出了编译错误:"System.ServiceModel.EndpointAddress.Uri"无法分配给它 - 它只是就绪"RemoteAddress似乎也是只读的.
我引用了这些问题,但他们没有使用频道对象. 指定一个URL来Url.AbsoluteUri在ASP.NET和 WCF在运行时更改端点地址 ,但他们似乎没有被处理的通道对象.
更新1:我尝试了以下内容:
//try create new channel to change URL
WebHttpBinding myBinding = new WebHttpBinding();
EndpointAddress myEndpoint = new EndpointAddress(newURL);
ChannelFactory<IClientChannel> myChannelFactory = new …Run Code Online (Sandbox Code Playgroud) 我在https://forums.aws.amazon.com/thread.jspa?threadID=53629找到了以下代码:
AmazonSimpleNotificationService sns = AWSClientFactory.CreateAmazonSNSClient(key, secret);
PublishRequest req = new PublishRequest();
req.WithMessage("This is my test message");
req.WithSubject("The Test Subject");
req.WithTopicArn(topicArn);
PublishResponse result = sns.Publish(req);
Run Code Online (Sandbox Code Playgroud)
但是它在.NET Core中有效吗?如果是这样,用什么语句?
我用这个Nuget安装:
Install-Package AWSSDK.SimpleNotificationService -Version 3.3.0.23
Run Code Online (Sandbox Code Playgroud)
方法完全不同吗?刚刚使用Intellisense,我发现:
var req = new AmazonSimpleNotificationServiceRequest();
var client = new AmazonSimpleNotificationServiceClient();
Run Code Online (Sandbox Code Playgroud)
但需要.没有显示任何属性.
我试过在这里搜索:https://docs.aws.amazon.com/sdkfornet/v3/apidocs/Index.html 但它说的是"该服务目前无法使用.请在一段时间后再试一次." (所以是的,我会稍后再试,但不确定它会不会有我想要的东西).
--- Update 10/30 - 这是AmazonSimpleNotificationServiceRequest()类的唯一发布方法

--- 10月30日更新2 - 发现这篇文章: 使用AWS SNS发送短信 - .Net Core
为我正在尝试的代码创建了新的问题,但它不起作用: 如何从Lambda函数调用SNS PublishAsync?
NPM 和 GitHub上的文档没有显示如何在建立连接时捕获异常。我是根据查询方法的工作原理猜测的。那么作为新库的新手,我是否必须阅读代码才能弄清楚它?或者我缺少一些常见的标准做法吗?我故意输入了错误的密码只是为了测试错误处理。
我应该尝试/捕获,还是期望返回一个 err 对象?如果它们在查询方法上返回 err 对象而不是在连接方法上返回 err 对象,是否不一致?
使用 Amazon AWS Aurora 作为数据存储。
const mysql = require('mysql2/promise'); 获取数据();
async function GetData() {
const config = require("config");
const dbConfig = config.get('AWS.Database01TestErr');
console.log ("const dbConfig:");
console.dir(dbConfig, { depth: null });
const [errConn, connection] = await mysql.createConnection(dbConfig);
if (errConn) throw errConn;
mysql.createConnection(dbConfig);
console.log ("Got the database connection");
//query = "select ID, user_nicename, user_email from wp_users where user_login = 'hebgadmin' ";
query = "select ID, user_nicename from wp_users limit 3 "; …Run Code Online (Sandbox Code Playgroud) 我已经创建了一个模式,作为我们公司和外部公司之间商定的接口.我现在正在创建一个WCF C#Web服务来处理该接口.
我运行了XSD实用程序,它创建了一个C#类.模式是在BizTalk中构建的,并引用其他模式,因此总共生成了超过15个类.
我将[DataContract}属性放在每个类的前面.我是否必须在每个属性上放置[DataMember]属性?
当我生成测试客户端程序时,代理没有任何这15个类的代码.
我们曾经在使用.asmx服务时使用这种技术,但不确定它是否与WCF一样.如果我们更改架构,我们会想要重新生成WCF类,然后我们每次都要使用所有[DataMember]属性重新调整它?是否有一个类似于XSD.exe的新工具可以更好地与WCF一起使用?
谢谢,
尼尔沃尔特斯
解决方案(埋在桑德斯之一回答/评论):
将XmlSerializerFormat添加到Interface定义:
[OperationContract]
[XmlSerializerFormat] // ADD THIS LINE
Transaction SubmitTransaction(Transaction transactionIn);
Run Code Online (Sandbox Code Playgroud)
两个注意事项:1)在我这样做之后,我在我的代理(服务参考)测试客户端程序中看到了更多.xsds,但是我没有看到我的intellisense中的新类.2)出于某种原因,直到我的项目做了一个构建,我没有在智能感知的所有类(不知道为什么).
wcf ×2
.net-core ×1
amazon-sns ×1
async-await ×1
aws-lambda ×1
binary ×1
biztalk ×1
biztalk-2010 ×1
c# ×1
c#-4.0 ×1
css ×1
html ×1
node.js ×1
oracle ×1
oracle10g ×1
powershell ×1
schema ×1
sql ×1
sql-server ×1
styles ×1
stylesheet ×1
t-sql ×1
wix ×1
wix3 ×1
xsd ×1