草庐IT

2location

全部标签

c# - Windows 更新 API c# : set download location

我正在编写代码来自动下载和安装Windows更新。(使用“tlbimped”wuapi.dll和在Internet上找到的一些示例代码)。UpdateDownloaderupdateDownloader=Sesion.CreateUpdateDownloader();updateDownloader.Updates=newUpdateCollection(){Item};updateDownloader.BeginDownload(this,this,this);没关系-我可以成功下载并安装更新。但是,我更喜欢缓存项目,如果该项目已经存在于“特殊”文件夹中,则不要下载它们。Google

windows - 如何使用 Location header 使 HTTP 缓存失效?

关于cacheinvalidation,HTTP规范说:SomeHTTPmethodsMUSTcauseacachetoinvalidateanentity.ThisiseithertheentityreferredtobytheRequest-URI,orbytheLocationorContent-Locationheaders(ifpresent).我试图通过使用Locationheader使缓存中的条目无效,但它似乎不起作用。这是我的用例:15:13:23.9988|获取|文件夹/folder.34/contents-200(确定)15:13:24.1318|放|folders

c# - 错误 APPX3212 : SDK root folder for 'Portable 7.0' cannot be located

我正在尝试使用TeamCity/MSBuild构建我的解决方案。这是一个WebAPI项目,它与移动客户端共享PCL中的一些实体。我看到关于在构建服务器上安装PCL引用库有一些注意事项,我想我已经整理好了(BuildingPortableClassLibraryProjectinbuildserverfails)但是,我在构建可移植类库的过程中遇到如下错误:[11:20:49][Doctrina.Pcl.Entities\Doctrina.Pcl.Entities.csproj]_GetSdkToolPaths[11:20:49][_GetSdkToolPaths]GetSdkPrope

c# - .NET 自定义配置部分 : Configuration. GetSection 引发 'unable to locate assembly' 异常

我已经为一个插件DLL创建了一个自定义配置部分,它将.configXML存储在一个单独的(与主可执行应用程序不同的)文件中。这是自定义部分类的示例:usingSystem;usingSystem.Configuration;namespacePluginFramework.MyConfiguration{publicclassMyConfigurationSettings:ConfigurationSection{privateConfiguration_Config=null;#regionConfigurationProperties//////AcustomXMLsectionf

c# - 哪个更适合获取程序集位置,GetAssembly().Location 或 GetExecutingAssembly().Location

请建议哪个最适合获取执行程序集位置。Assembly.GetAssembly(typeof(NUnitTestProject.RGUnitTests)).Location或Assembly.GetExecutingAssembly().Location请建议哪个更好。我也可以使用GetEntryAssembly()吗? 最佳答案 这取决于你想要什么。Assembly.GetAssembly返回声明了type的程序集。Assembly.GetExecutingAssembly返回正在执行当前代码的程序集。Assembly.GetEnt

c# - OutputCache Location=客户端似乎没有工作

我正在尝试在我的MVC应用程序中使用OutputCache属性,但当我使用OutputCacheLocation.Client时它似乎不起作用:publicclassHomeController:Controller{[OutputCache(Duration=15,Location=OutputCacheLocation.Client)]publicActionResultClient(){ViewBag.Message="Thecurrenttimeis"+DateTime.Now.ToString("hh:mm:ss");returnView();}[OutputCache(Du

javascript - Firefox和Chrome用户关闭 “Physical Location”提示如何处理?

我正在使用Geolocation对象和getCurrentPosition()。你有没有看到每次使用getCurrentPosition时Firefox和Chrome都会提示这些消息?Chrome:Example.comwantstotrackyourphysicallocation[allow][deny][Xclose]火狐:Example.comwantstoknowyourlocation[ShareLocation][Don'tShare][Close]我的问题是:当用户不“允许”或“拒绝”位置选项而是关闭提示时如何处理?我有这个JAVASCRIPT代码,但是当用户关闭提示时

javascript - 删除?来自 document.location.search

如何将document.location.search放入不带“?”的变量中是否有简单的正则表达式,或者我可以忽略第一个字符? 最佳答案 没问题window.location.search.substr(1);编辑我第一次没想到,但你应该指的是window.location,而不是document.location。它具有最广泛的浏览器支持。https://developer.mozilla.org/En/Document.location#Notes 关于javascript-删除?来

Javascript:获取 window.location 除主机外的所有内容?

我喜欢http://www.mydomain.com/hello/you使用top.location.host,我可以获得"http://www.mydomain.com"使用window.location.href我可以得到"http://www.mydomain.com/hello/you"有没有机会得到"/hello/you"??? 最佳答案 location.pathnamepathname将仅返回路径。如果您需要querystring和可选的hash,您还需要组合search和hash属性。考虑这个网址:http://ww

javascript - 当 window.location=self.location 不起作用时通过 AJAX 重新加载页面

在我的主页上我得到:log-in|sign-up通过MooTools,我通过id获取这些anchor元素,这样一旦它们被点击,一个华丽的div就会在它们下面弹出,其中包含登录或注册表单(当然还有停止事件传播的方法)并在填写字段后启动AJAX调用-这应该创建一个session并重新加载页面,以便用户可以看到他现在已登录并且出现用户级控件等。ajax调用由MooToolsAJAX类发起,evalScripts选项设置为true。AJAX页面返回脚本代码:window.location=self.location;这个系统运行完美-现在我想知道为什么如果我将anchor的href值更改为hr