我需要为我的IIS 7.5网站编写URL重写规则,该规则捕获特定cookie中的值,然后使用该值构建URL.例如,传入的请求如下所示:
GET http://myserver.com/test.aspx HTTP/1.1
Accept: text/html, application/xhtml+xml, */*
Accept-Language: en-US
User-Agent: Mozilla/5.0
Host: myserver.com
Cookie: foo=bar; bat=bar
Run Code Online (Sandbox Code Playgroud)
我想将它们路由到此(基于"foo"cookie值):
http://myserver.com/bar/test.aspx
Run Code Online (Sandbox Code Playgroud)
回顾文档并搜索示例,我很难过!谢谢你的帮助.
我目前有一个脚本可以恢复正常运行的服务器正常运行时间,但是当我收到服务器正常运行时间的值时,它包括天,分和秒.
以下是我认为需要修改的脚本行:
$os=Get-WmiObject win32_operatingsystem
$uptime=((get-date) - ($os.ConvertToDateTime($os.lastbootuptime))).tostring()
Run Code Online (Sandbox Code Playgroud)
我试过查找选项只返回天; 但一直找不到一个.
这可能吗?
对于链接服务器,我看到如何更改"远程查询超时"配置以暗示对链接服务器的调用应该在特定超时值内完成或回滚.这似乎适用于SQL Server引擎 - 是否可以更改存储过程中的提示,以便特定存储过程可以在需要时运行更长时间,但如果它们运行时所有其他非提示的SPROC会更快地超时?
链接查询超时在此处讨论:http: //support.microsoft.com/kb/314530
在3秒内将其设置为超时的示例代码如下:
sp_configure 'remote query timeout', 3
go
reconfigure with override
go
Run Code Online (Sandbox Code Playgroud) 我读到了Web Deploy Powershell Cmdlet,我想开始使用它们.当然,我开始的第一项任务是备份我的测试网络服务器的当前配置状态 - 这个cmdlet应该这样做:
Backup-WDServer -ConfigOnly
Run Code Online (Sandbox Code Playgroud)
但是,当我运行它时,我得到了这个投诉 - 我不确定如何解决它:
Backup-WDServer : The property 'password' located at '/webServer/appHostConfig[@path='']/location[@path='']/section[@name='system.applicationHost/applicationPools']/applicationPools/applicationPoolDefaults/processModel' is
marked as secure. You must specify an encryption password to archive this property.
At line:1 char:1
+ Backup-WDServer -ConfigOnly
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Backup-WDServer], DeploymentEncryptionException
+ FullyQualifiedErrorId : Microsoft.Web.Deployment.PowerShell.BackupServer
Run Code Online (Sandbox Code Playgroud)