Ошибка не удалось прочитать файл конфигурации

There is no problem with your web.config. Your web site runs under a process. In iis you can define the identity of that process. The identity that your web site’s application pool runs as (Network Services, Local System, etc.), should have permission to access and read web.config file.

Update:

This updated answer is same as above, but a little longer and simpler and improved.

First of all: you don’t have to change anything in your config file. It’s OK. The problem is with windows file permissions.

This problems occurs because your application can not access and read web.config file.

Make the file accessible to IIS_IUSRS group. Just right click web.config and click properties, under security tab, add IIS_IUSRS.

So what is this IIS_IUSRS thing?

Your web site is like an exe file. Just like any exe file, it should be started by a user and it runs according to permissions assigned to that user.

When your site is started in IIS, Application Pool of your web site is associated with a user (Network Services, Local System, Etc. …) (and can be changed in IIS)

So when you say IIS_IUSRS, it means any user (Network Services, Local System, Etc. …) that your site is running as.

And as @Seph mentioned in comment below: If your computer is on a domain, remember that IIS_IUSRS group is a local group.
Also make sure that when you’re trying to find this user check the location it should be set to local computer and not a corporate domain.

  • Remove From My Forums

 locked

Проблема с IIS (HTTP 500.19 — Internal Server Error Код ошибки 0x80070003 )

  • Вопрос

  • Помогите, плз, разобраться с проблемой. 
    С некоторых пор при обращении https://server/certsrv выдает ошибку:

     Ошибка HTTP 500.19 — Internal Server Error
    Запрашиваемая страница не доступна из-за неверной конфигурации данных для этой страницы.

     Модуль CustomErrorModule  
    Уведомление SendResponse  
    Обработчик Пока не определено  
    Код ошибки 0x80070003  
    Ошибка конфигурации Не удалось прочитать файл конфигурации  
    Файл конфигурации \?C:Windowssystem32CertSrvru-RUweb.config  
    Запрашиваемый URL-адрес https://server:443/CertSrv  
    Физический путь C:Windowssystem32CertSrvru-RU  
    Способ входа Пока не определено  
    Вход пользователя Пока не определено  

     с https ситуация такая же.
    указанного файла (C:Windowssystem32CertSrvru-RUweb.config) в каталоге нет и, судя по всему, раньше когда работа была корректной не было (центр сертификации полностью переустанавливался с предварительным удалением каталогов certsrv  и certlog)

    • Перемещено

      22 апреля 2012 г. 20:15
      (От:Windows Server 2008)

Ответы

  • в итоге:
    открыл общий доступ к каталогу ru-RU (ru-RU$), Пользователи — Чтение, Администраторы — Полный доступ.
    прописал для сайта CertSrv:
    путь к каталогу \serverru-RU$,
    настройка «Подкл. как» — Пользователь приложения (Сквозная проверка подлинности)».

    Всё работает.
    непонятно только почему не работает стандартная настройка (для сайта CertSrv путь к каталогу c:windowssystem32certsrvru-RU) — такое ощущение что попасть в локальную папку (c:windows….ru-RU) через IIS нельзя из-за каких то политик, но сетевой доступ через iis к этой же папке (\serverru-RU$) работает…. о_0

    • Помечено в качестве ответа
      Nikita Panov
      6 августа 2009 г. 5:34

здесь нет проблем с вашей сети.конфигурации. Ваш веб-сайт работает в рамках процесса. В iis можно определить идентификатор этого процесса. Элемент identity это, ваш веб-сайт приложение бассейн работает как (Сетевые Службы, Локальная Система и т. д. …), должны иметь разрешение на доступ и чтение интернета.конфигурационный файл.

обновление:

этот обновленный ответ, такой же, как и выше, но немного дольше, проще и лучше.

в первую очередь: вам не нужно ничего менять в вашем конфигурационном файле. все в порядке. Проблема заключается в права доступа к файлам windows.

эта проблема возникает потому, что приложения не может access и веб-читал.конфигурации.

сделать файл доступным для группу iis_iusrs группы. Просто Правой Кнопкой Мыши сеть.конфигурации и нажмите кнопку свойства, под безопасность tab, добавить группу iis_iusrs.

Так что же это за штука IIS_IUSRS?

код web site и как exe. Как и любой EXE-файл, он должен быть!—1— > запускается пользователем и работает согласно разрешения назначенные этому пользователю.

когда ваш сайт запускается в IIS,приложения Бассейн веб-сайт (Сетевые Службы, Локальная Система и т. д. …) (и может быть изменен в IIS)

поэтому, когда вы говорите группу iis_iusrs, это значит любой (Сетевые Службы, Локальная Система и т. д. …), что ваш сайт работает как.

и @Seph упомянутые в комментарий ниже:если ваш компьютер находится в домене, помните, что группу iis_iusrs группа локальная группа.
Также убедитесь, что при попытке найти этого пользователя проверьте расположение он должен быть установлен на локальный компьютер, а не корпоративный домен.

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…

Liam's user avatar

Liam

26.7k27 gold badges120 silver badges183 bronze badges

asked Apr 9, 2013 at 9:04

user1275154's user avatar

1

I had a similar issue to @Myles J but renaming %userprofile%DocumentsIISExpressconfigapplicationhost.config didn’t work. What I had to do was the following:

  1. Close Visual Studio.
  2. Rename the %userprofile%DocumentsIISExpressconfig directory.
  3. Start Visual Studio again. The %userprofile%DocumentsIISExpressconfig 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.

answered Nov 12, 2013 at 11:51

Ian Kemp's user avatar

Ian KempIan Kemp

27.4k18 gold badges112 silver badges134 bronze badges

8

After installing IIS Express, copy all files from

C:Program FilesIIS ExpressconfigtemplatesPersonalWebServer

to

%userprofile%DocumentsIISExpressconfig

Zameer Ansari's user avatar

Zameer Ansari

27.6k22 gold badges136 silver badges215 bronze badges

answered Jul 25, 2014 at 13:10

user3877075's user avatar

user3877075user3877075

6015 silver badges2 bronze badges

3

Right click on your project file and Edit the project file and remove the URL from IISUrl and reload your project then it will work

answered Apr 9, 2014 at 5:04

Deva's user avatar

DevaDeva

3293 silver badges2 bronze badges

5

I have just resolved this. It is a strange solution but it worked for me. Here are the steps I took:

Navigate to the folder containing the local IISExpress config files (normally My Documents>IISExpress>config on Windows7).

Find the applicationhost.config file. Rename it to something different e.g. applicationhost2.config.

Navigate to your web project in Visual Studio (I was using VS 2012). Right click on the web project and select Use IISExpress. Run the project. It should fail due to the renaming of the config file.

Change the name of the configuration file back to application.config. Ensure «Use Local IIS Web Server» is selected in the web project settings. Run the solution.

This worked for me.

answered Apr 30, 2013 at 8:27

Myles J's user avatar

Myles JMyles J

2,8393 gold badges25 silver badges41 bronze badges

2

If you do:

C:Users”username*****”DocumentsIISExpressconfig

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.

durron597's user avatar

durron597

31.8k16 gold badges99 silver badges155 bronze badges

answered Sep 5, 2015 at 16:55

Ramu Jannu's user avatar

Ramu JannuRamu Jannu

711 silver badge1 bronze badge

1

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.

answered Nov 23, 2013 at 3:33

Matt's user avatar

MattMatt

6,10410 gold badges51 silver badges77 bronze badges

1

Visual Studio will only report the filename it looks for, not the full path. The problem for many users is that the IISExpress with the redirection.config can exist in multiple paths, including a OneDrive path which may not be synced.

To figure out exactly what file Visual Studio attempts to open, use the Microsoft (SysInternals) tool ProcMon. It lists all files and resources Windows tries to access. Add a filter for «Path contains redirection.config» and reproduce the problem in Visual Studio. Now you will see the actual path it tries to use.

In my case, I have multiple IISExpress folders. One that was synced to OneDrive and another one that was local. Visual Studio tried to access the OneDrive folder which was not synced to the local disk, and thus it failed.

Forcing IISExpress folder to store files locally resolved the problem

answered May 7, 2020 at 7:57

Dan Gøran Lunde's user avatar

Dan Gøran LundeDan Gøran Lunde

5,0993 gold badges25 silver badges24 bronze badges

3

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:UsersXXXXDocumentsIISExpressconfigapplicationhost.config (where XXXX is your Windows username).

On command line, execute c:Program FilesIIS Expressiisexpress.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.

answered Jun 27, 2014 at 4:35

David Fidge's user avatar

David FidgeDavid Fidge

4415 silver badges6 bronze badges

2

Backup files at local IISExpress folder. It can be found at: C:Users”username*****”DocumentsIISExpressconfig
Go to the location:
C:Program FilesIIS ExpressconfigtemplatesPersonalWebServer
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

answered Feb 19, 2015 at 14:55

user_s's user avatar

user_suser_s

811 silver badge2 bronze badges

1

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. ComputerHKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerShell FoldersPersonal

II. ComputerHKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerUser Shell FoldersPersonal

For eg:

Old value: networkdrivec$UsersprofileDocuments

New value: C:UsersprofileDocuments

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

answered Aug 29, 2016 at 11:27

Khabba's user avatar

The issue is that the files in C:Users»Your Username»DocumentsIISExpressconfig 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.

answered Jul 24, 2015 at 17:21

jshaw's user avatar

jshawjshaw

214 bronze badges

Using Visual Studio 2013

I had to stop visual studio rename the whole config directory, Documents > IISExpress> Config then start a new web project, which fails but it recreates the config directory, then I rebooted and launched visual studio and everything worked!

I noticed this problem after copying a project between 2 computers, perhaps it was caused by a duplicate IISExpress port or something trivial.

answered May 12, 2014 at 16:51

JustEngland's user avatar

JustEnglandJustEngland

1,36313 silver badges30 bronze badges

1

Using VS2013 / Windows 7

Close solution. Open Windows Explorer and right-click on «My DocumentsIISExpressconfig» directory and select «Decrypt». Be sure «Apply changes to this folder, subfolders and files» is selected. Reopen VS solution.

answered Jun 18, 2014 at 19:46

user3754015's user avatar

In my case it happened when IISExpress was still active from a previous VS session and new instance of VS was run.

The solution was to stop (or kill) IIS Express instance.

answered Feb 26, 2015 at 10:37

andrew.fox's user avatar

andrew.foxandrew.fox

7,0355 gold badges51 silver badges72 bronze badges

1

Fix was really simple for me >> Restart Visual Studio

My setup:

  • Visual Studio 2015

  • Web projects use local IIS 8.5

  • I occasionally experience what I believe to be a VS bug where it converts some projects to use IISExpress (this is fixed by deleting the folder created in /This PC/Documents). This might be related.

answered Aug 29, 2016 at 19:08

GraehamF's user avatar

GraehamFGraehamF

1,96124 silver badges24 bronze badges

You don’t need to close Visual Studio or rename anything.

  1. Open properties for %userprofile%Documents
  2. Select Security > Advanced, change owner to yourself (again if you are already owner).
  3. Select «Replace owner on subcontainers and objects» and «Replace all child object permission entires with inherited permission entires from this object».
  4. Ok.

answered Jun 13, 2018 at 8:57

amuliar's user avatar

amuliaramuliar

1,28015 silver badges26 bronze badges

For me, It’s a simple lack of permission either give everyone permission
to «%userprofile%DocumentsIISExpressconfig» this folder or Open VS in Admin mode

answered Dec 18, 2020 at 11:49

GSKKC's user avatar

GSKKCGSKKC

456 bronze badges

for me was removing the file DocumentsIISExpressconfigapplicationhost.config

Closing visual studio > Open > Debug

Thanks for the previous answer help go straight to the issue

answered Apr 15, 2021 at 20:43

Starlin González's user avatar

After trying to solve an issue with a quick fix of changing IIS express inside visual studio from integrated to classic pipeline , I ended up not being able to use IIS express at all. I tried all techniques above…

I could not rename , copy the file. Uninstall of IIS express and re-install did not work.

I FINALLY downloaded the latest version of WebMatrix and installed IIS express 8, that did not work, but at least then i was able to finally delete the old directory and then I recreated itself…..

NOT FUN AT ALL.

answered Jan 3, 2014 at 9:07

Tom Stickel's user avatar

Tom StickelTom Stickel

19.2k6 gold badges110 silver badges113 bronze badges

I resolved this (with vs2013 and windows 7) by going to Documents > IISExpress> Config and renaming the application.config. After that, I restarted visual studio and opened my project and it worked.

answered Feb 22, 2014 at 16:14

nixkuroi's user avatar

nixkuroinixkuroi

2,2241 gold badge19 silver badges24 bronze badges

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]DocumentsIISExpressconfigconfig

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

answered Jul 21, 2014 at 22:20

Brandon Gano's user avatar

Brandon GanoBrandon Gano

6,1901 gold badge24 silver badges23 bronze badges

I found that deleting one of the sites from the applicationhost.config file resolve this problem for me.

I used the following command from the %ProgramFiles(x86)%IISExpress directory:

appcmd list site

then

appcmd delete site rogueSiteName

Especially there was a site name with a bracketed number suffix (e.g. «MySite(1)») that I deleted. I’m not sure yet if VS2013 just had an issue with the brackets or that two sites pointed to the same directory. Either way deleting it made VS happy again.

Background

I had been struggling with this issue for a couple of days and nothing seemed to help — not even the instructions given in the top answers here.

I had also tried moving the config folder as mentioned in http://www.iis.net/learn/extensions/introduction-to-iis-express/iis-80-express-readme. But although VS2013 recreated the directory structure and files in the new location the errors continued and running appcmd showed that it was still pointing at the old location by default.

Credits

Credit for where I found the commands to use goes to http://gyorgybalassy.wordpress.com/2013/12/02/cleaning-up-iis-express-configuration/

answered Nov 7, 2014 at 11:23

WooWaaBob's user avatar

WooWaaBobWooWaaBob

3,3273 gold badges22 silver badges23 bronze badges

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.

answered Nov 29, 2016 at 11:35

Razvan Dumitru's user avatar

Razvan DumitruRazvan Dumitru

11.3k5 gold badges32 silver badges50 bronze badges

If it is ASP.NET Core project

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

answered Aug 14, 2017 at 10:37

skorenb's user avatar

skorenbskorenb

6291 gold badge9 silver badges16 bronze badges

It’s 2020, I am reporting the same problem in Visual Studio 2019.

Cause: Multiple VS instances open with different web app (Blazor in my instance).

Solution: Close all VS instances and re-open the solution that you want to run.

answered May 16, 2020 at 12:01

Johnny Wu's user avatar

Johnny WuJohnny Wu

1,19713 silver badges28 bronze badges

On IIS 10 Express. Make sure that Visual Studio (VS) is turned off.

I first found out that %userprofile%DocumentsIISExpressconfig was not working.

I first thought IIS Express had clashed with IIS from the windows OS.

I uninstalled it, yet no changes, then I uninstalled IIS 10 Express that was installed with VS 2019 through the control panel.

Then I went ahead to discover that this file is saved at the C:UsersusernameOneDriveDocumentsIISExpress, associated with one drive storage, so I advise you copy %userprofile%DocumentsIISExpressconfig and paste in your windows explorer navigation to find directory.

go to one directory higher, and/or rename the config folder. Restart your VS and run the project again.

answered Nov 22, 2020 at 6:47

Rikudou En Sof's user avatar

Mine was caused by OneDrive. Apparently my documents folder is being synced to it.
What I did is changed the location of the documents folder through regedit and navigated to this path:

HKEY_CURRENT_USER > Software > Microsoft > Windows > CurrentVersion > Explorer > User Shell Folders

and then changed the value of Personal
from: C:Usersmy usernameOneDriveDocuments
to C:Usersmy usernameDocuments

After that I restart my computer and I was able to create a VS project.

answered Jun 12, 2021 at 17:18

Andrew Casal's user avatar

I have the same issue,
First time, i think Visual Studio not permission access to %userprofile%DocumentsIISExpressconfig so i run Visual Studio with Administrator, but it not working.
I try all answer above but still the error!

Finally, i look internet, i see my onedrive is stopping, i enable and sync data. Restart computer and worked.

answered Oct 9, 2022 at 16:50

HOÀNG LONG's user avatar

HOÀNG LONGHOÀNG LONG

3632 silver badges12 bronze badges

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…

Liam's user avatar

Liam

26.7k27 gold badges120 silver badges183 bronze badges

asked Apr 9, 2013 at 9:04

user1275154's user avatar

1

I had a similar issue to @Myles J but renaming %userprofile%DocumentsIISExpressconfigapplicationhost.config didn’t work. What I had to do was the following:

  1. Close Visual Studio.
  2. Rename the %userprofile%DocumentsIISExpressconfig directory.
  3. Start Visual Studio again. The %userprofile%DocumentsIISExpressconfig 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.

answered Nov 12, 2013 at 11:51

Ian Kemp's user avatar

Ian KempIan Kemp

27.4k18 gold badges112 silver badges134 bronze badges

8

After installing IIS Express, copy all files from

C:Program FilesIIS ExpressconfigtemplatesPersonalWebServer

to

%userprofile%DocumentsIISExpressconfig

Zameer Ansari's user avatar

Zameer Ansari

27.6k22 gold badges136 silver badges215 bronze badges

answered Jul 25, 2014 at 13:10

user3877075's user avatar

user3877075user3877075

6015 silver badges2 bronze badges

3

Right click on your project file and Edit the project file and remove the URL from IISUrl and reload your project then it will work

answered Apr 9, 2014 at 5:04

Deva's user avatar

DevaDeva

3293 silver badges2 bronze badges

5

I have just resolved this. It is a strange solution but it worked for me. Here are the steps I took:

Navigate to the folder containing the local IISExpress config files (normally My Documents>IISExpress>config on Windows7).

Find the applicationhost.config file. Rename it to something different e.g. applicationhost2.config.

Navigate to your web project in Visual Studio (I was using VS 2012). Right click on the web project and select Use IISExpress. Run the project. It should fail due to the renaming of the config file.

Change the name of the configuration file back to application.config. Ensure «Use Local IIS Web Server» is selected in the web project settings. Run the solution.

This worked for me.

answered Apr 30, 2013 at 8:27

Myles J's user avatar

Myles JMyles J

2,8393 gold badges25 silver badges41 bronze badges

2

If you do:

C:Users”username*****”DocumentsIISExpressconfig

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.

durron597's user avatar

durron597

31.8k16 gold badges99 silver badges155 bronze badges

answered Sep 5, 2015 at 16:55

Ramu Jannu's user avatar

Ramu JannuRamu Jannu

711 silver badge1 bronze badge

1

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.

answered Nov 23, 2013 at 3:33

Matt's user avatar

MattMatt

6,10410 gold badges51 silver badges77 bronze badges

1

Visual Studio will only report the filename it looks for, not the full path. The problem for many users is that the IISExpress with the redirection.config can exist in multiple paths, including a OneDrive path which may not be synced.

To figure out exactly what file Visual Studio attempts to open, use the Microsoft (SysInternals) tool ProcMon. It lists all files and resources Windows tries to access. Add a filter for «Path contains redirection.config» and reproduce the problem in Visual Studio. Now you will see the actual path it tries to use.

In my case, I have multiple IISExpress folders. One that was synced to OneDrive and another one that was local. Visual Studio tried to access the OneDrive folder which was not synced to the local disk, and thus it failed.

Forcing IISExpress folder to store files locally resolved the problem

answered May 7, 2020 at 7:57

Dan Gøran Lunde's user avatar

Dan Gøran LundeDan Gøran Lunde

5,0993 gold badges25 silver badges24 bronze badges

3

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:UsersXXXXDocumentsIISExpressconfigapplicationhost.config (where XXXX is your Windows username).

On command line, execute c:Program FilesIIS Expressiisexpress.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.

answered Jun 27, 2014 at 4:35

David Fidge's user avatar

David FidgeDavid Fidge

4415 silver badges6 bronze badges

2

Backup files at local IISExpress folder. It can be found at: C:Users”username*****”DocumentsIISExpressconfig
Go to the location:
C:Program FilesIIS ExpressconfigtemplatesPersonalWebServer
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

answered Feb 19, 2015 at 14:55

user_s's user avatar

user_suser_s

811 silver badge2 bronze badges

1

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. ComputerHKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerShell FoldersPersonal

II. ComputerHKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerUser Shell FoldersPersonal

For eg:

Old value: networkdrivec$UsersprofileDocuments

New value: C:UsersprofileDocuments

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

answered Aug 29, 2016 at 11:27

Khabba's user avatar

The issue is that the files in C:Users»Your Username»DocumentsIISExpressconfig 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.

answered Jul 24, 2015 at 17:21

