小编Usa*_*lam的帖子

在laravel应用程序中调用index.php时出错500(Windows环境)

我正在使用IIS在基于Windows的docker容器内部署laravel应用程序.当我在运行docker容器后运行应用程序时,C:\ inetpub\wwwroot中的server.php页面工作正常.但是,C:\ inetpub\wwwroot\public\index.php返回500错误.我已启用日志,运行编辑器更新和应用目录权限.但仍然没有运气.

IIS10 PHP 7.0 Laravel 5.5

日志消息是

GET /public/index.php - 80 - 172.18.224.1 Mozilla/5.0 +(Windows + NT + 10.0; + WOW64; + Trident/7.0; + Touch; + rv:11.0)+ like + Gecko - 500 19 13 1

web.config文件:

<configuration>
Run Code Online (Sandbox Code Playgroud)

<staticContent>
    <remove fileExtension=".woff" />
    <remove fileExtension=".woff2" />

    <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
    <mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
Run Code Online (Sandbox Code Playgroud)

<rewrite>
  <rules>
    <rule name="Imported Rule 1" stopProcessing="true">
      <match url="^(.*)/$" ignoreCase="false" />
      <conditions>
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
      </conditions>
      <action type="Redirect" redirectType="Permanent" url="/{R:1}" />
    </rule>
    <rule …
Run Code Online (Sandbox Code Playgroud)

php iis docker laravel-5

13
推荐指数
1
解决办法
898
查看次数

无法从 COR_PROFILER_PATH 和 COR_PROFILER 环境变量解析探查器路径。使用垫片时

使用 Microsoft Fakes Framework 的测试失败,但有异常:

Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationException:无法解析来自 COR_PROFILER_PATH 和 COR_PROFILER 环境变量的探查器路径 2016-12-26T14:36:01.6005889Z ##[error] at Microsoft.QualityTools.truUnitIsolationIntelation.Testing. .ResolveProfilerPath() 2016-12-26T14:36:01.6005889Z ##[error] 在 Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.IntelliTraceInstrumentationProvider.Initialize() 2016-12-2605889Z ##[error] ##[error]在 Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationRuntime.InitializeUnitTestIsolationInstrumentationProvider()

测试在本地机器 VS2015 上调试并运行良好,但在 TFS2015 中构建时,我不断收到此异常。我尝试通过删除 runsettings 文件路径,构建通过但测试没有在那种情况下运行它。我浏览了 MSDN 上的各种论坛,但没有一个解决方案可以解决我的问题。有没有办法在 TFS 中设置这些环境变量?我在这里几乎被阻止,欢迎任何建议和解决方案。

c# unit-testing microsoft-fakes tfs-2015

5
推荐指数
1
解决办法
3792
查看次数

为单元测试设置类的只读属性

我有这样的界面

public interface IConnection
{
    Strategy Gc { get; }

    bool IsConnected();

    bool Connect();
}
Run Code Online (Sandbox Code Playgroud)

我想要使​​用这个接口的类的单元测试方法.现在我想设置Gc,但它恰好是readonly.有没有办法设置Gc字段而不更改此接口类?我正在使用MS fakes和Nsubstitute进行单元测试.然而,显然没有人提供解决方案.PrivateObject也不起作用.

更改界面不是一个选项.建议更好的解决方案.

c# unit-testing readonly nsubstitute

3
推荐指数
1
解决办法
2455
查看次数