views:

58

answers:

0

Hello all,

I created a Windows Service, with a constant interval that checks few lines in the DB, and creates virtual directories in the IIS by code.

Those virtual directories are created in the following template:

"IIS://localhost/W3SVC/1/Root/" + vdName

As written, virtual directories are created successfully, but in the ROOT folder of my website in IIS.

MY GOAL, is to create those virtual directories, whithin subfolders of my other web-application.

What should be the correct path? I guess it should be something like the following:

"IIS://localhost/W3SVC/1/Root/[AnotherVirtualDir]/subDir1/subDir2/" + vdName

But this offcourse, doesn't work :)

(.NET v4.0, IIS 7.5, Windows 2008 R2)

Thanks in advance!

Gal.