I am working with an installation project for an ASP.net application.
I have a custom action that executes .Net code to configure a website
or create a virtual directory on the IIS server. This has worked quite
well. However, a developer added some additional code to manually add
a custom script mapping to the newly created website/virtual
directory.

At the end of the installation I call "aspnet_regiis -i -enable" just
in case asp.net is not registered with IIS.

When I create a scenario on IIS 6.0 where asp.net is not registered
and run my install, everything works fine, except the asp.net mappings
are not applied to my website/virtual directory with the custom script
mapping. If i remove the custom script mapping through IIS manager and
run "aspnet_regiis -i -enable", it succeeds in setting the script maps
on my virtual directory/website.

So it appears my custom script mapping is intefering with
aspnet_regiis.

Has anyone worked with the system.directoryservice namespace and set
mappings through code? Any ideas would greatly be appreciated.

Re: Custom Script Mapping interfering with aspnet_regiis -i -enable on IIS 6.0 by David

David
Wed Oct 20 01:59:18 CDT 2004

It is perfectly possible to have custom Script Mapping co-exist with
aspnet_regiis.

What it sounds like is that the developer did not write the correct code to
do what is claimed.

It sounds like the developer wrote code that just stomped over any script
mappings with their custom mapping without accounting for inherited
values -- instead of appending their custom mapping in addition to the
existing ones (including the inherited values) -- thus you find the
aspnet_regiis settings missing.

--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Jon Petersen" <snowc9901@yahoo.com> wrote in message
news:895779b4.0410191315.519ea2ac@posting.google.com...
I am working with an installation project for an ASP.net application.
I have a custom action that executes .Net code to configure a website
or create a virtual directory on the IIS server. This has worked quite
well. However, a developer added some additional code to manually add
a custom script mapping to the newly created website/virtual
directory.

At the end of the installation I call "aspnet_regiis -i -enable" just
in case asp.net is not registered with IIS.

When I create a scenario on IIS 6.0 where asp.net is not registered
and run my install, everything works fine, except the asp.net mappings
are not applied to my website/virtual directory with the custom script
mapping. If i remove the custom script mapping through IIS manager and
run "aspnet_regiis -i -enable", it succeeds in setting the script maps
on my virtual directory/website.

So it appears my custom script mapping is intefering with
aspnet_regiis.

Has anyone worked with the system.directoryservice namespace and set
mappings through code? Any ideas would greatly be appreciated.



Re: Custom Script Mapping interfering with aspnet_regiis -i -enable on IIS 6.0 by snowc9901

snowc9901
Wed Oct 20 13:42:01 CDT 2004

David, is there any documentation from Microsoft about programming
against IIS? I recognize that the code is flawed, but I still need
someway to correct it.

Thanks

"David Wang [Msft]" <someone@online.microsoft.com> wrote in message news:<e7eu9SntEHA.4040@TK2MSFTNGP09.phx.gbl>...
> It is perfectly possible to have custom Script Mapping co-exist with
> aspnet_regiis.
>
> What it sounds like is that the developer did not write the correct code to
> do what is claimed.
>
> It sounds like the developer wrote code that just stomped over any script
> mappings with their custom mapping without accounting for inherited
> values -- instead of appending their custom mapping in addition to the
> existing ones (including the inherited values) -- thus you find the
> aspnet_regiis settings missing.
>
> --
> //David
> IIS
> This posting is provided "AS IS" with no warranties, and confers no rights.

Re: Custom Script Mapping interfering with aspnet_regiis -i -enable on IIS 6.0 by David

David
Wed Oct 20 16:31:40 CDT 2004

Of course there is documentation on MSDN about how to programmatically
administer IIS. A little web search turns up the following:

Documentation on the properties themselves:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iissdk/iis/usingthemetabasereferencepages.asp

Sample script code illustrating how to use many of the metabase properties:
http://www.microsoft.com/technet/scriptcenter/scripts/iis/iis6/default.mspx


I presume the developer knows how to use ADSI and how to map between script
samples and managed code. It's not very hard since the concepts are quite
identical other than language syntax.

As for "how the property itself works" -- no real way to document that other
than experience -- you are tweaking direct IIS settings, so you need to know
what you are doing.

--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Jon Petersen" <snowc9901@yahoo.com> wrote in message
news:895779b4.0410201042.245d31ca@posting.google.com...
David, is there any documentation from Microsoft about programming
against IIS? I recognize that the code is flawed, but I still need
someway to correct it.

Thanks

"David Wang [Msft]" <someone@online.microsoft.com> wrote in message
news:<e7eu9SntEHA.4040@TK2MSFTNGP09.phx.gbl>...
> It is perfectly possible to have custom Script Mapping co-exist with
> aspnet_regiis.
>
> What it sounds like is that the developer did not write the correct code
to
> do what is claimed.
>
> It sounds like the developer wrote code that just stomped over any script
> mappings with their custom mapping without accounting for inherited
> values -- instead of appending their custom mapping in addition to the
> existing ones (including the inherited values) -- thus you find the
> aspnet_regiis settings missing.
>
> --
> //David
> IIS
> This posting is provided "AS IS" with no warranties, and confers no
rights.