对于想了解iis-6–IIS6上的ASP.NET路由的读者,本文将是一篇不可错过的文章,我们将详细介绍asp.netiis配置,并且为您提供关于ASP.NETCoreIIS部署IISAspNetCor
对于想了解iis-6 – IIS 6上的ASP.NET路由的读者,本文将是一篇不可错过的文章,我们将详细介绍asp.net iis配置,并且为您提供关于ASP .NET Core IIS 部署 IIS AspNetCore 模块错误:CLR 工作线程过早退出、asp.net 4路由不工作在iis 7、ASP.NET MVC在IIS6上、asp.net – IIS 7.0和IIS 7.5之间有什么区别?的有价值信息。
本文目录一览:- iis-6 – IIS 6上的ASP.NET路由(asp.net iis配置)
- ASP .NET Core IIS 部署 IIS AspNetCore 模块错误:CLR 工作线程过早退出
- asp.net 4路由不工作在iis 7
- ASP.NET MVC在IIS6上
- asp.net – IIS 7.0和IIS 7.5之间有什么区别?
iis-6 – IIS 6上的ASP.NET路由(asp.net iis配置)
但是,当我将其部署到我的服务器(Windows Server 2003,IIS 6,ASP.NET 3.5 SP1)时,它只显示404错误。
我已经读过某个地方,我打算设置通配符路由。我该怎么做?
需要做哪些其他配置更改才能使其在我的服务器上运行?
解决方法
ASP .NET Core IIS 部署 IIS AspNetCore 模块错误:CLR 工作线程过早退出
如何解决ASP .NET Core IIS 部署 IIS AspNetCore 模块错误:CLR 工作线程过早退出?
我为 IIS 提供了 Windows 中的所有功能,但如果您有任何建议,请与我分享。无论如何,我想部署在 IIS Lan 服务器上。但我不能。我工作了两天这个问题。我不知道如何解决这个问题。我使用“.net.5.0”。 我的应用程序代码是这样的
Program.cs
public class Program
{
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration().UseUrls("http://localhost:8080/")
.UseStartup<Startup>()
.Build();
}
}
启动
namespace EcommerceGastro.API
{
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddDbContext<GastroDB>();
services.AddScoped<IMainCategoryService,MainCategoryService>();
services.AddScoped<IProductService,ProductService>();
services.AddScoped<ICategoryService,CategoryService>();
services.AddScoped<IUploadImageService,UploadImageService>();
services.AddAutoMapper(typeof(AutoMapperProfile));
services.AddControllers();
services.AddControllers().AddNewtonsoftJson(opt =>
{
opt.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
});
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app,IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseRouting();
app.UseStaticFiles();
//Initiliazer.HomePageControl().Wait();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
}
}
}
appsettings.json
{
"Logging": {
"LogLevel": {
"Default": "information","Microsoft": "Warning","Microsoft.Hosting.Lifetime": "information"
}
},"AllowedHosts": "*","ConnectionStrings": { "DefaultConnection": "server=.; database=GastroDB; user id=sa; password=123;" }
}
我的发布设置:
我的 iis 设置:
Paylaşılmıyor = 不要分享
Yetkilendirme = 权威
我的错误:
Application ''/LM/W3SVC/1/ROOT'' with physical root ''C:\Users\Tuğçe\Desktop\iisDeneme\EcommerceGastro.API\bin\Release\net5.0\publish\'' Failed to load coreclr. Exception message:
CLR worker thread exited prematurely
Application ''/LM/W3SVC/1/ROOT'' with physical root ''C:\Users\Tuğçe\Desktop\iisDeneme\EcommerceGastro.API\bin\Release\net5.0\publish\'' has exited from Program.Main with exit code = ''0''. Please check the stderr logs for more information.
我浏览了这个 iis 网络应用程序,它是打开的,但看起来像:
HTTP Error 500.30 - ASP.NET Core app Failed to start
Common solutions to this issue:
The app Failed to start
The app started but then stopped
The app started but threw an exception during startup
Troubleshooting steps:
Check the system event log for error messages
Enable logging the application process'' stdout messages
Attach a debugger to the application process and inspect
For more information visit: https://go.microsoft.com/fwlink/?LinkID=2028265
解决方法
解决此错误的最常见和最简单的方法是重新发布您的代码,但要启用“在目标位置删除其他文件”选项。这将确保 Visual Studio 的 Web 部署过程会在复制新代码文件之前从 Web 应用程序中删除所有现有文件。这将导致在发布完成后,Web App 文件系统中仅存在需要发布的文件。它还确保所有文件都被最新版本覆盖;以防万一这也可能以某种方式干扰。
要启用在目标位置删除其他文件设置,请单击 Visual Studio 中发布配置文件上的编辑。该设置位于文件发布选项可扩展区域下方的设置选项卡上。选中复选框以启用该功能,然后点击保存。
,如果您处于调试模式(visual studio),只需清理解决方案即可解决问题。 在生产模式(IIS)下,首先清理解决方案,发布项目,替换为之前的。 (确保您将删除之前提到的整个文件夹和设置@Samwu)
,就我而言,问题在于它在 32 位应用程序池上运行,但应用程序发布为 Framework-Dependent
,目标运行时为 win-x64
。当我将它切换到 win-x86
时,我的应用程序开始工作,所以我查看了它并发现了应用程序池的问题。我创建了一个新的应用程序池,禁用了 32 位,将我的应用程序切换到该池,然后重新发布,然后它就可以工作了。
asp.net 4路由不工作在iis 7
<system.webServer> <modules runAllManagedModulesForAllRequests="true"> <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule,System.Web,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" /> </modules> <validation validateIntegratedModeConfiguration="false" /> </system.webServer>
任何想法如何排序这个问题?
解决方法
并且不要忘记在你的模块中添加runAllManagedModulesForAllRequests =“true”
<system.webServer> <modules runAllManagedModulesForAllRequests="true"> <remove name="UrlRoutingModule"/> <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule,PublicKeyToken=b03f5f7f11d50a3a" /> </modules> <handlers> <add name="UrlRoutingHandler" preCondition="integratedMode" verb="*" path="UrlRouting.axd" type="System.Web.httpforbiddenhandler,Version=2.0.0.0,PublicKeyToken=b03f5f7f11d50a3a"/> </handlers> </system.webServer>
ASP.NET MVC在IIS6上
我还没有看到任何提供IIS7托管的网站主机的现实选择。主要是因为我不住在美国。
所以我想知道如何你最好在ASP.NET MVC中构建应用程序,并使其易于可用于部署在IIS6和IIS7。请记住,这是标准的web主机,所以没有访问ISAPI过滤器或IIS6内的特殊设置。
在开发ASP.NET MVC应用程序以定位IIS6时,有没有其他人应该考虑?任何不工作的功能?
更新:一个更大的问题是路由的东西。模式{controller} / {action}将在IIS7上工作,而不是IIS6,它需要{controller} .mvc / {action}。那么如何让这个透明?再次,没有ISAPI和没有IIS设置,请。
解决方法
routes.MapRoute( "Default",// Route name "{controller}.aspx/{action}/{id}",// URL with parameters new { controller = "Home",action = "Index",id = "" } // Parameter defaults );
例如,如果您导航到Home.aspx,您的网站应该工作正常。但Default.aspx和默认页面地址http://[website]/停止工作正常。那么如何解决呢?
那么,你需要定义第二条路线。不幸的是,使用Default.aspx作为路由不能正常工作:
routes.MapRoute( "Default2",// Route name "Default.aspx",id = "" } // Parameter defaults );
那么如何让这个工作?那么,这是你需要原始的路由代码:
routes.MapRoute( "Default2",// Route name "{controller}/{action}/{id}",id = "" } // Parameter defaults );
当你这样做,Default.aspx和http://[website]/都开始工作,我想,因为他们成功映射回家控制器。所以完整的解决方案是:
public class MvcApplication : System.Web.HttpApplication { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default",// Route name "{controller}.aspx/{action}/{id}",// URL with parameters new { controller = "Home",id = "" } // Parameter defaults ); routes.MapRoute( "Default2",// Route name "{controller}/{action}/{id}",id = "" } // Parameter defaults ); } protected void Application_Start() { RegisterRoutes(RouteTable.Routes); } }
和你的网站应该开始工作正常在IIS 6(至少它在我的电脑。
并且作为奖励,如果你在你的页面中使用Html.ActionLink(),你不应该改变整个网站的任何其他代码行。此方法负责在控制器的.aspx扩展名上正确标记。
asp.net – IIS 7.0和IIS 7.5之间有什么区别?
(可能不是核心IIS功能,但是其他一些在IIS 7.0上运行的ASP.NET(MVC)功能.)
解决方法
> http://blogs.iis.net/mailant/archive/2009/10/22/general-availability-of-windows-7-amp-windows-server-2008-r2-with-iis-7-5.aspx
> http://4sysops.com/archives/windows-server-2008-r2-new-features-the-complete-list-part-3-iis-75-and-performance/
> http://www.iis.net/ConfigReference/system.webServer/httpCompression>错误修复> FTP发布服务7.5> WebDAV 7.5>客户证书映射> IP安全>请求过滤> URL授权
关于iis-6 – IIS 6上的ASP.NET路由和asp.net iis配置的问题我们已经讲解完毕,感谢您的阅读,如果还想了解更多关于ASP .NET Core IIS 部署 IIS AspNetCore 模块错误:CLR 工作线程过早退出、asp.net 4路由不工作在iis 7、ASP.NET MVC在IIS6上、asp.net – IIS 7.0和IIS 7.5之间有什么区别?等相关内容,可以在本站寻找。
本文标签: