Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Setup / March 2007

Tip: Looking for answers? Try searching our database.

Config IIS 6 in a Web Setup project

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Charles Zhang - 22 Mar 2007 22:34 GMT
I developed a ISAPI using ATL Server and need to use a web setup project
to deploy it to IIS 6.

But I have to do three things manually to get it work.

  1. Grant permission to Internet Guest Account for the virtual
directory of the ISAPI.

  2. Add a MIME type manually so that ".srf" ( Server Response File)
could be recognized by IIS 6

  3. "Allow Unknown ISAPI Extensions"

I would like to know, are there any easy ways to do the above things
using a Web Setup project?

The solution should work with IIS 5 as well.

Thanks

Charles Zhang
Steven Cheng[MSFT] - 23 Mar 2007 08:03 GMT
Hi Charles,

From your description, you've developed a ISAPI extension application
through Visual Studio ATL Server project. Currently, you're wondering how
to conveniently create a setup package to deploy it, correct?

As for the 3 specific tasks you mentioned, here are some of my
understanding and suggestion:

  1. Grant permission to Internet Guest Account for the virtual
directory of the ISAPI.
==========================
This should be NTFS DACL setting, there has some VBscript for adjusting
NTFS DACL setting:

#Scripting NTFS permisions with ADSI (Part 1)
http://www.serverwatch.com/tutorials/article.php/1476721

#NTFS permissions
http://www.tek-tips.com/viewthread.cfm?qid=80789&page=396

or you can also use some strong code(C++ or .NET framework code) to do NTFS
file permission setting. You can call these code through Visual Studio
setup project's custom action.

  2. Add a MIME type manually so that ".srf" ( Server Response File)
could be recognized by IIS 6
===========================
For the "MIME" TYPE(.SRF), do you mean add a script mapping ( such as .aspx
<---> aspnet_isapi.dll) or add a MIME type mapping?  For "script mapping",
you can use the "AppMappings" setting of the Application virtual directory
properties( in WebSetup project of Visual Studio) to configure your custom
script mappings.

Anyway, you can always use script code to do such configuration in IIS:

#How to Manipulate (insert/replace/remove) LIST data type in IIS
Configuration
http://blogs.msdn.com/david.wang/archive/2004/12/02/273681.aspx

#Do do I add or remove a Script Mapping?
http://www.iisfaq.com/Default.aspx?tabid=2792

  3. "Allow Unknown ISAPI Extensions"
===================================
For service extensions, it is specific to IIS6 and there is built-in
component for configuring it, you can also invoke it from script:

#How To Add and Remove Web Service Extension Files in IIS 6.0
http://support.microsoft.com/kb/328419

#Iisext.vbs: IIS Web service extension script
http://technet2.microsoft.com/WindowsServer/en/library/72d69051-4287-4e92-84
7c-df3ac3eb77e11033.mspx?mfr=true

In addition, you can find many other useful script resource on IIS FAQ site:

http://www.iisfaq.com/Default.aspx?tabid=2538

For custom action of Visual studio setup project, you can refer to those
MSDN reference:

#Walkthrough: Creating a Custom Action  
http://msdn2.microsoft.com/en-us/library/d9k65z2d(VS.80).aspx

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.
Charles Zhang - 26 Mar 2007 07:13 GMT
Thank you very much.

I guess I did not explain the second question correctly.  I DID NOT mean
the mappings between the extension ".srf" and the DLL. I meant the "MIME
Types".  Right Click "Local Computer" Node on the IIS Manager screen,
choose the "properties" menu to bring up the "properties" windows. Click
on the "MIME Types" button, then you would see "MIME Types" window. I
would like the setup application to add a extension for me there.

For question 1 and 3, the solutions sound like complex. Are there any
easier ways to accomplish them?

Thanks.

Charles Zhang

