首页 \ 问答 \ CXF Web服务限制(CXF web service throttling)

CXF Web服务限制(CXF web service throttling)

我是CXF的新手,我想知道它是否有任何内置机制可以限制对Web服务的并发调用数量,从而解决了DoS攻击的可能性? 类似于WCF的这个功能?

http://www.danrigsby.com/blog/index.php/2008/02/20/how-to-throttle-a-wcf-service-help-prevent-dos-attacks-and-maintain-wcf-scalability/


I'm new to CXF and I would like to know if it has any build-in mechanism that would allow limiting the number of concurrent calls to the web service, thus addressing the possibility of a DoS attack? Something similar to this feature of WCF?

http://www.danrigsby.com/blog/index.php/2008/02/20/how-to-throttle-a-wcf-service-help-prevent-dos-attacks-and-maintain-wcf-scalability/


原文:https://stackoverflow.com/questions/5994620
更新时间:2023-04-10 15:04

最满意答案

我不是使用dim来创建表单,而是使用visual studio的添加新项目添加表单 - 可以通过右键单击右侧的项目名称(不是解决方案名称)来访问该表单。 弹出上下文菜单。 选择“添加”,然后单击“新建项目”,并选择与项目类型相同的相应表单。

将progressBar添加到表单 - 如果需要,可以将名称保留为progressBar1,但如果更改,则需要在下面的代码中更改对它的引用

在新表单代码的最顶部添加您用于导入winscp内容的相同导入行。

将此代码块(与更新后的问题中的代码类似)放入新表单中。 我已经编辑了一些代码,因此它应该以动态形式工作。

Private Sub Form2_Load(sender As Object, e As EventArgs) Handles Me.Load
    Me.Cursor = Cursors.WaitCursor
    WinScp.GetFile(myremotePicturePath, ladujZdjeciaPath, True)
    progressBar1.Minimum = 0
    progressBar1.Maximum = 1
    progressBar1.Value = 0
    Do
        progressBar1.value=winscp.FileProgressEventArgs.FileProgress
        progressbar1.refresh
    until progressbar1.value=1
    Me.Cursor = Cursors.Default
    form.Close()
End Sub

例如Form1.myremotePicturePath和Form1.ladujZdjeciaPath。

此外,您最初在原始表单中定义函数和这两个变量,您需要将它们从Private更改为Public,以便新表单可以看到它们

我认为应该这样做。 如果你有任何问题让我知道,但我不会在接下来的几天回家,所以我可能不会回复直到深夜 - 有点像今晚:))


Rather than use dim to create the form, I would add the form using visual studio's add new item - which is accessible by right clicking on your Project name(not solution name) on the right hand side. A context menu pops up. Choose "Add" then click "New Item" and choose the appropriate form that is the same type as your project.

Add the progressBar to the form - and you can leave the name as progressBar1 if you want, but if you change is you need to change the references to it in the code below

At the very top of the code for the new form add the same imports line that you used to import the winscp stuff.

Put this block of code (similar to your code in your updated question) into the new form. I've edited the code a bit so that it should work in the dynamic form.

Private Sub Form2_Load(sender As Object, e As EventArgs) Handles Me.Load
    Me.Cursor = Cursors.WaitCursor
    WinScp.GetFile(myremotePicturePath, ladujZdjeciaPath, True)
    progressBar1.Minimum = 0
    progressBar1.Maximum = 1
    progressBar1.Value = 0
    Do
        progressBar1.value=winscp.FileProgressEventArgs.FileProgress
        progressbar1.refresh
    until progressbar1.value=1
    Me.Cursor = Cursors.Default
    form.Close()
End Sub

e.g Form1.myremotePicturePath and Form1.ladujZdjeciaPath.

Also where you originally define the function and those two variables in your original Form, you'll need to change their from Private to Public so that the new form can see them

I think that should do it. If you have any problems let me know, but I wont be home till lateish in the next few days, so I may not reply till late in the evening - a bit like tonight :))

相关问答

