草庐IT

remote_path

全部标签

c# - ASP.NET Core 2.0 预览版 1 : How to set up Cookie Authentication with custom login path

在ASP.NETCore2.0中,.UseAuthentication()中间件有一个重大更改,不再允许oldsyntaxmentionedhere去工作。新版本似乎在addAuthentication中处理配置,但我无法在任何地方找到任何关于如何更改指定自定义登录和注销url的旧代码的详细信息。services.AddAuthentication(o=>{//WherecanIspecifythis?????varopt=newCookieAuthenticationOptions(){LoginPath="/api/login",LogoutPath="/api/logout",}

c# - 添加服务引用给出异常 : Unable to connect to remote server

从控制台应用程序客户端调用时,我的WCF服务返回结果。但是,它正在显示Exception:Unabletoconnecttoremoteserver实际错误:Failedtoinvoketheservice.Possiblecauses:Theserviceisofflineorinaccessible;theclient-sideconfigurationdoesnotmatchtheproxy;theexistingproxyisinvalid.Refertothestacktraceformoredetail.Youcantrytorecoverbystartinganewpro

c# - 被 "The remote server returned an error: (403) Forbidden"与 https 中的 WCF 服务难住了

我有一个WCF服务,由于这个错误,我已经将其归结为几乎没有。它把我逼上了墙。这就是我现在所拥有的。一个非常简单的WCF服务,具有一个返回值为“test”的字符串的方法。一个非常简单的Web应用程序,它使用该服务并将字符串的值放入标签中。在Win2003上使用SSL证书运行IIS6的Web服务器。同一服务器上其他可用的WCF服务。我将WCF服务发布到它的https位置我在VS中以Debug模式运行Web应用程序,它运行良好。我将Web应用程序发布到WCF服务所在的同一台服务器上的https位置,该服务器位于同一台SSL证书下我得到,“远程服务器返回错误:(403)禁止访问”我几乎更改了I

c# - "Access to the path ... is denied"(.NET C#)

我一直在将一个小的XML数据文件保存到外部驱动器,没问题。但后来我尝试使用ApplicationData文件夹和其他文件夹,甚至C:\但没有运气。我收到类似“访问路径“C:\”被拒绝”的错误。只是为了确认,文件已创建并使用当前代码正常读取到外部驱动器。我想这与安全和权限有关,但我没有发现任何有用的东西。如果您能在这方面为我指明正确的方向,请提前致谢!stringfipData=@"F:\IL2\SIIYM\SIIYMData.xml";//externaldriveok:-)//stringfipData=Environment.GetFolderPath(Environment.Sp

c# - 具有驱动器号的 Path.Combine() 行为

根据有关Path.Combine方法的官方文档:https://msdn.microsoft.com/en-us/library/fyy7a5kt(v=vs.110).aspxRemarksIfpath1isnotadrivereference(thatis,"C:"or"D:")anddoesnotendwithavalidseparatorcharacterasdefinedinDirectorySeparatorChar,AltDirectorySeparatorChar,orVolumeSeparatorChar,DirectorySeparatorCharisappended

c# - 为什么这个 Path.Combine 不起作用?

这个问题在这里已经有了答案:WhydoesPath.CombinenotproperlyconcatenatefilenamesthatstartwithPath.DirectorySeparatorChar?(16个答案)关闭9年前。我有以下命令:stringreportedContentFolderPath=Path.Combine(contentFolder.FullName.ToString(),@"\ReportedContent\");当我查看调试器时,我可以看到以下内容:contentFolder.FullName="E:\\"不过reportedContentFolde

c# - 无法上传到 Azure Blob 存储 : The remote server returned an error: (400) Bad Request

我正在尝试创建一个实用程序来从Internet下载文件并将其再次上传到Azureblob存储。Blob容器已经创建好了;但出于某种原因,当我尝试将文件上传到存储时出现“BadRequest400”异常......创建了容器名称,小写字母,特殊字符。但我仍然不知道为什么会出现异常!请帮忙。注意:我没有使用任何模拟器...直接在云端进行测试。我的所有容器都具有“公共(public)容器”访问选项。异常(exception)情况:Anexceptionoftype'Microsoft.WindowsAzure.Storage.StorageException'occurredinMicros

c# - 在 Directory.GetFiles 中使用通配符时出现 "Illegal characters in path"错误

我有一个包含多个包含.doc文件的子目录的目录。示例:C:\Users\user\Documents\testenviroment\Released\test0.docC:\Users\user\Documents\testenviroment\Debug\test1.docC:\Users\user\Documents1\testenviroment\Debug\test2.docC:\Users\user\Documents1\testenviroment\Released\test20.doc我想获取所有Debug文件夹下的所有test*.doc文件。我试过:string[]fi

c# - asp.net 中 ./, ../, ../../, ~/on file path(URL) 之间的区别

我有一个脚本文件。看到路径是~/Script。但是,如果我输入../../而不是~/,该过程也同样有效。我的网站URL如:https://sample.com/Scripts/angular.js如果我在Scripts之前输入../../,那么它会自动更改以前的URL(https://sample.com/Scripts/angular.js).Whatistheurlprocess?Andhowcanitsautomaticallychanged?andpleasetellabouttheDifferentbetween./,../,../../,~/,/Scripts,Script

c# - 在 .Net Remoting 中使用单例

我在通过远程处理公开的单例类时遇到了一些问题。在我的服务器中,我有:TcpChannelchannel=newTcpChannel(Settings.Default.RemotingPort);ChannelServices.RegisterChannel(channel,false);RemotingConfiguration.RegisterWellKnownServiceType(typeof(RemotableObject),"RemotableObject",WellKnownObjectMode.Singleton);RemotableObject是继承MarshalByR