jshaw's user avatar

jshawjshaw

214 bronze badges

Using Visual Studio 2013

I had to stop visual studio rename the whole config directory, Documents > IISExpress> Config then start a new web project, which fails but it recreates the config directory, then I rebooted and launched visual studio and everything worked!

I noticed this problem after copying a project between 2 computers, perhaps it was caused by a duplicate IISExpress port or something trivial.

answered May 12, 2014 at 16:51

JustEngland's user avatar

JustEnglandJustEngland

1,36313 silver badges30 bronze badges

1

Using VS2013 / Windows 7

Close solution. Open Windows Explorer and right-click on «My DocumentsIISExpressconfig» directory and select «Decrypt». Be sure «Apply changes to this folder, subfolders and files» is selected. Reopen VS solution.

answered Jun 18, 2014 at 19:46

user3754015's user avatar

In my case it happened when IISExpress was still active from a previous VS session and new instance of VS was run.

The solution was to stop (or kill) IIS Express instance.

answered Feb 26, 2015 at 10:37

andrew.fox's user avatar

andrew.foxandrew.fox

7,0355 gold badges51 silver badges72 bronze badges

1

Fix was really simple for me >> Restart Visual Studio

My setup:

  • Visual Studio 2015

  • Web projects use local IIS 8.5

  • I occasionally experience what I believe to be a VS bug where it converts some projects to use IISExpress (this is fixed by deleting the folder created in /This PC/Documents). This might be related.

answered Aug 29, 2016 at 19:08

GraehamF's user avatar

GraehamFGraehamF

1,96124 silver badges24 bronze badges

You don’t need to close Visual Studio or rename anything.

  1. Open properties for %userprofile%Documents
  2. Select Security > Advanced, change owner to yourself (again if you are already owner).
  3. Select «Replace owner on subcontainers and objects» and «Replace all child object permission entires with inherited permission entires from this object».
  4. Ok.

answered Jun 13, 2018 at 8:57

amuliar's user avatar

amuliaramuliar

1,28015 silver badges26 bronze badges

For me, It’s a simple lack of permission either give everyone permission
to «%userprofile%DocumentsIISExpressconfig» this folder or Open VS in Admin mode

answered Dec 18, 2020 at 11:49

GSKKC's user avatar

GSKKCGSKKC

456 bronze badges

for me was removing the file DocumentsIISExpressconfigapplicationhost.config

Closing visual studio > Open > Debug

Thanks for the previous answer help go straight to the issue

answered Apr 15, 2021 at 20:43

Starlin González's user avatar

After trying to solve an issue with a quick fix of changing IIS express inside visual studio from integrated to classic pipeline , I ended up not being able to use IIS express at all. I tried all techniques above…

I could not rename , copy the file. Uninstall of IIS express and re-install did not work.

I FINALLY downloaded the latest version of WebMatrix and installed IIS express 8, that did not work, but at least then i was able to finally delete the old directory and then I recreated itself…..

NOT FUN AT ALL.

answered Jan 3, 2014 at 9:07

Tom Stickel's user avatar

Tom StickelTom Stickel

19.2k6 gold badges110 silver badges113 bronze badges

I resolved this (with vs2013 and windows 7) by going to Documents > IISExpress> Config and renaming the application.config. After that, I restarted visual studio and opened my project and it worked.

answered Feb 22, 2014 at 16:14

nixkuroi's user avatar

nixkuroinixkuroi

2,2241 gold badge19 silver badges24 bronze badges

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]DocumentsIISExpressconfigconfig

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

answered Jul 21, 2014 at 22:20

Brandon Gano's user avatar

Brandon GanoBrandon Gano

6,1901 gold badge24 silver badges23 bronze badges

I found that deleting one of the sites from the applicationhost.config file resolve this problem for me.

I used the following command from the %ProgramFiles(x86)%IISExpress directory:

appcmd list site

then

appcmd delete site rogueSiteName

Especially there was a site name with a bracketed number suffix (e.g. «MySite(1)») that I deleted. I’m not sure yet if VS2013 just had an issue with the brackets or that two sites pointed to the same directory. Either way deleting it made VS happy again.

Background

I had been struggling with this issue for a couple of days and nothing seemed to help — not even the instructions given in the top answers here.

I had also tried moving the config folder as mentioned in http://www.iis.net/learn/extensions/introduction-to-iis-express/iis-80-express-readme. But although VS2013 recreated the directory structure and files in the new location the errors continued and running appcmd showed that it was still pointing at the old location by default.

Credits

Credit for where I found the commands to use goes to http://gyorgybalassy.wordpress.com/2013/12/02/cleaning-up-iis-express-configuration/

answered Nov 7, 2014 at 11:23

WooWaaBob's user avatar

WooWaaBobWooWaaBob

3,3273 gold badges22 silver badges23 bronze badges

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.

answered Nov 29, 2016 at 11:35

Razvan Dumitru's user avatar

Razvan DumitruRazvan Dumitru

11.3k5 gold badges32 silver badges50 bronze badges

If it is ASP.NET Core project

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

answered Aug 14, 2017 at 10:37

skorenb's user avatar

skorenbskorenb

6291 gold badge9 silver badges16 bronze badges

It’s 2020, I am reporting the same problem in Visual Studio 2019.

Cause: Multiple VS instances open with different web app (Blazor in my instance).

Solution: Close all VS instances and re-open the solution that you want to run.

answered May 16, 2020 at 12:01

Johnny Wu's user avatar

Johnny WuJohnny Wu

1,19713 silver badges28 bronze badges

On IIS 10 Express. Make sure that Visual Studio (VS) is turned off.

I first found out that %userprofile%DocumentsIISExpressconfig was not working.

I first thought IIS Express had clashed with IIS from the windows OS.

I uninstalled it, yet no changes, then I uninstalled IIS 10 Express that was installed with VS 2019 through the control panel.

Then I went ahead to discover that this file is saved at the C:UsersusernameOneDriveDocumentsIISExpress, associated with one drive storage, so I advise you copy %userprofile%DocumentsIISExpressconfig and paste in your windows explorer navigation to find directory.

go to one directory higher, and/or rename the config folder. Restart your VS and run the project again.

answered Nov 22, 2020 at 6:47

Rikudou En Sof's user avatar

Mine was caused by OneDrive. Apparently my documents folder is being synced to it.
What I did is changed the location of the documents folder through regedit and navigated to this path:

HKEY_CURRENT_USER > Software > Microsoft > Windows > CurrentVersion > Explorer > User Shell Folders

and then changed the value of Personal
from: C:Usersmy usernameOneDriveDocuments
to C:Usersmy usernameDocuments

After that I restart my computer and I was able to create a VS project.

answered Jun 12, 2021 at 17:18

Andrew Casal's user avatar

I have the same issue,
First time, i think Visual Studio not permission access to %userprofile%DocumentsIISExpressconfig so i run Visual Studio with Administrator, but it not working.
I try all answer above but still the error!

Finally, i look internet, i see my onedrive is stopping, i enable and sync data. Restart computer and worked.

answered Oct 9, 2022 at 16:50

HOÀNG LONG's user avatar

HOÀNG LONGHOÀNG LONG

3632 silver badges12 bronze badges

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…

Liam's user avatar

Liam

26.7k27 gold badges120 silver badges183 bronze badges

asked Apr 9, 2013 at 9:04

user1275154's user avatar

1

I had a similar issue to @Myles J but renaming %userprofile%DocumentsIISExpressconfigapplicationhost.config didn’t work. What I had to do was the following:

  1. Close Visual Studio.
  2. Rename the %userprofile%DocumentsIISExpressconfig directory.
  3. Start Visual Studio again. The %userprofile%DocumentsIISExpressconfig 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.

answered Nov 12, 2013 at 11:51

Ian Kemp's user avatar

Ian KempIan Kemp

27.4k18 gold badges112 silver badges134 bronze badges

8

After installing IIS Express, copy all files from

C:Program FilesIIS ExpressconfigtemplatesPersonalWebServer

to

%userprofile%DocumentsIISExpressconfig

Zameer Ansari's user avatar

Zameer Ansari

27.6k22 gold badges136 silver badges215 bronze badges

answered Jul 25, 2014 at 13:10

user3877075's user avatar

user3877075user3877075

6015 silver badges2 bronze badges

3

Right click on your project file and Edit the project file and remove the URL from IISUrl and reload your project then it will work

answered Apr 9, 2014 at 5:04

Deva's user avatar

DevaDeva

3293 silver badges2 bronze badges

5

I have just resolved this. It is a strange solution but it worked for me. Here are the steps I took:

Navigate to the folder containing the local IISExpress config files (normally My Documents>IISExpress>config on Windows7).

Find the applicationhost.config file. Rename it to something different e.g. applicationhost2.config.

Navigate to your web project in Visual Studio (I was using VS 2012). Right click on the web project and select Use IISExpress. Run the project. It should fail due to the renaming of the config file.

Change the name of the configuration file back to application.config. Ensure «Use Local IIS Web Server» is selected in the web project settings. Run the solution.

This worked for me.

answered Apr 30, 2013 at 8:27

Myles J's user avatar

Myles JMyles J

2,8393 gold badges25 silver badges41 bronze badges

2

If you do:

C:Users”username*****”DocumentsIISExpressconfig

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.

durron597's user avatar

durron597

31.8k16 gold badges99 silver badges155 bronze badges

answered Sep 5, 2015 at 16:55

Ramu Jannu's user avatar

Ramu JannuRamu Jannu

711 silver badge1 bronze badge

1

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.

answered Nov 23, 2013 at 3:33

Matt's user avatar

MattMatt

6,10410 gold badges51 silver badges77 bronze badges

1

Visual Studio will only report the filename it looks for, not the full path. The problem for many users is that the IISExpress with the redirection.config can exist in multiple paths, including a OneDrive path which may not be synced.

To figure out exactly what file Visual Studio attempts to open, use the Microsoft (SysInternals) tool ProcMon. It lists all files and resources Windows tries to access. Add a filter for «Path contains redirection.config» and reproduce the problem in Visual Studio. Now you will see the actual path it tries to use.

In my case, I have multiple IISExpress folders. One that was synced to OneDrive and another one that was local. Visual Studio tried to access the OneDrive folder which was not synced to the local disk, and thus it failed.

Forcing IISExpress folder to store files locally resolved the problem

answered May 7, 2020 at 7:57

Dan Gøran Lunde's user avatar

Dan Gøran LundeDan Gøran Lunde

