标签: iis-express

IIS Express 无 AppSettings

我正在运行 .NET 4.0 Web 应用程序。在 IIS Express(并且只有 IIS Express)下,我的 APPSettings 都没有被读入 AppSettings 集合。当我查看这个集合时,它是空的,即使我在 web.config 中有大约 15 个应用程序设置。关于发生了什么的任何建议?

这是一个 Web 应用程序项目。我正在使用 web.config 转换,但我相信这些只在发布时使用。

asp.net web-config iis-express

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

SPI端口转发和Visual Studio 2013(IIS Express)

我有两个想法,关于这篇文章是否属于Stack Overflow或Server Fault,所以如果我有错误的区域,那么道歉!我选择了服务器故障,因为我认为以前的工作解决方案和当前的问题之间的唯一区别是IIS Express.

我在使用Visual Studio 2010时成功使用了SPI Port Forward来测试本地网站,但是升级到Visual Studio 2013并且包含了IIS Express我在浏览另一台设备时无法再看到我的网站网络.您可以想象,在移动设备上进行测试时,此类功能是无价的,因为这意味着我无需在测试之前将网站发布到任何地方.

有任何想法吗?

iis-express

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

Web平台安装程序:在此计算机上找到了较新版本的IIS 8.0 Express

我正在尝试在我的Windows 7机器上安装umbraco我正在运行VS Ultimate 2013 v12 update 5当我尝试使用Web平台安装程序添加Umbraco CMS时,我没有获得任何乐趣:

DownloadManager信息:0:从以下网址加载产品xml:https://go.microsoft.com/?linkid = 9842185 DownloadManager信息:0:https://go.microsoft.com/?linkid = 9842185回复302 DownloadManager信息:0 :响应头:HTTP/1.1 302 Moved Temporarily Cache-Control:no-cache Pragma:no-cache Content-Type:text/html; charset = utf-8到期:-1位置:https://www.microsoft.com/web/webpi/5.0/webproductlist.xml 服务器:Microsoft-IIS/8.0 X-AspNetMvc-版本:4.0 X-AspNet-版本: 4.0.30319 X-Powered-By:ASP.NET Content-Length:175 Date:Sun,20 Sep 2015 14:56:25 GMT Connection:keep-alive

DownloadManager信息:0:https://www.microsoft.com/web/webpi/5.0/webproductlist.xml响应304 DownloadManager信息:0:响应头:HTTP/1.1 304未修改内容类型:text/xml Last-修改时间:星期五,2015年9月11日18:20:58 GMT ETag:"7c78599bbeecd01:0"Cache-Control:max-age = 367 Date:Sun,20 Sep 2015 14:56:25 GMT Connection:keep-alive X-CCC :美国X-CID:2

DownloadManager信息:0:远程文件未更改,使用本地缓存文件:C:\ Users\James.Fleming\AppData\Local\Microsoft\Web Platform Installer\1343597488.xml.temp DownloadManager警告:0:无法解析关键字ID 5nine DownloadManager警告:0:无法解析关键字ID安全性DownloadManager警告:0:无法解析关键字ID 5nine DownloadManager警告:0:无法解析关键字ID安全性DownloadManager警告:0:无法解析关键字ID备份DownloadManager警告:0:无法解析关键字ID Portal DownloadManager警告:0:无法解析关键字ID备份DownloadManager警告:0:无法解析关键字ID …

iis web-platform-installer iis-express

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