> Hi Charles,
>
[quoted text clipped - 96 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
Steven Cheng[MSFT] - 27 Mar 2007 07:03 GMT
Thanks for your reply Charles,

If the "MIME TYPE" means the global "MIME mapping" of the webserver, I'm
afraid we have to use some external code (like ADSI script) to configure
it. This is because such settings are global setting which is not specific
to a certain application or virtual directory, therefore, the Visual Studio
websetup project doesn't have built-in interfaces to set these settings.

There are many existing script reference about configuring server MIME MAP
collection(change or add or delete):

#How can I add an entry to the MIMEMAP?
http://www.iisfaq.com/Default.aspx?tabid=2779

#IIsMimeMap (ADSI)
http://msdn2.microsoft.com/en-us/library/ms525635.aspx

#C# - How to display MimeMap entries to the console from an instance of IIS
http://blog.crowe.co.nz/archive/2006/06/02/647.aspx

For the access permission (ACL) setting, it does be a bit complex because
normally, it will requirer the server administrator to interactively
configure them. And for programmatic approach, using script to call some
ACL component is the expected one. Here is a kb article demonstrate on
using VBscript to call the "adssecurity.dll" component which has
encapsulated some underlying DACL API calls:

#How to use ADsSecurity.dll to add an access control entry to an NTFS folder
http://support.microsoft.com/kb/279682/en-us

Hope this also helps some.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
Steven Cheng[MSFT] - 27 Mar 2007 07:03 GMT
Thanks for your reply Charles,

If the "MIME TYPE" means the global "MIME mapping" of the webserver, I'm
afraid we have to use some external code (like ADSI script) to configure
it. This is because such settings are global setting which is not specific
to a certain application or virtual directory, therefore, the Visual Studio
websetup project doesn't have built-in interfaces to set these settings.

There are many existing script reference about configuring server MIME MAP
collection(change or add or delete):

#How can I add an entry to the MIMEMAP?
http://www.iisfaq.com/Default.aspx?tabid=2779

#IIsMimeMap (ADSI)
http://msdn2.microsoft.com/en-us/library/ms525635.aspx

#C# - How to display MimeMap entries to the console from an instance of IIS
http://blog.crowe.co.nz/archive/2006/06/02/647.aspx

For the access permission (ACL) setting, it does be a bit complex because
normally, it will requirer the server administrator to interactively
configure them. And for programmatic approach, using script to call some
ACL component is the expected one. Here is a kb article demonstrate on
using VBscript to call the "adssecurity.dll" component which has
encapsulated some underlying DACL API calls:

#How to use ADsSecurity.dll to add an access control entry to an NTFS folder
http://support.microsoft.com/kb/279682/en-us

Hope this also helps some.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
Charles Zhang - 27 Mar 2007 19:20 GMT
Thank you very much for your help.

I think I know what to do.

Charles Zhang

> Thanks for your reply Charles,
>
[quoted text clipped - 36 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
Steven Cheng[MSFT] - 28 Mar 2007 02:46 GMT
Thanks for your reply Charles,

If you meet any further problems on this or anything else we can help,
please don't hesitate to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.
Steven Cheng[MSFT] - 27 Mar 2007 07:03 GMT
Thanks for your reply Charles,

If the "MIME TYPE" means the global "MIME mapping" of the webserver, I'm
afraid we have to use some external code (like ADSI script) to configure
it. This is because such settings are global setting which is not specific
to a certain application or virtual directory, therefore, the Visual Studio
websetup project doesn't have built-in interfaces to set these settings.

There are many existing script reference about configuring server MIME MAP
collection(change or add or delete):

#How can I add an entry to the MIMEMAP?
http://www.iisfaq.com/Default.aspx?tabid=2779

#IIsMimeMap (ADSI)
http://msdn2.microsoft.com/en-us/library/ms525635.aspx

#C# - How to display MimeMap entries to the console from an instance of IIS
http://blog.crowe.co.nz/archive/2006/06/02/647.aspx

For the access permission (ACL) setting, it does be a bit complex because
normally, it will requirer the server administrator to interactively
configure them. And for programmatic approach, using script to call some
ACL component is the expected one. Here is a kb article demonstrate on
using VBscript to call the "adssecurity.dll" component which has
encapsulated some underlying DACL API calls:

#How to use ADsSecurity.dll to add an access control entry to an NTFS folder
http://support.microsoft.com/kb/279682/en-us

Hope this also helps some.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.