5,0993 gold badges25 silver badges24 bronze badges

3

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:UsersXXXXDocumentsIISExpressconfigapplicationhost.config (where XXXX is your Windows username).

On command line, execute c:Program FilesIIS Expressiisexpress.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.

answered Jun 27, 2014 at 4:35

David Fidge's user avatar

David FidgeDavid Fidge

4415 silver badges6 bronze badges

2

Backup files at local IISExpress folder. It can be found at: C:Users”username*****”DocumentsIISExpressconfig
Go to the location:
C:Program FilesIIS ExpressconfigtemplatesPersonalWebServer
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

answered Feb 19, 2015 at 14:55

user_s's user avatar

user_suser_s

811 silver badge2 bronze badges

1

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. ComputerHKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerShell FoldersPersonal

II. ComputerHKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerUser Shell FoldersPersonal

For eg:

Old value: networkdrivec$UsersprofileDocuments

New value: C:UsersprofileDocuments

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

answered Aug 29, 2016 at 11:27

Khabba's user avatar

The issue is that the files in C:Users»Your Username»DocumentsIISExpressconfig 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.

answered Jul 24, 2015 at 17:21

jshaw's user avatar

jshawjshaw

214 bronze badges

Using Visual Studio 2013

I had to stop visual studio rename the whole config directory, Documents > IISExpress> Config then start a new web project, which fails but it recreates the config directory, then I rebooted and launched visual studio and everything worked!

I noticed this problem after copying a project between 2 computers, perhaps it was caused by a duplicate IISExpress port or something trivial.

answered May 12, 2014 at 16:51

JustEngland's user avatar

JustEnglandJustEngland

1,36313 silver badges30 bronze badges

1

Using VS2013 / Windows 7

Close solution. Open Windows Explorer and right-click on «My DocumentsIISExpressconfig» directory and select «Decrypt». Be sure «Apply changes to this folder, subfolders and files» is selected. Reopen VS solution.

answered Jun 18, 2014 at 19:46

user3754015's user avatar

In my case it happened when IISExpress was still active from a previous VS session and new instance of VS was run.

The solution was to stop (or kill) IIS Express instance.

answered Feb 26, 2015 at 10:37

andrew.fox's user avatar

andrew.foxandrew.fox

7,0355 gold badges51 silver badges72 bronze badges

1

Fix was really simple for me >> Restart Visual Studio

My setup:

  • Visual Studio 2015

  • Web projects use local IIS 8.5

  • I occasionally experience what I believe to be a VS bug where it converts some projects to use IISExpress (this is fixed by deleting the folder created in /This PC/Documents). This might be related.

answered Aug 29, 2016 at 19:08

GraehamF's user avatar

GraehamFGraehamF

1,96124 silver badges24 bronze badges

You don’t need to close Visual Studio or rename anything.

  1. Open properties for %userprofile%Documents
  2. Select Security > Advanced, change owner to yourself (again if you are already owner).
  3. Select «Replace owner on subcontainers and objects» and «Replace all child object permission entires with inherited permission entires from this object».
  4. Ok.

answered Jun 13, 2018 at 8:57

amuliar's user avatar

amuliaramuliar

1,28015 silver badges26 bronze badges

For me, It’s a simple lack of permission either give everyone permission
to «%userprofile%DocumentsIISExpressconfig» this folder or Open VS in Admin mode

answered Dec 18, 2020 at 11:49

GSKKC's user avatar

GSKKCGSKKC

456 bronze badges

for me was removing the file DocumentsIISExpressconfigapplicationhost.config

Closing visual studio > Open > Debug

Thanks for the previous answer help go straight to the issue

answered Apr 15, 2021 at 20:43

Starlin González's user avatar

After trying to solve an issue with a quick fix of changing IIS express inside visual studio from integrated to classic pipeline , I ended up not being able to use IIS express at all. I tried all techniques above…

I could not rename , copy the file. Uninstall of IIS express and re-install did not work.

I FINALLY downloaded the latest version of WebMatrix and installed IIS express 8, that did not work, but at least then i was able to finally delete the old directory and then I recreated itself…..

NOT FUN AT ALL.

answered Jan 3, 2014 at 9:07

Tom Stickel's user avatar

Tom StickelTom Stickel

19.2k6 gold badges110 silver badges113 bronze badges

I resolved this (with vs2013 and windows 7) by going to Documents > IISExpress> Config and renaming the application.config. After that, I restarted visual studio and opened my project and it worked.

answered Feb 22, 2014 at 16:14

nixkuroi's user avatar

nixkuroinixkuroi

2,2241 gold badge19 silver badges24 bronze badges

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]DocumentsIISExpressconfigconfig

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

answered Jul 21, 2014 at 22:20

Brandon Gano's user avatar

Brandon GanoBrandon Gano

6,1901 gold badge24 silver badges23 bronze badges

I found that deleting one of the sites from the applicationhost.config file resolve this problem for me.

I used the following command from the %ProgramFiles(x86)%IISExpress directory:

appcmd list site

then

appcmd delete site rogueSiteName

Especially there was a site name with a bracketed number suffix (e.g. «MySite(1)») that I deleted. I’m not sure yet if VS2013 just had an issue with the brackets or that two sites pointed to the same directory. Either way deleting it made VS happy again.

Background

I had been struggling with this issue for a couple of days and nothing seemed to help — not even the instructions given in the top answers here.

I had also tried moving the config folder as mentioned in http://www.iis.net/learn/extensions/introduction-to-iis-express/iis-80-express-readme. But although VS2013 recreated the directory structure and files in the new location the errors continued and running appcmd showed that it was still pointing at the old location by default.

Credits

Credit for where I found the commands to use goes to http://gyorgybalassy.wordpress.com/2013/12/02/cleaning-up-iis-express-configuration/

answered Nov 7, 2014 at 11:23

WooWaaBob's user avatar

WooWaaBobWooWaaBob

3,3273 gold badges22 silver badges23 bronze badges

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.

answered Nov 29, 2016 at 11:35

Razvan Dumitru's user avatar

Razvan DumitruRazvan Dumitru

11.3k5 gold badges32 silver badges50 bronze badges

If it is ASP.NET Core project

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

answered Aug 14, 2017 at 10:37

skorenb's user avatar

skorenbskorenb

6291 gold badge9 silver badges16 bronze badges

It’s 2020, I am reporting the same problem in Visual Studio 2019.

Cause: Multiple VS instances open with different web app (Blazor in my instance).

Solution: Close all VS instances and re-open the solution that you want to run.

answered May 16, 2020 at 12:01

Johnny Wu's user avatar

Johnny WuJohnny Wu

1,19713 silver badges28 bronze badges

On IIS 10 Express. Make sure that Visual Studio (VS) is turned off.

I first found out that %userprofile%DocumentsIISExpressconfig was not working.

I first thought IIS Express had clashed with IIS from the windows OS.

I uninstalled it, yet no changes, then I uninstalled IIS 10 Express that was installed with VS 2019 through the control panel.

Then I went ahead to discover that this file is saved at the C:UsersusernameOneDriveDocumentsIISExpress, associated with one drive storage, so I advise you copy %userprofile%DocumentsIISExpressconfig and paste in your windows explorer navigation to find directory.

go to one directory higher, and/or rename the config folder. Restart your VS and run the project again.

answered Nov 22, 2020 at 6:47

Rikudou En Sof's user avatar

Mine was caused by OneDrive. Apparently my documents folder is being synced to it.
What I did is changed the location of the documents folder through regedit and navigated to this path:

HKEY_CURRENT_USER > Software > Microsoft > Windows > CurrentVersion > Explorer > User Shell Folders

and then changed the value of Personal
from: C:Usersmy usernameOneDriveDocuments
to C:Usersmy usernameDocuments

After that I restart my computer and I was able to create a VS project.

answered Jun 12, 2021 at 17:18

Andrew Casal's user avatar

I have the same issue,
First time, i think Visual Studio not permission access to %userprofile%DocumentsIISExpressconfig so i run Visual Studio with Administrator, but it not working.
I try all answer above but still the error!

Finally, i look internet, i see my onedrive is stopping, i enable and sync data. Restart computer and worked.

answered Oct 9, 2022 at 16:50

HOÀNG LONG's user avatar

HOÀNG LONGHOÀNG LONG

3632 silver badges12 bronze badges

Я запускаю Windows Server 2008 R2 (x64) с помощью IISExpress8 и при навигации по

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

он говорит:

Имя файла: redirection.config

Ошибка: не удается прочитать файл конфигурации

Любые идеи, с чего начать?
Я ничего не могу найти…

Ответ 1

У меня была аналогичная проблема с @Myles J, но переименование %userprofile%DocumentsIISExpressconfigapplicationhost.config не помогло. Я должен был сделать следующее:

  • Закрыть Visual Studio.
  • Переименуйте каталог %userprofile%DocumentsIISExpressconfig .
  • Запустите Visual Studio еще раз. Каталог %userprofile%DocumentsIISExpressconfig будет воссоздан с конфигурационными файлами по умолчанию.
  • Скопируйте исходный файл applicationhost.config через автогенерированный файл.

Прежде чем кто-нибудь спросит: разрешения на папки были идентичными, флаг «только для чтения» не был установлен в папке или ее файлах, и я не изменял applicationhost.config каким-либо образом.

Ответ 2

После установки IIS Express скопируйте все файлы из

C:Program FilesIIS ExpressconfigtemplatesPersonalWebServer

to

% USERPROFILE%DocumentsIISExpressCONFIG

Ответ 3

Щелкните правой кнопкой мыши на файле проекта и отредактируйте файл проекта и удалите URL-адрес из IISUrl и перезагрузите проект, затем он будет работать

Ответ 4

Я только что решил это. Это странное решение, но это сработало для меня. Вот шаги, которые я предпринял:

Перейдите в папку, содержащую локальные файлы конфигурации IISExpress (обычно My Documents > IISExpress > config на Windows7).

Найдите файл applicationhost.config. Переименуйте его на что-то другое, например. applicationhost2.config.

Перейдите в свой веб-проект в Visual Studio (я использовал VS 2012). Щелкните правой кнопкой мыши веб-проект и выберите «Использовать IISExpress». Запустите проект. Он должен выйти из строя из-за переименования конфигурационного файла.

Измените имя файла конфигурации обратно на application.config. Убедитесь, что в настройках веб-проекта выбрано «Использовать локальный веб-сервер IIS». Запустите решение.

Это сработало для меня.

