IISExpress 8 Cannot read configuration file redire

2019-01-06 13:03发布

I'm running Windows Server 2008 R2 (x64) with IISExpress8 and when navigating to

c:\Program Files (x86)\IIS Express>iisexpress.exe

it says:

Filename: redirection.config

Error: Cannot read configuration file

Any ideas where to start? I can't find anything...

标签: iis-express
21条回答
Summer. ? 凉城
2楼-- · 2019-01-06 13:56

In my case the 'My documents' folder for my work laptop was mapped to a network share. So when the work network was not available I was not able to open my solution.

Change: These will have the value of my docs in network share. Change this to local

I. Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Personal

II. Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Personal

For eg:

Old value: \networkdrive\c$\Users\profile\Documents

New value: C:\Users\profile\Documents

See: https://blogs.msdn.microsoft.com/chiranth/2015/04/01/error-while-runningstarting-a-website-under-iisexpress-in-visual-studio/

查看更多
欢心
3楼-- · 2019-01-06 13:56

I ran into this issue while trying to open another developer's solution after installing VS2013 (Update 3 RC). After following the advice here and deleting/renaming/etc. the config folder, VS re-created the files in the wrong location. It created nested config folders:

C:\Users[user]\Documents\IISExpress\config\config

I moved everything from ...\config\config into ...\config, and it worked as expected.

查看更多
做自己的国王
4楼-- · 2019-01-06 13:57

After installing IIS Express, copy all files from

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

to

%userprofile%\Documents\IISExpress\config

查看更多
再贱就再见
5楼-- · 2019-01-06 13:57

If you do:

C:\Users\”username*****”\Documents\IISExpress\config

You find these file

applicationhost.config
aspnet.config
redirection.config

Delete above 3 file and then open the project.then the problem is solved. I tried, its working fine.

查看更多
家丑人穷心不美
6楼-- · 2019-01-06 13:58

The issue is that the files in C:\Users\"Your Username"\Documents\IISExpress\config are encrypted. Open this folder, Select all the files, Right click and select properties, Click advanced, deselect "Encrypt contents to secure data, Click okay, click apply.

That will fix it.

查看更多
smile是对你的礼貌
7楼-- · 2019-01-06 14:04

If it is ASP.NET Core project

Just try to change iis port in file launchSettings.json by path iisSettings:iisExpress:applicationUrl

查看更多
登录 后发表回答