最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

c# - Configuration IIS Express failed with the following error: File name: redirection.config Error: Unable to read configuratio

programmeradmin5浏览0评论

I want to create a new ASP.NET Web Application (.NET Framework) with web forms, but when I press the create button then I got this error message. To fix this issue, I inserted IIS files manually and I copied the config files (applicationhost.config, aspnet.config và redirection.config) from C:\Program Files)\IIS Express\config\templates\PersonalWebServer then pasted them to Documents\IISExpress\config but it is not fixed.

When I pressed create button and got this error message, the project folder was created in source\repos but there was not any .sln file or the project was not opened.

My device is 64-bit and I have Visual Studio 2022. Before this project, I could create another core project but I cannot create a framework web forms project.

I want to create a new ASP.NET Web Application (.NET Framework) with web forms, but when I press the create button then I got this error message. To fix this issue, I inserted IIS files manually and I copied the config files (applicationhost.config, aspnet.config và redirection.config) from C:\Program Files)\IIS Express\config\templates\PersonalWebServer then pasted them to Documents\IISExpress\config but it is not fixed.

When I pressed create button and got this error message, the project folder was created in source\repos but there was not any .sln file or the project was not opened.

My device is 64-bit and I have Visual Studio 2022. Before this project, I could create another core project but I cannot create a framework web forms project.

Share Improve this question edited Mar 12 at 20:18 James Z 12.3k10 gold badges27 silver badges47 bronze badges asked Mar 12 at 9:39 İrem Kürekçiİrem Kürekçi 1238 bronze badges 3
  • 1 The development of .NET Framework was discontinued by Microsoft in 2019. You should therefore avoid starting new projects with it. – Chris Berlin Commented Mar 12 at 11:57
  • @ChrisBerlin Microsoft continues to improve .NET Framework itself as well as VS support of it till now if you check .NET Framework 4.8.1 patch notes/VS 2022 release notes carefully. While upgrading to modern .NET is recommended, it’s too early to call “discontinued“. – Lex Li Commented Mar 12 at 15:29
  • VS2015 and above by default doesn’t use the path Documents\IISExpress\config, so you were not fixing the issue by those steps, docs.lextudio/jexusmanager/getting-started/features.html If possible, try to completely reinstall VS/IIS Express and see if that helps. – Lex Li Commented Mar 12 at 15:34
Add a comment  | 

1 Answer 1

Reset to default 0

Under my testing, when Visual Studio creates a project, it first attempts to read:

%USERPROFILE%\Documents\IISExpress\config\redirection.config

If this file is not found, it then checks:

C:\Program Files\IIS Express\config\templates\PersonalWebServer\redirection.config

Based on your description, it is recommended to verify the permissions for redirection.config. If there are no "deny" permissions set, the issue may be caused by an internal error with IIS Express. In that case, reinstalling IIS Express in VS installer is recommended.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论