Ответ 5

У меня такая же проблема с Visual Studio 2013 в Windows 8.1
Я переношу папку Мои документы в SkyDrive, поэтому папка IISExpress была отмечена как «Только для Интернета». Как только я обозначил его как «Доступный офлайн», все сработало.

Ответ 6

Резервное копирование файлов в локальной папке IISExpress. Его можно найти по адресу: C:Users «имя пользователя *****» DocumentsIISExpressconfig
Перейдите в местоположение:
C:Program FilesIIS ExpressconfigtemplatesPersonalWebServer
Скопируйте необходимые файлы из этого каталога в локальную папку IISExpress.
Это сработало для меня после того, как я скопировал файлы:
ApplicationHost.config
aspnet.config
redirection.config

Ответ 7

В некоторых ситуациях просто переименование/удаление файла applicationhost.config недостаточно, так как VS не всегда будет воссоздавать его для вас. Я считаю, что следующее будет исправлено при любых обстоятельствах:

Закройте Visual Studio.

Убедитесь, что процессы IIS Express не запущены, а затем удалите C:UsersXXXXDocumentsIISExpressconfigapplicationhost.config(где XXXX — ваше имя пользователя Windows).

В командной строке выполните c:Program FilesIIS Expressiisexpress.exe. Это воссоздает необходимые конфиги. Нажмите «Q», чтобы закончить процесс.

Откройте Visual Studio снова и запустите/отлаживайте свой веб-проект. Теперь все должно работать.

Ответ 8

Проблема в том, что файлы в C:Users «Your Username» DocumentsIISExpressconfig зашифрованы.
Откройте эту папку, выберите все файлы, щелкните правой кнопкой мыши и выберите свойства,
Нажмите «Дополнительно», отмените выбор «Шифровать содержимое для защиты данных, нажмите» ОК «, нажмите» Применить «.

Это исправит.

Ответ 9

Если вы выполните:

C:Users"username*****"DocumentsIISExpressconfig

Вы найдете этот файл

applicationhost.config
aspnet.config
redirection.config

Удалить выше 3 файла, а затем открыть проект. Затем проблема решена. Я старался, его работала нормально.

Ответ 10

Использование Visual Studio 2013

Мне пришлось прекратить визуальную студию переименовать весь каталог конфигурации, Documents > IISExpress > Config, а затем запустить новый веб-проект, который не удался, но он воссоздает каталог config, затем я перезагрузил и запустил визуальную студию, и все сработало!

Я заметил эту проблему после копирования проекта между двумя компьютерами, возможно, это было вызвано дублирующимся портом IISExpress или чем-то тривиальным.

Ответ 11

Использование VS2013/Windows 7

Закрыть решение. Откройте проводник Windows и щелкните правой кнопкой мыши каталог «Мои документы IISExpressconfig» и выберите «Расшифровать». Убедитесь, что выбрано «Применить изменения к этой папке, вложенным папкам и файлам». Повторно открыть VS решение.

Ответ 12

В моем случае это случилось, когда IISExpress все еще был активен из предыдущего сеанса VS, и был запущен новый экземпляр VS.

Решение заключалось в том, чтобы остановить (или убить) экземпляр IIS Express.

Ответ 13

После попытки решить проблему с быстрым исправлением изменения IIS-выражения внутри визуальной студии из интегрированного в классический конвейер, я не смог вообще использовать функцию IIS. Я пробовал все методы выше…

Я не мог переименовать, скопировать файл. Удаление IIS Express и переустановка не работали.

Я НАКОНЕЦ загрузил последнюю версию WebMatrix и установил IIS express 8, который не работал, но по крайней мере тогда я смог окончательно удалить старый каталог, а затем я воссоздал себя…..

НЕ ПОЛУЧАЕТСЯ ВСЕ.

Ответ 14

Я решил это (с vs2013 и windows 7), перейдя в Документы > IISExpress > Config и переименовав application.config. После этого я перезапустил визуальную студию и открыл свой проект, и это сработало.

Ответ 15

Я столкнулся с этой проблемой, пытаясь открыть другое решение для разработчиков после установки VS2013 (Update 3 RC). Следуя советам здесь, удаляя/переименовывая/etc. в папке config, VS повторно создал файлы в неправильном месте. Он создал вложенные папки config:

C:Users [пользователь]DocumentsIISExpressConfigConfig

Я переместил все из… configconfig в…config и работал как ожидалось.

Ответ 16

Я обнаружил, что удаление одного из сайтов из файла applicationhost.config разрешает эту проблему для меня.

Я использовал следующую команду из каталога %ProgramFiles(x86)%IISExpress:

appcmd list site

затем

appcmd delete site rogueSiteName

Особенно было имя сайта с суффиксом в квадратных скобках (например, «MySite (1)» ), который я удалил. Я еще не уверен, что VS2013 просто имел проблему с скобками или два сайта указывали на один и тот же каталог. В любом случае, это удалило VS снова.

Фон

Я боролся с этим вопросом в течение нескольких дней, и ничто не помогло — даже инструкции, приведенные в верхних ответах, здесь.

Я также попытался переместить папку config, как указано в http://www.iis.net/learn/extensions/introduction-to-iis-express/iis-80-express-readme. Но хотя VS2013 воссоздал структуру каталогов и файлы в новом месте, ошибки продолжались и выполнялись appcmd, показав, что по-прежнему он по-прежнему указывает на старое местоположение.

Кредиты

Кредит за то, где я нашел, что используемые команды идут в http://gyorgybalassy.wordpress.com/2013/12/02/cleaning-up-iis-express-configuration/

Ответ 17

В моем случае папка «Мои документы» для моего рабочего ноутбука была сопоставлена ​​с сетевым ресурсом. Поэтому, когда рабочая сеть не была доступна, я не смог открыть свое решение.

Изменить:
Они будут иметь ценность моих документов в сетевом ресурсе. Измените это на локальный

я. КомпьютерHKEY_CURRENT_USERПрограммное обеспечениеMicrosoftWindowsCurrentVersionExplorerПапки FoldersПерсональные

II. КомпьютерHKEY_CURRENT_USERПрограммное обеспечениеMicrosoftWindowsCurrentVersionExplorerПапки пользовательской оболочкиПерсональные

Например,

Старое значение:networkdrivec $ UsersprofileDocuments

Новое значение: C:UsersprofileDocuments

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

Ответ 18

Исправление было действительно простым для меня → Перезапустить Visual Studio

Моя настройка:

  • Visual Studio 2015

  • Веб-проекты используют локальный IIS 8.5

  • Я иногда испытываю то, что, по моему мнению, является ошибкой VS, где он конвертирует некоторые проекты для использования IISExpress (это исправлено путем удаления папки, созданной в /This PC/Documents). Это может быть связано.

Ответ 19

Для ядра ASP.Net просто войдите в раздел «Свойства», затем внесите изменения и сохраните его.

Пример: я изменил порт SSL
Основной пример

Вы получите уведомление о том, что ваш launchsettings.json был изменен. Примите это, и вы хорошо пойдете.

Ответ 20

Если это проект ASP.NET Core

Просто попробуйте изменить порт iis в файле launchSettings.json по пути iisSettings:iisExpress:applicationUrl

В этой статье мы рассмотрим часто встречающиеся ошибки и методы их устранения.

1. Ошибка: Ошибка инициализации конфигурации ELMA —> System.InvalidOperationException: Cannot check database exists —> System.Data.SqlClient.SqlException: Ошибка входа пользователя «IIS APPPOOLElma3-Standart».

Причина: Авторизация на сервере IIS осуществлена под пользователем не имеющим прав администратора.

Решение: Для устранения данной ошибки IIS сервера необходимо зайти в Диспетчер служб IIS (стандартно на сервере в Пуск – Администрирование). В нем на вкладке Пулы приложений у пула «ELMA3-Standart» выбрать в контекстном меню пунк Дополнительные параметры. В нем, в таблице Модель процесса, в поле Удостоверение указать учетную запись LocalSystem либо реальную учетную запись с правами администратора, после чего следует перезапустить веб-сервер.

2. Ошибка: The underlying connection was closed: An expected error occurred on a receive: Unable to read data from the transport connection: Удаленный хост разорвал существующее подключение: Удаленный хост разорвал существующее подключение.

Причина: Сервер ELMA запущен с недостаточными правами доступа.

Решение: В случае, если сервер располагается на базе Cassini, Вам необходимо нажать клавишу с логотипом Windows (флажок Microsoft) + R и ввести следующую команду в диалоговое окно: «services.msc» (без кавычек), после чего появится окно служб Windows. В нем Вы сможете найти строчку Веб-сервер ELMA, кликнуть правой кнопкой мыши и выбрать пункт Свойства, в котором и располагается искомая вкладка Вход в систему. Если же сервер основывается на базе IIS, то в этом случае необходимо так же открыть меню Выполнить (клавиша Windows + R) и ввести команду inetmgr. Откроется окно диспетчера служб IIS, в окне Подключения найдите пункт Пулы приложений, выделите его, откроется список текущего пула, где и должна быть запись о сервере ELMA. Также кликнув правой кнопкой мыши на записи, выберите пункт Дополнительные параметры. Нужная запись находится в строке Удостоверение указажите учетную запись LocalSystem либо реальную учетную запись с правами администратора, после чего следует перезапустить веб-сервер.

3. Ошибка: *System.UnauthorizedAccessException: Отказано в доступе по пути «С:ELMA3-ExpressUserConfigconfiguration.packges».

Решение: Удаление файла с расширением .packages из папки UserConfig.

4. Ошибка: Сервер не запущен из-за ошибки.

Причина: Имена в SQL Server Management Studio базы и файле configuration.config не совпадают.

Решение: Изменение названия БД в файле configuration.config.

5. Ошибка: Ошибка создания резервной копии данных.

Причина:Недостаточно места на диске.

Решение: Освободить место для корректного создания бекапа базы.

6. Ошибка: EleWise.ELMA.Runtime.Db.DbStructureException: Ошибка обновления структуры БД —> System.Data.DataException: Не удалось выполнить запрос DROP INDEX UK_principal_name ON sysdiagrams —> System.Data.SqlClient.SqlException: Явная инструкция DROP INDEX недопустима в индексе «sysdiagrams.UK_principal_name». Он используется для принудительного применения ограничения UNIQUE KEY.

Причина: В SQL Server Management Studio, в разделе Системные таблицы не должно быть таблиц.

