powered by simpleCommunicator - 2.0.60     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / ASP.NET [игнор отключен] [закрыт для гостей] / Создание вирутальной директории и Access is denied. (0x80070005 )
1 сообщений из 1, страница 1 из 1
Создание вирутальной директории и Access is denied. (0x80070005 )
    #34079644
user13
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Пытаюсь создавать вирт. директорию:

1 DirectoryEntry deRoot = new DirectoryEntry("IIS://localhost/W3SVC/1/Root", "Administrator","Password");
2 deRoot.RefreshCache();
3
4 DirectoryEntry deNewVDir = deRoot.Children.Add("virdirname", "IIsWebVirtualDir");
5
6 deNewVDir.Properties["Path"].Insert(0, "c:\\aaa");
7 deNewVDir.Properties["AppIsolated"][0] = 2;
8
9 deNewVDir.CommitChanges();
10 deRoot.CommitChanges();
11
12 deNewVDir.Invoke("AppCreate", true);
13
14
15 // Save Changes
16 deNewVDir.CommitChanges();
17 deRoot.CommitChanges();

На строке 9 получаю ошибку:

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Exception Details: System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Добавление строки
<identity impersonate="true" userName="Administrator" password="Password" />
в web.config проблему не решает.


На локальной машине все работает прекрасно (xp sp2)
На сервере (win2003 Web Edition, iis6) эта ошибка.

Единственное, что нашел в гугле это:

I was getting this error, but I think I have solved it. I'm not sure it's the best solution, because apparently it opens up some security issues, but it has to do with the application pool you are using for the Web site. If you go to the Web site's application pool's properties and select the identity tag you will see a drop down box next to the "predefined" radio button. Select "Local system" and click apply.

Но так жестко поступать с security не хочется.
В чем может быть проблема?
Скорей бы утро..., и снова на работу!!!
http://mykia.ru
...
Рейтинг: 0 / 0
1 сообщений из 1, страница 1 из 1
Форумы / ASP.NET [игнор отключен] [закрыт для гостей] / Создание вирутальной директории и Access is denied. (0x80070005 )
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]