Provisioning Server 2012 - Could be considered a bug

Discussion in '3CX Phone System - General' started by telis, Feb 19, 2013.

Thread Status:
Not open for further replies.
  1. telis

    telis New Member

    Joined:
    Aug 13, 2007
    Messages:
    147
    Likes Received:
    21
    EDIT: Please ignore - was typo! See last post in thread.

    I am provisioning SNOM 821 handsets using DHCP option 066.

    I set the URL in DHCP option 066 to http://192.168.0.1:5000/management/provisioning/cfg{mac} and put the mac addresses in the extension configuration.

    I see the provisioning files being created in C:\ProgramData\3CX\Data\Http\Interface\provisioning, however when I browse to:-

    http://192.168.0.1:5000/management/provisioning/cfgXXXXXXXXXXXX I see the following IIS error:-

    Code:
    HTTP Error 404.3 - Not Found
    The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
    
    Most likely causes:
    It is possible that a handler mapping is missing. By default, the static file handler processes all content.
    The feature you are trying to use may not be installed.
    The appropriate MIME map is not enabled for the Web site or application. (Warning: Do not create a MIME map for content that users should not download, such as .ASPX pages or .config files.)
    If ASP.NET is not installed.
    
    Things you can try:
    In system.webServer/handlers:
    Ensure that the expected handler for the current page is mapped.
    Pay extra attention to preconditions (for example, runtimeVersion, pipelineMode, bitness) and compare them to the settings for your application pool.
    Pay extra attention to typographical errors in the expected handler line.
    Please verify that the feature you are trying to use is installed.
    Verify that the MIME map is enabled or add the MIME map for the Web site using the command-line tool appcmd.exe.
    To set a MIME type, use the following syntax: %SystemRoot%\windows\system32\inetsrv\appcmd set config /section:staticContent /+[fileExtension='string',mimeType='string']
    The variable fileExtension string is the file name extension and the variable mimeType string is the file type description.
    For example, to add a MIME map for a file which has the extension ".xyz": appcmd set config /section:staticContent /+[fileExtension='.xyz',mimeType='text/plain']
    Warning: Ensure that this MIME mapping is needed for your Web server before adding it to the list. Configuration files such as .CONFIG or dynamic scripting pages such as .ASP or .ASPX, should not be downloaded directly and should always be processed through a handler. Other files such as database files or those used to store configuration, like .XML or .MDF, are sometimes used to store configuration information. Determine if clients can download these file types before enabling them.
    Install ASP.NET.
    Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click here.
    
    Detailed Error Information:
    Module	   StaticFileModule
    Notification	   ExecuteRequestHandler
    Handler	   StaticFile
    Error Code	   0x80070032
    Requested URL	   http://192.168.248.160:5000/management/provisioning/cfg00041345FC05
    Physical Path	   C:\ProgramData\3CX\Data\Http\Interface\provisioning\cfg00041345FC05
    Logon Method	   Anonymous
    Logon User	   Anonymous
    
    More Information:
    This error occurs when the file extension of the requested URL is for a MIME type that is not configured on the server. You can add a MIME type for the file extension for files that are not dynamic scripting pages, database, or configuration files. Process those file types using a handler. You should not allows direct downloads of dynamic scripting pages, database or configuration files.
    View more information »
    Looking at the above I'm not sure how I would create a mime map to xml for file without extensions? I tired entering the mac addresses in the extension configuration screen with a .xml at the end but this UI rejected this as an invalid MAC address. The only way I have managed to get around the problem is:-

    1. Change DHCP option 066 to http://192.168.0.1:5000/management/provisioning/cfg{mac}.xml.

    2. Any time I change the provisioning rename the generated provisioning files by appending a .xml.

    To make it work properly 3CX should either append .xml automatically or configure IIS8 to allow browsing to extension-less files.
     
  2. telis

    telis New Member

    Joined:
    Aug 13, 2007
    Messages:
    147
    Likes Received:
    21
    I have found that creating a UTF-8 encoded file called web.config in C:\ProgramData\3CX\Data\Http\Interface\provisioning as follows seems to fix the problem

    The 3CX installer should do this.
     
  3. telis

    telis New Member

    Joined:
    Aug 13, 2007
    Messages:
    147
    Likes Received:
    21
    Actually this whole thread should be ignored.

    The provisioning URL should be http://192.168.0.1:5000/provisioning/cfg{mac} not http://192.168.0.1:5000/management/provisioning/cfg{mac}.

    If it is everything works!

    :$
     
Thread Status:
Not open for further replies.