更多
  • 我已经知道setIndeterminate会给出无限的水平进度条。 但它将类似于装载轮,除了它将是水平的。 如果你看到我的问题,我正在寻找从0开始的横条,并一路走到100(逐渐增加)。 如果你想在Android中实现这一点,你必须使用你的进度条,如下所示:
  • 当值增加到某个数字时添加if else语句并在屏幕中添加e消息。 检查工作jsfiddle: http : //jsfiddle.net/Beslinda/v87ux5zp/1/ 代码 :
    ...
  • 你输错了命令。 for (( i = 1 ; i <= 100 ; i++ )); do sleep 1; echo $i; done | >&2 echo -en "\r"; pv --progress --line-mode --size 100 --eta --timer ^ 在pv之前有一个分号,所以你实际上是在stdin / stdout上 ...
  • 好吧所以我找到了解决这个问题的答案: 为了能够检查完成的字符串并打印进度条,因为它进展到100%我使用相同的代码,除了我必须指定readline()中的字符数。 所以我进行了加载并将其打印到文件然后复制了进度条已满的最后一行,将其输入到打印len(str)中,得到了字符串的长度,然后将其作为参数添加到readline()命令: done = None command = 'my loading command' proc = subprocess.Popen(command, stdout=subproce ...
  • 无法显示进度条 .progress-bar上的height规则似乎是罪魁祸首。 标题“测验”没有响应。我该如何解决? 您可以使用视口单元,以便字体更改以响应视口。 16.7vw等于(足够接近)你正在使用的值( 15em )。 有关更多信息,请参阅此相关问题。 支持视口单元的 浏览器 。 文本选项与单选按钮不完全对齐? 不确定你的意思。 您将文本置于中心 - 您不希望它居中吗? 当从一个问题转移到另一个问题时,如何修复网页的位置? 通过这个我假设你不希望页面跳到顶部,只要你点击下一个? 如果是这样,在“下一步 ...
  • 我可以向您保证,对于支持File API的所有支持的浏览器,进度条在Fine Uploader中运行良好。 当然,这包括Chrome。 如果您要在非常快速的连接上上传一个小文件,由于几乎即时上传,进度条可能不会是可见的。 在发送完最后一个字节之后出现“正在处理...”状态消息,我们正在等待服务器的响应。 我已经解释了为什么“处理...” 在Fine Uploader的问题跟踪器中的情况下不能可靠地出现在Firefox中(并且进度条会在服务器返回响应之前一直存在)。 请阅读我的评论以获取更多信息。 I can ...
  • 哇,你一定要爱痛苦...结合asm和COM .... 根据MSDN文档 ,URLDownloadToFile的最后一个参数称为lpfnCB,指向调用者的IBindStatusCallback接口的指针,其OnProgress方法将被调用以报告下载进度。 wow, you must love pain... combining asm and COM.... According to the MSDN documentation the last parameter of URLDownloadToFile ...
  • 我不是使用dim来创建表单,而是使用visual studio的添加新项目添加表单 - 可以通过右键单击右侧的项目名称(不是解决方案名称)来访问该表单。 弹出上下文菜单。 选择“添加”,然后单击“新建项目”,并选择与项目类型相同的相应表单。 将progressBar添加到表单 - 如果需要,可以将名称保留为progressBar1,但如果更改,则需要在下面的代码中更改对它的引用 在新表单代码的最顶部添加您用于导入winscp内容的相同导入行。 将此代码块(与更新后的问题中的代码类似)放入新表单中。 我已经编 ...
  • ProgressBar progressBar; @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); progressBar = (ProgressBar) findViewById(R.id.progressBar1); ClassB classb = new ClassB(this, progressBar); } ...
  • 我找到了一个很好的方法来解决这个问题,在这里使用curl-progress脚本( https://gist.github.com/sstephenson/4587282 ),它使用自定义绘制的进度条包裹curl。 默认情况下,脚本curl-progress不会在进度条前显示文件名,但可以完全自定义。 我不得不修改print_progress函数,因此它使用一个额外的参数,这是要下载的文件的名称。 因此,我在print_progress中修改了printf语句,因此它在进度条之前的适当位置打印文件名: pri ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)