Microsoft Bot Framework,Visual Studio 2015和2017启动错误

  1. 下载的bot模拟器和vs模板代码,如https://docs.microsoft.com/en-us/bot-framework/resources-tools-downloads中所述.

  2. 在我的Windows 10计算机上启动具有管理员权限的VS 2015 [版本:14 Update 3]以及具有相同最终结果的VS 2017 [版本:15.2]之后创建了一个新的僵尸程序应用程序(版本:1703;操作系统构建:16199.1000) .

  3. 更新了所有nuget包.

  4. 按F5运行应用程序.我收到以下错误:

    '/'应用程序中的服务器错误.

    指定的参数超出了有效值的范围.参数名称:site

    描述:执行当前Web请求期间发生未处理的异常.请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息.

    异常详细信息:System.ArgumentOutOfRangeException:指定的参数超出了有效值的范围.参数名称:site

    来源错误:

    在执行当前Web请求期间生成了未处理的异常.可以使用下面的异常堆栈跟踪来识别有关异常的起源和位置的信息.

    堆栈跟踪:

    [ArgumentOutOfRangeException:指定的参数超出了有效值的范围.参数名称:site] System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags,PolicyLevel policyLevel,Exception appDomainCreationException)+280

    [HttpException(0x80004005):指定的参数超出了有效值的范围.参数名称:site] System.Web.HttpRuntime.FirstRequestInit(HttpContext context)+10041024 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)+95 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr,HttpContext context)+254

  5. 应用程序事件日志包含以下信息:

    事件代码:3005事件消息:发生了未处理的异常.活动时间:5/24/2017 11:36:28 PM活动时间(UTC):5/25/2017 6:36:28 AM活动编号:9914b02cd15f4282b9043b1f70097b3e活动顺序:1活动开始:1活动详情代码:0

    应用程序信息:应用程序域:/ LM/W3SVC/2/ROOT-1-131401677887853236信任级别:
    应用程序虚拟路径:/应用程序路径:c:\ users \用户A\documents\visual studio 2017\Projects\MyFirstBotApp\MyFirstBotApp\Machine名称:DESKTOP-BQ93HFB

    进程信息:进程ID:14320进程名称:iisexpress.exe帐户名:DESKTOP-BQ93HFB\User A

    异常信息:异常类型:ArgumentOutOfRangeException异常消息:指定的参数超出了有效值的范围.参数名称:System.Web.Configuration.WebConfigurationHost.InitForConfiguration(String&locationSubPath,String&configPath,String&locationConfigPath,IInternalConfigRoot configRoot,Object [] hostInitConfigurationParams)中的站点,位于System.Configuration.Configuration..ctor(String locationSubPath,Type typeConfigHost,Object [在System.Web.Configuration.WebConfigurationHost.OpenConfiguration的System.Configuration.Internal.InternalConfigConfigurationFactory.System.Configuration.InternalConfigConfigurationFforyConfigurationFactory.Create(Type typeConfigHost,Object [] hostInitConfigurationParams)中的(hostInitConfigurationParams)(WebLevel webLevel,ConfigurationFileMap文件映射,VirtualPath路径, System.Web.Configuration.WebConfigurationManager.OpenWebConfigurationImpl中的String site,String locationSubPath,String server,String userName,String password,IntPtr tokenHandle(WebLevel webLevel,ConfigurationFileMap fileMap,String path,String site,String locationSubPath,String server,String u System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags,PolicyLevel policyLevel,Exception appDomainCreationException)的System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId,IApplicationHost appHost,HostingEnvironmentParameters …

iis-express visual-studio-2015 botframework visual-studio-2017

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

iisExpress 本地 httpruntime.cache 始终为空

奇怪的问题在这里。在 asp.net webforms (4.5 / 4.7) 的本地开发中,我发现即使正确设置 httpruntime.Cache 始终为空。我在另一个 iis express 工作站上尝试了它,发现了相同的行为,即使是测试单页网页。生产 IIS 7.5 中的同一页面工作并且从缓存存储和传送。具体代码如下,但我尝试了一个测试器在 httpruntime.Cache 中存储一个简单的字符串。

var cache = System.Runtime.Caching.MemoryCache.Default;
var luCacheKey = "lu_" + dsName;

var ic = HttpRuntime.Cache.Get(luCacheKey) as ICollection;
if (ic == null) {
Run Code Online (Sandbox Code Playgroud)

和测试人员

var item = HttpRuntime.Cache.Get("x");
if (item == null)
{
    HttpContext.Current.Cache.Insert("x", "test" , null, DateTime.Now.AddHours(1), Cache.NoSlidingExpiration);
    Response.Write("added to cache<br>");
}
else {
    Response.Write("already in cache");
}
Run Code Online (Sandbox Code Playgroud)

所以,我想知道 web.config 中是否有我可以查看的内容,或者这是预期的 IIS 表达行为?请注意, System.runtime.Caching 确实可以正常工作。

var cache = System.Runtime.Caching.MemoryCache.Default;
var ic = cache[luCacheKey] as …
Run Code Online (Sandbox Code Playgroud)

asp.net caching httpruntime.cache iis-express

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

每次我重新打开 Visual Studio 时,applicationhost.config 都会发生变化

我正在创建 asp.net-mvc 应用程序,并且我使用端口转发能够从外部测试我的项目。但是每次我重新打开并构建我的应用程序 IIS-Express 都会更改 applicationhost.config 并且我能看到的一切都是错误的。

重新打开前的文件:

        <site name="Project" id="2">
            <application path="/" applicationPool="Clr4IntegratedAppPool">
                <virtualDirectory path="/" physicalPath="path" />
            </application>
            <bindings>
                <binding protocol="http" bindingInformation="*:61035:*" />
            </bindings>
        </site>
Run Code Online (Sandbox Code Playgroud)

文件后:

        <site name="Project" id="2">
            <application path="/" applicationPool="Clr4IntegratedAppPool">
                <virtualDirectory path="/" physicalPath="path" />
            </application>
            <bindings>
                <binding protocol="http" bindingInformation="*:61035:*" />
            </bindings>
        </site>
        <site name="Project(1)" id="3">
            <application path="/" applicationPool="Clr4IntegratedAppPool">
                <virtualDirectory path="/" physicalPath="path" />
            </application>
            <bindings>
                <binding protocol="http" bindingInformation="*:61035:localhost" />
            </bindings>
        </site>
Run Code Online (Sandbox Code Playgroud)

正如您所料,Project(1) 由 IIS-Express 托管,*:61035:*每次重新打开 Visual Studio 时我都必须更改绑定,因为它不断添加另一个站点,而忽略以前的站点。

我能用它做什么吗?

asp.net-mvc iis-express visual-studio-2017

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

在 IIS 上托管 Asp.Net Core 2

通过 Visual Studio 在 ApplicationName 和 IISExpress 中以发布/调试模式启动时,我的应用程序运行良好。

但是一旦部署到 IIS 并启动,我就无法访问主页(主控制器)并且还有导航栏问题和 JQuery 问题。我已经在调试/发布模式下发布了该应用程序,但无济于事。

我的问题主要是我该如何解决这个问题?该应用程序的运行方式应该与在 iisexpress 上本地运行的方式相同,对吗?即使文件丢失(如在调试/发布环境中),家庭控制器也应该按原样访问?

将不胜感激任何帮助并等待根据评论发布更多信息和日志。

编辑 1(包括 Startup.cs):

using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.DependencyInjection;
using MTAClassLib.Configuration;
using System.IO;

namespace MTALib
{
    public class Program
    {
        public static void Main(string[] args)
        {
            var host = BuildWebHost(args);
            using (var scope = host.Services.CreateScope())
            {
                var services = scope.ServiceProvider;
                var RoleManager = services.GetRequiredService<RoleManager<IdentityRole>>();
                UserRoleSeed.Seed(RoleManager).Wait();
            }
            BuildWebHost(args).Run();
        }
    public static IWebHost BuildWebHost(string[] args) =>
        WebHost.CreateDefaultBuilder(args)
            .UseStartup<Startup>()
            .UseKestrel()
            .UseContentRoot(Directory.GetCurrentDirectory())
            .UseIISIntegration()
            .Build();
     } …
Run Code Online (Sandbox Code Playgroud)

asp.net iis hosting iis-express asp.net-core-2.0

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

IIS Express applicationhost.config - 身份验证错误

我在 Windows 10 下运行 IIS Express(不要与普通 IIS 混淆)。我的理解是设置存储在“My Documents\IISExpress\config\applicationhost.config”中

使用创建 ASP.NET Core 项目时,可以通过本地 web.config 文件覆盖这些设置。

当尝试使用此 web.config 时

<?xml version="1.0" encoding="utf-8"?>
 <configuration>
  <location path="" inheritInChildApplications="false">
    <system.webServer>
      <security>
        <authentication>
          <anonymousAuthentication enabled="false" />
          <windowsAuthentication enabled="true" />
        </authentication>
      </security>
    </system.webServer>
  </location>    
</configuration>
Run Code Online (Sandbox Code Playgroud)

我收到以下错误。

该配置节不能在此路径中使用。当该部分被锁定在父级别时,就会发生这种情况。锁定可以是默认设置 (overrideModeDefault="Deny"),也可以通过位置标记使用 overrideMode="Deny" 或旧的allowOverride="false" 显式设置。

识别这条线

<authentication>
**<anonymousAuthentication enabled="false" />**
<windowsAuthentication enabled="true" />
Run Code Online (Sandbox Code Playgroud)

尽管将此行更改为状态允许

<section name="anonymousAuthentication" overrideModeDefault="Allow" />
Run Code Online (Sandbox Code Playgroud)

还有其他我应该寻找的地方吗?

windows asp.net iis-express asp.net-core

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

.NET Core 3 和 IIS Express maxAllowedContentLength 不起作用

我有一个 JavaScript 应用程序,它将文件发布到 .NET Core 3 Web API。
Web API 项目在 IIS Express 上本地运行。

30 MB 以下的文件工作正常,但大文件无法通过。

在这里我试过了;

1-%userprofile%\my documents\iisexpress\config\applicationhost.config用新maxAllowedContentLength值更新文件。

在此处输入图片说明

2- 将RequestSizeLimit属性添加到控制器操作。

在此处输入图片说明

还有什么我在这里想念的吗?

file-upload web-config iis-express .net-core

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

在 Blazor WebAssembly 解决方案中,如何在与服务器 API 不同的端口上托管 Blazor WASM 客户端应用程序

我有一个 Blazor WebAssembly 解决方案,其中包含客户端项目、服务器项目和共享项目,基于 Microsoft 的默认解决方案模板。我正在使用 Google Chrome 在 Visual Studio 2019 预览版中进行编辑和调试。

该解决方案开箱即用,只有一个启动项目,即服务器应用程序。该服务器应用程序具有对客户端应用程序的项目引用。您可以通过在服务器项目属性中选中“启用 SSL”来将其设置为使用 HTTPS,我已经这样做了。

当您单击调试时,它可以完美运行。

现在我想更改它,以便从https://localhost:44331提供我所有的 Blazor WASM 页面,并从https://localhost:44331/api提供服务器应用程序的 API 控制器端点

我想使用 URL 的这个额外的“/api”部分来保持对 API 的请求与仅在 Blazor 客户端应用程序中导航分开。因此,如果我请求“ https://localhost:44331/api/something ”,我知道我会在我的 Web API 中达到一个点,但是如果我请求“ https://localhost:44331/something ”,我知道我'我将点击 Blazor 客户端应用程序中的特定页面。我认为它也将更接近生产中的正常设置。

我希望很清楚我要做什么。

显而易见的起点似乎是将服务器应用程序属性的“调试”部分中的“应用程序 URL”设置更改为“ http://localhost:52708/api ”。该项目分配了一个“ https://localhost:44331/api ”的安全 URL 。我在客户端应用程序中保留了相同的设置,因此在客户端应用程序中,客户端应用程序属性的“调试”部分中的“应用程序 URL”设置仍然是“ http://localhost:52708 ”,项目分配了“ https://localhost:44331 ”的安全 URL 。

这打破了一切。

现在“ https://localhost:44331/ ”将我带到 404 Not Found 错误,“ https://localhost:44331/api ”将我带到一个页面,上面写着:

正在加载...
发生了未处理的错误。重新加载

那太容易了!有人知道获得我想要的环境的正确方法吗?

iis-express asp.net-core blazor asp.net-core-staticfile blazor-client-side

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