Решение: Остановите сервер ELMA и откройте SQL Server Management Studio, в списке баз данных выберите нужную БД и разверните список таблиц. В разделе Системные таблицы не должно быть таблиц. Если они там есть, удалите их. Запустите сервер ELMA.

7. Ошибка: Ошибка из-за наличия активных подключений к БД.

Причина: После восстановления базы из бекапа на сервере со временем отличным от предыдущего может остаться информация об активном подключении.

Решение: Создание резервной копии и выполнение запроса в БД. Текст запроса: Delete from DB_ACTIVECONNECTIONS.

8. Ошибка: EleWise.ELMA.Runtime.Db.DbStructureException: Ошибка обновления структуры БД —> NHibernate.TransactionException: Commit failed with SQL exception —> FirebirdSql.Data.FirebirdClient.FbException: unsuccessful metadata update

object INDEX is in use —> FirebirdSql.Data.Common.IscException: unsuccessful metadata update

Причина: Ошибка обновления.

Решение: Сделайте резервное копирование базы и восстановите ее. (Для корректной работы системы на FireBird данную операцию необходимо производить с периодичностью раз в две недели).

9. Ошибка: *EleWise.ELMA.Runtime.Exceptions.ConfigurationInitializeException: Ошибка инициализации конфигурации ELMA —> System.InvalidOperationException: Не удалось подключиться к базе данных —> FirebirdSql.Data.FirebirdClient.FbException: Unable to complete network request to host «127.0.0.1». —> FirebirdSql.Data.Common.IscException: Unable to complete network request to host «127.0.0.1».

Причина: Ошибка в файле configuration.config в строке <add name=»MainDB» connectionString=»data source=127.0.0.1;initial catalog={CONFIGDIR}base.fdb;user id=sysdba;password=masterkey;character set=UNICODE_FSS;dialect=3;server type=0″ />.

Решение: Убедиться, что в строке<add name=»MainDB» connectionString=»data source=127.0.0.1;initial catalog={CONFIGDIR}base.fdb;user id=sysdba;password=masterkey;character set=UNICODE_FSS;dialect=3;server type=0″ /> отсутствуют опечатки, соблюден регистр символов.

10. Ошибка: *EleWise.ELMA.Runtime.Exceptions.ConfigurationInitializeException: Ошибка инициализации конфигурации ELMA —> System.InvalidOperationException: Не удалось подключиться к базе данных —> System.Data.SqlClient.SqlException: Не удается открыть базу данных «ELMA», запрашиваемую именем входа. Не удалось выполнить вход.
Ошибка входа пользователя «NT AUTHORITYсистема».

Причина: Авторизация на сервере Cassini осуществлена под пользователем не имеющим прав администратора.

Решение: Необходимо запустить сервер Elma от имени учетной записи, обладающей правами администратора в Windows. Для этого зайдите в Панель управления – Администрирование – Службы, найдите там Веб-сервер Elma, щелкните по нему правой кнопкой мыши, выберите Свойства, в открывшемся окне перейдите на вкладку Вход в систему, установите флажок С учетной записью и введите данные учетной записи, обладающей правами администратора.

Дополнение: Ошибка сервера MS SQL 2008 и выше Login failed for user ’NT AUTHORITYсистема’. Причина: не удалось открыть явно указанную базу данных «ELMA». [КЛИЕНТ: <local machine>]. Ошибка: 18456, серьезность: 14, состояние: 38.

Причина: Авторизация верная, запуск происходит с правами администратора, но база данных недоступна (или нет разрешения).

Решение: Группе NT AUTHORITYсистема необходимо добавить роль sysadmin на SQL сервере. Для этого зайдите Microsoft SQL Server Management Studio, раздел Безопасность – Имена входа и выберите свойства группы NT AUTHORITYсистема. В меню Роли сервера установите флажок напротив роли sysadmin.

11. Ошибка: *EleWise.ELMA.Runtime.Exceptions.ConfigurationInitializeException: Ошибка инициализации конфигурации ELMA —> System.InvalidOperationException: Не удалось подключиться к базе данных —> System.Data.SqlClient.SqlException: Разрешение CREATE DATABASE запрещено в базе данных «master».
Не удалось присоединить файл «F:ELMA3-StandartUserConfigELMA3.mdf» в качестве базы данных «ELMA3».

Причина: Ошибка в файле configuration.config в строке AttachDbFilename={CONFIGDIR}ELMA3.mdf;

Решение: Удалить строку «AttachDbFilename={CONFIGDIR}ELMA3.mdf» в конфигурационном файле configuration.config. После внесенных изменений файл необходимо сохранить и перезапустить веб-сервер.

12. Ошибка: При работе с веб-частью отображается всплывающее окно с ошибкой Не пройдена проверка предусловий запуска.

Соответственно, при попытке авторизации в Дизайнере возникает ошибка.

Причина: В окне ошибки виден пустой параметр – имя сервера.

Решение: подключиться к серверу MSSQL от имени администратора и выполнить правильный SQL-запрос:

EXEC sp_dropserver N'elma-local-loop'
GO

EXEC sp_addlinkedserver N'elma-local-loop', N' ', N'SQLNCLI', N'localhostSQLSERVER2014'
GO

EXEC sp_serveroption [elma-local-loop], N'remote proc transaction promotion', 'false'
EXEC sp_serveroption [elma-local-loop], N'rpc out', 'true'
GO

где localhostSQLSERVER2014 – имя сервера базы данных.

Чтобы убедиться, что ошибка исправлена, нужно выполнить запрос:

select * from sys.servers where lower([name]) = 'elma-local-loop'

Результат будет выглядеть следующим образом:

