首页 \ 问答 \ 增加IIS服务器上托管的WCF服务的超时(Increase timeout of WCF service hosted on IIS server)

增加IIS服务器上托管的WCF服务的超时(Increase timeout of WCF service hosted on IIS server)

我的服务器上托管了一堆WCF服务。 一个服务负责文件传输,并在用户尝试上传大文件时超时。

我想给用户一个选项,如果他愿意,可以增加这个特定服务的超时值。 目前,我正在使用5分钟超时,但是当文件很大并且网络在任何一方都相对较慢时达到此限制。

有没有办法动态地这样做? 我可以在不影响其他服务的情况下增加一项服务的超时值吗?

我理想的目的是从用户获取值并相应地设置clientTimeout和serverTimeout值。 我已经能够设置客户端超时,但服务器超时是目前的限制。 有什么想法吗?

我已阅读这些文章,但无法找到一种方法来增加我的服务在运行时的超时
1. http://msdn.microsoft.com/en-us/library/system.web.configuration.httpruntimesection.executiontimeout.aspx
2. WCF服务超时
3. http://blogs.msdn.com/b/wenlong/archive/2008/03/10/why-changing-sendtimeout-does-not-help-for-hosted-wcf-services.aspx


I have a bunch of WCF services hosted on my server. One service is responsible for file transfer and times out when the user tries to upload large files.

I want to give the user an option to increase the timeout value for this particular service if he so desires. Currently, I'm using a 5 min timeout but this limit is reached when the files are large and the network is relatively slow on either side.

Is there a way to dynamically do so? Can I increase the timeout value for one service without affecting the others?

What I'd ideally like to achieve is to get the value from the user and set the clientTimeout and serverTimeout value accordingly. I have been able to set the client timeout but the server timeout is a limitation as of now. Any thoughts on this?

I have read these articles but could not figure out a way to increase the timeout for my service at runtime
1. http://msdn.microsoft.com/en-us/library/system.web.configuration.httpruntimesection.executiontimeout.aspx
2. WCF service timeout
3. http://blogs.msdn.com/b/wenlong/archive/2008/03/10/why-changing-sendtimeout-does-not-help-for-hosted-wcf-services.aspx


原文:https://stackoverflow.com/questions/20070491
更新时间:2022-03-17 10:03

最满意答案

当您的应用程序第一次启动时,Sf使用HttpKernel组件来管理从应用程序和包中加载服务容器配置,并处理编译和缓存。

在编译过程从配置,扩展和编译器传递的服务加载后,它被转储,以便下次可以使用缓存。 然后在后续请求期间使用转储版本,因为它更有效。

更多信息请访问: http//symfony.com/doc/current/components/dependency_injection/workflow.html

如果在控制器中转储$ this-> container,您将看到私有属性参数中的所有参数,包括在parameters.yml文件和config.yml中定义的参数。

在此处输入图像描述

假设您想知道参数区域设置的当前值是什么 - 您可以写这个

$this->container->getParameter('locale')

此外,所有这些参数都被转储到sf_root / var / cache / your_env / appDevDebugProjectContainer.xml中


When your app first time starts, Sf uses a HttpKernel component to manage the loading of the service container configuration from the application and bundles and also handles the compilation and caching.

After the compilation process has loaded the services from the configuration, extensions and the compiler passes, it is dumped so that the cache can be used next time. The dumped version is then used during subsequent requests as it is more efficient.

More info at: http://symfony.com/doc/current/components/dependency_injection/workflow.html

If you dump $this->container in your controller, you will see all the parameters inside private property parameters, including parameters defined in the parameters.yml file and in the config.yml

enter image description here

Let's say that you want to know what is current value of the parameter locale - you can write this

$this->container->getParameter('locale')

Also, all those parameters are dumped into sf_root/var/cache/your_env/appDevDebugProjectContainer.xml

相关问答

更多

相关文章

更多

最新问答

更多
  • 您如何使用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)