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条回答
姐就是有狂的资本
2楼-- · 2019-01-06 13:39

Using VS2013 / Windows 7

Close solution. Open Windows Explorer and right-click on "My Documents\IISExpress\config" directory and select "Decrypt". Be sure "Apply changes to this folder, subfolders and files" is selected. Reopen VS solution.

查看更多
戒情不戒烟
3楼-- · 2019-01-06 13:41

In some situations simply renaming/deleting the applicationhost.config file isn't enough since VS won't always recreate it for you. I believe the following will fix it under all circumstances:

Close Visual Studio.

Make sure there are no IIS Express processes running, then delete C:\Users\XXXX\Documents\IISExpress\config\applicationhost.config (where XXXX is your Windows username).

On command line, execute c:\Program Files\IIS Express\iisexpress.exe. This will recreate the necessary configs. Press 'Q' straight away to end the process.

Open Visual Studio again and Start/Debug your web project. Everything should now be working.

查看更多
【Aperson】
4楼-- · 2019-01-06 13:42

I have the exact same issue with Visual Studio 2013 on Windows 8.1 I map My Documents folder to SkyDrive, so the IISExpress folder was marked as "Online-only". Once I marked it as "Available offline" everything worked.

查看更多
放荡不羁爱自由
5楼-- · 2019-01-06 13:43

For ASP.Net Core just access your Properties section, then make a modification and save it.

Example: I modified the SSL port Core Example

You will get a notification that your launchsettings.json was modified. Accept that and you're good to go.

查看更多
Explosion°爆炸
6楼-- · 2019-01-06 13:44

I had a similar issue to @Myles J but renaming %userprofile%\Documents\IISExpress\config\applicationhost.config didn't work. What I had to do was the following:

  1. Close Visual Studio.
  2. Rename the %userprofile%\Documents\IISExpress\config directory.
  3. Start Visual Studio again. The %userprofile%\Documents\IISExpress\config directory will be recreated with the default config files.
  4. Copy the original applicationhost.config file over the autogenerated one.

Before anyone asks: the permissions on the folders were identical, the read-only flag was not set on the folder or its files, and I didn't modify applicationhost.config in any way.

查看更多
可以哭但决不认输i
7楼-- · 2019-01-06 13:45

Backup files at local IISExpress folder. It can be found at: C:\Users\”username*****”\Documents\IISExpress\config
Go to the location:
C:\Program Files\IIS Express\config\templates\PersonalWebServer
Copy the required files from this directory to the local IISExpress folder.
It worked for me after I copied over the files:
applicationhost.config
aspnet.config
redirection.config

查看更多
登录 后发表回答