13. Ошибка: Ошибка Инициализации конфигурации ELMA: Версия БД <название версии> не подходит по минимальным требованиям (предоставлена версия – <используемая версия БД>, требуется как минимум <версия БД, необходимая для корректной работы системы ELMA>

Причина: версия используемой базы данных не подходит по минимальным системным требованиям для используемой редакции системы ELMA.

Решение: необходимо обновить версию используемой базы данных до соответствующей минимальным системным требованиям для используемой редакции системы ELMA.

14. Ошибка: DbStructure files with the same GUID are found <uid>: <модуль1>;<модуль2> – в модулях системы содержатся xml-преобразования базы данных с одинаковыми uid.

Причина: в указанных модулях системы (модуль1, модуль2) содержатся xml-преобразования базы данных с одинаковыми uid.

Решение: изменить дублирующийся uid в одном из модулей.

15. Ошибка: Npgsql.NpgsqlException: No password has been provided but the backend requires one (in MD5).

Решение: Если отсутствуют права суперпользователя по умолчанию, если они не были указаны при установке, укажите их в файле configuration.config, который располагается в папке конфигурации ELMA, по умолчанию ../<Общая папка с файлами системы ELMA>/UserConfig:

  • в секции main добавьте ключи sysUser и sysPassword со значениями для пользователя – владельца базы данных;
  • для этого случая желательно отключить автоматическое резервное копирование данных, добавив ключ backupEnabled со значением false.

Пример настроек представлен на рисунке.

16. Иногда при работе в системе могут возникнуть ошибки из-за прав, которые настраиваются в IIS.

Например, если пул ELMA4 в IIS запускается под ApplicationPoolIdentity, то при импорте пакетов, требующем перезапуска сервера, возникает следующая ошибка:

«ERROR 2021-03-04 16:02:13,055 [5] EleWise.ELMA.Logging.Logger — Во время выполнения автоматического импорта произошла ошибка: В процессе импорта произошла ошибка: Не удалось проверить статус запуска сайта ‘ELMA-Enterprise-4_0_7’ в IIS. Скорее всего, у пользователя, под которым запущен пул приложений IIS, отсутствуют необходимые привилегии».

Оригинальный текст ошибки:
«Имя файла: redirection.config
Ошибка: Не удалось прочитать файл конфигурации из-за отсутствия необходимых разрешений».

При этом группе IIS_IUSRS выданы полные права на папку с системой и C:WindowsTempELMA.

В этом случае проблема возникает из-за отсутствия прав. Решение проблемы — это вопрос администрирования.

ApplicationPoolIdentity — учётная запись с минимальными правами. То, что требует ELMA4 (управление сайтом, чтение данных пула и др.), эта учётная запись по умолчанию не обеспечивает.

В этом случае варианта решения два:

1. Если политика безопасности позволяет, изменить удостоверение пула приложений.

2. Выдать права для работы под ApplicationPoolIdentity или той учётной записью, под которой работает администратор. Для IIS_IUSRS выдать права на %SystemRoot%System32inetsrvconfig.

17. Ошибка: *EleWise.ELMA.Runtime.Db.DbStructureException: Ошибка обновления структуры БД —> Oracle.ManagedDataAccess.Client.OracleException: ORA-00054: ресурс занят и задано его получение с параметром NOWAIT, либо истекло время ожидания.

Решение:

1. Убедиться, что в схеме нет блокировок.

2. Увеличить таймауты запросов в базу. Для этого в файле ~Websettings.config:

  • изменить значение value для ключа <add key=DbTransformCommandTimeout” value=“3600” />, например, выставить value=“7200”;
  • изменить значение value для ключа <add key=“Application.DbCommandTimeout” value=“30” />, например, выставить значение value=“120”.

Я использую Windows Server 2008 R2 (x64) с IISExpress8 и при переходе к

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

Он говорит:

Имя файла: перенаправление.config

Ошибка: не удается прочитать файл конфигурации.

Есть идеи, с чего начать? Я ничего не могу найти…

27 ответов

После установки IIS Express скопируйте все файлы из

C: Program Files IIS Express config templates PersonalWebServer

К

%userprofile%DocumentsIISExpressconfig


60

Zameer Ansari
11 Дек 2015 в 14:45

Щелкните правой кнопкой мыши файл проекта и отредактируйте файл проекта, удалите URL-адрес из IISUrl и перезагрузите проект, после чего он будет работать.


32

Deva
9 Апр 2014 в 09:04

Я только что решил это. Это странное решение, но оно сработало для меня. Вот шаги, которые я предпринял:

Перейдите в папку, содержащую локальные файлы конфигурации IISExpress (обычно Мои документы > IISExpress > config в Windows7).

Найдите файл applicationhost.config. Переименуйте его во что-то другое, например. приложениеhost2.config.

Перейдите к своему веб-проекту в Visual Studio (я использовал VS 2012). Щелкните правой кнопкой мыши веб-проект и выберите «Использовать IISExpress». Запустите проект. Это должно завершиться ошибкой из-за переименования файла конфигурации.

Верните имя файла конфигурации на application.config. Убедитесь, что в настройках веб-проекта выбрано «Использовать локальный веб-сервер IIS». Запустите решение.

Это сработало для меня.


12

Myles J
30 Апр 2013 в 12:27

У меня точно такая же проблема с Visual Studio 2013 в Windows 8.1. Я сопоставляю папку «Мои документы» со SkyDrive, поэтому папка IISExpress была помечена как «Только в сети». Как только я отметил его как «Доступно в автономном режиме», все заработало.


6

Matt
23 Ноя 2013 в 07:33

После попытки решить проблему с быстрым исправлением изменения IIS Express внутри Visual Studio с интегрированного на классический конвейер, я вообще не смог использовать IIS Express. Я попробовал все методы выше…

Не смог переименовать, скопировал файл. Удаление IIS Express и повторная установка не сработали.

Я НАКОНЕЦ-ТО загрузил последнюю версию WebMatrix и установил IIS Express 8, это не сработало, но, по крайней мере, тогда я смог окончательно удалить старый каталог, а затем воссоздал себя…..

НЕ ВЕСЕЛЬЕ ВООБЩЕ.


0

Tom Stickel
3 Янв 2014 в 13:07

Это 2020 год, я сообщаю о той же проблеме в Visual Studio 2019.

Причина. Несколько экземпляров VS открываются с другим веб-приложением (в моем экземпляре — Blazor).

Решение. Закройте все экземпляры VS и снова откройте решение, которое вы хотите запустить.


0

Johnny Wu
16 Май 2020 в 15:01

У меня была похожая проблема с @Myles J, но переименование %userprofile%DocumentsIISExpressconfigapplicationhost.config не сработало. Мне нужно было сделать следующее:

  1. Закройте Visual Studio.
  2. Переименуйте %userprofile%DocumentsIISExpressconfig каталог.
  3. Запустите Visual Studio еще раз. Каталог %userprofile%DocumentsIISExpressconfig будет воссоздан с файлами конфигурации по умолчанию.
  4. Скопируйте исходный файл applicationhost.config поверх автоматически сгенерированного.

Прежде чем кто-либо спросит: права доступа к папкам были одинаковыми, флаг только для чтения не был установлен для папки или ее файлов, и я никак не модифицировал applicationhost.config.


65

Ian Kemp
12 Ноя 2013 в 15:51

В некоторых ситуациях простого переименования/удаления файла applicationhost.config недостаточно, так как VS не всегда будет воссоздавать его для вас. Я считаю, что следующее исправит это при любых обстоятельствах:

Закройте Visual Studio.

Убедитесь, что процессы IIS Express не запущены, затем удалите C:UsersXXXXDocumentsIISExpressconfigapplicationhost.config (где XXXX — ваше имя пользователя Windows).

В командной строке выполните c:Program FilesIIS Expressiisexpress.exe. Это позволит воссоздать необходимые конфиги. Сразу же нажмите «Q», чтобы завершить процесс.

Снова откройте Visual Studio и запустите/отладьте свой веб-проект. Теперь все должно работать.


4

David Fidge
27 Июн 2014 в 08:35

Резервное копирование файлов в локальную папку IISExpress. Его можно найти по адресу: C:Users»имя пользователя*****»DocumentsIISExpressconfig
Перейти к местоположению:
C:Program FilesIIS ExpressconfigtemplatesPersonalWebServer
Скопируйте необходимые файлы из этого каталога в локальную папку IISExpress.
У меня это сработало после того, как я скопировал файлы:
applicationhost.config
aspnet.config
перенаправление.config


3

user_s
19 Фев 2015 в 17:55

В моем случае папка «Мои документы» для моего рабочего ноутбука была сопоставлена ​​с сетевым ресурсом. Поэтому, когда рабочая сеть была недоступна, я не смог открыть свое решение.

Изменение: они будут иметь значение моих документов в сетевом ресурсе. Измените это на локальное

I. КомпьютерHKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerShell FoldersPersonal

II. КомпьютерHKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerПапки оболочки пользователяPersonal

Например:

Старое значение: networkdrivec$UsersprofileDocuments.

Новое значение: C:UsersprofileDocuments.

Видеть: https://blogs.msdn.microsoft.com/chiranth/2015/04/01/error-while-runningstarting-a-website-under-iisexpress-in-visual-studio/


3

Khabba
29 Авг 2016 в 14:27

Проблема в том, что файлы в C:Users»Ваше имя пользователя»DocumentsIISExpressconfig зашифрованы. Откройте эту папку, выберите все файлы, щелкните правой кнопкой мыши и выберите свойства, нажмите «Дополнительно», снимите флажок «Шифровать содержимое для защиты данных», нажмите «ОК», нажмите «Применить».

Это исправит.


2

jshaw
24 Июл 2015 в 20:21

Visual Studio сообщит только искомое имя файла, а не полный путь. Проблема для многих пользователей заключается в том, что IISExpress с файлом redirection.config может существовать по нескольким путям, включая путь OneDrive, который может не синхронизироваться.

Чтобы выяснить, какой именно файл пытается открыть Visual Studio, используйте инструмент Microsoft (SysInternals) ProcMon. В нем перечислены все файлы и ресурсы, к которым Windows пытается получить доступ. Добавьте фильтр для «Путь содержит redirection.config» и воспроизведите проблему в Visual Studio. Теперь вы увидите фактический путь, который он пытается использовать.

В моем случае у меня есть несколько папок IISExpress. Один был синхронизирован с OneDrive, а другой был локальным. Visual Studio попыталась получить доступ к папке OneDrive, которая не была синхронизирована с локальным диском, и поэтому не удалось.

Forcing IISExpress folder to store files locally resolved the problem


5

Dan Gøran Lunde
6 Авг 2021 в 17:18

Использование Visual Studio 2013

Мне пришлось остановить визуальную студию, переименовать весь каталог конфигурации, «Документы»> «IISExpress»> «Конфигурация», затем запустить новый веб-проект, который терпит неудачу, но воссоздает каталог конфигурации, затем я перезагрузился и запустил визуальную студию, и все заработало!

Я заметил эту проблему после копирования проекта между двумя компьютерами, возможно, это было вызвано дублированием порта IISExpress или чем-то тривиальным.


1

JustEngland
14 Май 2014 в 23:35

Использование VS2013/Windows 7

Близкое решение. Откройте проводник Windows, щелкните правой кнопкой мыши каталог «Мои документыIISExpressconfig» и выберите «Расшифровать». Убедитесь, что установлен флажок «Применить изменения к этой папке, вложенным папкам и файлам». Повторно откройте решение VS.


1

user3754015
18 Июн 2014 в 23:46

Для меня это просто отсутствие разрешения: либо дать всем разрешение на «%userprofile%DocumentsIISExpressconfig» в этой папке, либо открыть VS в режиме администратора.


1

GSKKC
18 Дек 2020 в 14:49

Я решил это (с vs2013 и Windows 7), выбрав «Документы»> «IISExpress»> «Конфигурация» и переименовав файл application.config. После этого я перезапустил визуальную студию и открыл свой проект, и это сработало.


0

nixkuroi
22 Фев 2014 в 20:14

Я столкнулся с этой проблемой при попытке открыть решение другого разработчика после установки VS2013 (обновление 3 RC). Следуя советам здесь и удаляя/переименовывая/и т.д. папку config, VS повторно создал файлы в неправильном месте. Он создал вложенные config папки:

C:Users[пользователь]DocumentsIISExpressconfigconfig

Я переместил все из …configconfig в …config, и все заработало, как и ожидалось.


0

Brandon Gano
22 Июл 2014 в 02:20

Я обнаружил, что удаление одного из сайтов из файла applicationhost.config решает эту проблему для меня.

Я использовал следующую команду из каталога %ProgramFiles(x86)%IISExpress:

appcmd list site

Тогда

appcmd delete site rogueSiteName

В частности, было имя сайта с суффиксом в квадратных скобках (например, «Мой сайт (1)»), которое я удалил. Я еще не уверен, была ли у VS2013 проблема с скобками или два сайта указывали на один и тот же каталог. В любом случае, его удаление снова сделало VS счастливым.

Задний план

Я боролся с этой проблемой в течение нескольких дней, и ничего не помогло, даже инструкции, приведенные в верхних ответах здесь.

Я также попытался переместить папку конфигурации, как указано в http://www.iis.net/learn/extensions/introduction-to-iis-express/iis-80-express-readme. Но хотя VS2013 воссоздал структуру каталогов и файлы в новом расположении, ошибки продолжались, и запуск appcmd показал, что по умолчанию он по-прежнему указывает на старое расположение.

Кредиты

Спасибо за то, что я нашел команды для использования, идет по адресу http ://gyorgybalassy.wordpress.com/2013/12/02/cleaning-up-iis-express-configuration/


0

WooWaaBob
7 Ноя 2014 в 14:23

Для ASP.Net Core просто откройте раздел «Свойства», затем внесите изменения и сохраните их.

Пример: я изменил порт SSL Основной пример

Вы получите уведомление о том, что ваш файл launchsettings.json был изменен. Примите это, и вы готовы идти.


0

Razvan Dumitru
29 Ноя 2016 в 14:35

Если это проект ASP.NET Core

Просто попробуйте изменить порт iis в файле launchSettings.json по пути iisSettings:iisExpress:applicationUrl


0

skorenb
14 Авг 2017 в 13:37

В IIS 10 Express. Убедитесь, что Visual Studio (VS) выключена.

Сначала я обнаружил, что %userprofile%DocumentsIISExpressconfig не работает.

Сначала я подумал, что IIS Express столкнулся с IIS из ОС Windows.

Я удалил его, но никаких изменений, затем я удалил IIS 10 Express, который был установлен с VS 2019, через панель управления.

Затем я обнаружил, что этот файл сохраняется в C:UsersusernameOneDriveDocumentsIISExpress, связанном с одним хранилищем на диске, поэтому я советую вам скопировать %userprofile%DocumentsIISExpressconfig и вставить в навигацию проводника Windows, чтобы найти каталог.

Перейдите на один каталог выше и/или переименуйте папку конфигурации. Перезапустите VS и снова запустите проект.


0

Rikudou En Sof
22 Ноя 2020 в 09:47

Для меня было удаление файла DocumentsIISExpressconfigapplicationhost.config

Закрытие визуальной студии > Открыть > Отладка

Спасибо за предыдущий ответ, помогите сразу перейти к проблеме


1

Starlin González
15 Апр 2021 в 23:43

Мой был вызван OneDrive. Судя по всему, папка с документами синхронизируется с ним. Что я сделал, так это изменил расположение папки документов через regedit и перешел по этому пути:

HKEY_CURRENT_USER> Программное обеспечение> Microsoft> Windows> CurrentVersion> Explorer> Папки оболочки пользователя

А затем изменил значение Личное из: C:Usersмое имя пользователяOneDriveDocuments в C:Usersмое имя пользователяDocuments

После этого я перезагрузил свой компьютер и смог создать проект VS.


0

Andrew Casal
12 Июн 2021 в 20:18

Если вы это сделаете:

C:Users”username*****”DocumentsIISExpressconfig

Вы найдете эти файлы

applicationhost.config
aspnet.config
redirection.config

Удалите выше 3 файла, а затем откройте проект. Тогда проблема решена. Я пробовал, работает нормально.


7

durron597
5 Сен 2015 в 20:02

В моем случае это произошло, когда IISExpress все еще был активен из предыдущего сеанса VS, и был запущен новый экземпляр VS.

Решение состояло в том, чтобы остановить (или убить) экземпляр IIS Express.


1

andrew.fox
26 Фев 2015 в 13:37

Исправление было очень простым для меня >> Перезапустите Visual Studio

Моя установка:

  • Visual Studio 2015

  • Веб-проекты используют локальный IIS 8.5

  • Иногда я сталкиваюсь с тем, что я считаю ошибкой VS, когда он преобразует некоторые проекты для использования IISExpress (это исправляется путем удаления папки, созданной в /This PC/Documents). Это может быть связано.


1

GraehamF
29 Авг 2016 в 22:08

Вам не нужно закрывать Visual Studio или что-либо переименовывать.

  1. Откройте свойства для %userprofile%Documents
  2. Выберите «Безопасность» > «Дополнительно», измените владельца на себя (опять же, если вы уже являетесь владельцем).
  3. Выберите «Заменить владельца подконтейнеров и объектов» и «Заменить все разрешения дочерних объектов унаследованными от этого объекта».
  4. Ok.


1

amuliar
13 Июн 2018 в 11:57

  • Remove From My Forums
  • Question

  • Hi All,

    We have a old Exchange 2010 into my environment and we want to migrate on new Exchange 2016. We update the existing environment to make the 2010 version suitable for upgrading. Installation of Exchange 2016 completed successfully, after restart i was try
    to login into EAC but without success. EMS working just fine, but when i try to login into EAC with Domain Administrator account or any other account with all necessary roles I’m getting below error msg:

    Filename: redirection.config
    Error: Cannot read configuration file due to insufficient permissions

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.UnauthorizedAccessException: Filename: redirection.config
    Error: Cannot read configuration file due to insufficient permissions

    ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and
    the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate=»true»/>, the identity will be the anonymous user (typically IUSR_MACHINENAME)
    or the authenticated request user.

    To grant ASP.NET access to a file, right-click the file in File Explorer, choose «Properties» and select the Security tab. Click «Add» to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired
    access.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [UnauthorizedAccessException: Filename: redirection.config
    Error: Cannot read configuration file due to insufficient permissions
    
    ]
       Microsoft.Web.Administration.Interop.IAppHostAdminManager.GetAdminSection(String bstrSectionName, String bstrPath) +0
       Microsoft.Web.Administration.Configuration.GetSectionInternal(ConfigurationSection section, String sectionPath, String locationPath) +217
       Microsoft.Exchange.Management.ControlPanel.VirtualDirectoryConfiguration.GetEcpAnonymousAuthenticationStatus() +199
       Microsoft.Exchange.Management.ControlPanel.Global.Application_Start(Object sender, EventArgs e) +546
    
    [HttpException (0x80004005): Filename: redirection.config
    Error: Cannot read configuration file due to insufficient permissions
    
    ]
       System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +529
       System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +169
       System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +169
       System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +396
       System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +333
    
    [HttpException (0x80004005): Filename: redirection.config
    Error: Cannot read configuration file due to insufficient permissions
    
    ]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +525
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +124
       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +700
    

    I browse for solution but didn’t found anything.

    Thank you all in advance.

    Pavle

Answers

  • Hi All,

    Problem solved!!!

    In IIS i change Identity for DefaultAppPool from ApplicationPoolIdentity to LocalSystem and im able to login into EAC.

    Thank you all.

    Regards,

    Pavle

    • Marked as answer by

      Thursday, August 24, 2017 11:33 AM

  • Remove From My Forums
  • Question

  • Hi All,

    We have a old Exchange 2010 into my environment and we want to migrate on new Exchange 2016. We update the existing environment to make the 2010 version suitable for upgrading. Installation of Exchange 2016 completed successfully, after restart i was try
    to login into EAC but without success. EMS working just fine, but when i try to login into EAC with Domain Administrator account or any other account with all necessary roles I’m getting below error msg:

    Filename: redirection.config
    Error: Cannot read configuration file due to insufficient permissions

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.UnauthorizedAccessException: Filename: redirection.config
    Error: Cannot read configuration file due to insufficient permissions

    ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and
    the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate=»true»/>, the identity will be the anonymous user (typically IUSR_MACHINENAME)
    or the authenticated request user.

    To grant ASP.NET access to a file, right-click the file in File Explorer, choose «Properties» and select the Security tab. Click «Add» to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired
    access.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [UnauthorizedAccessException: Filename: redirection.config
    Error: Cannot read configuration file due to insufficient permissions
    
    ]
       Microsoft.Web.Administration.Interop.IAppHostAdminManager.GetAdminSection(String bstrSectionName, String bstrPath) +0
       Microsoft.Web.Administration.Configuration.GetSectionInternal(ConfigurationSection section, String sectionPath, String locationPath) +217
       Microsoft.Exchange.Management.ControlPanel.VirtualDirectoryConfiguration.GetEcpAnonymousAuthenticationStatus() +199
       Microsoft.Exchange.Management.ControlPanel.Global.Application_Start(Object sender, EventArgs e) +546
    
    [HttpException (0x80004005): Filename: redirection.config
    Error: Cannot read configuration file due to insufficient permissions
    
    ]
       System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +529
       System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +169
       System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +169
       System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +396
       System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +333
    
    [HttpException (0x80004005): Filename: redirection.config
    Error: Cannot read configuration file due to insufficient permissions
    
    ]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +525
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +124
       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +700
    

    I browse for solution but didn’t found anything.

    Thank you all in advance.

    Pavle

Answers

  • Hi All,

    Problem solved!!!

    In IIS i change Identity for DefaultAppPool from ApplicationPoolIdentity to LocalSystem and im able to login into EAC.

    Thank you all.

    Regards,

    Pavle

    • Marked as answer by

      Thursday, August 24, 2017 11:33 AM

Приветствую сумасшедший форум. И буржуев.

У меня вопрос по существу. даже ссылку не могу дать на пост. Надо же!

В общем просто пишу.

appcmd set site /site.name: sakhalin.cc /bindings.[protocol='https',bindingInformation='*:443:'].bindingInformation:*:443: sakhalin.cc

либо вот так

appcmd set site /site.name:sakhalin.cc /bindings.[protocol='https',bindingInformation='*:443:'].bindingInformation:*:443:sakhalin.cc

Ко второму больше склоняюсь. Но в общем ни то и не другое не помогает.

Пошагово как я все делал. Мож где что не правильно делал я.

1. Запустил командную строку CMD  от имени администратора.

2. В командную строку написал следующий текст 

cd %windir%system32inetsrv

3. Потом написал вот такой текст:

appcmd set site /site.name: sakhalin.cc /bindings.[protocol='https',bindingInformation='*:443:'].bindingInformation:*:443: sakhalin.cc

Получил вот такую ошибку:

Не удалось обработать ввод: Параметр "sakhalin.cc" должен начинаться с "/" или "
- (HRESULT=80070057).

C:WindowsSystem32inetsrv>

4. Потом попытался второй вариант сделать

appcmd set site /site.name:sakhalin.cc /bindings.[protocol='https',bindingInformation='*:443:'].bindingInformation:*:443:sakhalin.cc

Получил тоже ошибку:

ERROR ( message:Ошибка конфигурации
Имя файла: redirection.config
Номер строки: 0
Описание: Не удалось прочитать файл конфигурации из-за отсутствия необходимых ра
зрешений

В общем вот так.

У меня windows 7 64 максимальная, IIS 7

С вашим веб-сайтом нет проблем с . Ваш веб-сайт работает в процессе. В iis вы можете определить личность этого процесса. идентификатор, который использует ваш веб-сайт пул приложений, как (сетевые службы, локальная система и т.д.), Должен иметь разрешение на доступ и чтение файла web.config.

Update:

Этот обновленный ответ аналогичен приведенному выше, но немного длиннее, проще и улучшен.

Прежде всего: вам не нужно ничего менять в конфигурационном файле. В порядке. Проблема заключается в разрешении файлов Windows.

Эти проблемы возникают из-за того, что ваше приложение не может получать доступ и читать файл web.config.

Сделайте файл доступным для группы IIS_IUSRS. Просто щелкните правой кнопкой мыши web.config и нажмите свойства, под вкладкой безопасность добавьте IIS_IUSRS.

Итак, что это за IIS_IUSRS?

Ваш веб-сайт , например, exe. Как и любой exe файл, он должен быть запущен пользователем, и он запускает в соответствии с разрешениями, назначенными этому пользователю.

Когда ваш сайт запущен в IIS, Пул приложений вашего веб-сайта связан с пользователем (сетевые службы, локальная система, И т.д….) (и может быть изменен в IIS)

Поэтому, когда вы говорите IIS_IUSRS, это означает любой пользователь (сетевые службы, локальная система и т.д.), которые работают на вашем сайте.

И как @Seph, упомянутый в комментарии ниже. Если ваш компьютер находится в домене, помните, что группа IIS_IUSRS — это локальная группа.
Также убедитесь, что когда вы пытаетесь найти этого пользователя, проверьте местоположение, на котором он должен быть установлен на локальный компьютер, а не на корпоративный домен.

Понравилась статья? Поделить с друзьями:
  • Ошибка не удалось пройти проверку на вирусы
  • Ошибка не удалось проверить параметры платежа
  • Ошибка не удалось проверить имя пользователя что делать
  • Ошибка не удалось проверить данные qiwi через госуслуги
  • Ошибка не удалось привязать составной идентификатор