locked
XBAP application throws exception when Anonymous Authenticaion of IIS is disabled RRS feed

  • Question

  • I have developed a scanner application using WIA and XBAP technology  which is hosted in IIS. It works fine if I enable Anonymous Authentication. But I am getting the following error if I disable Anonymous Authentication of IIS web server. 

    PLATFORM VERSION INFO
     Windows    : 6.1.7601.65536 (Win32NT)
     Common Language Runtime  : 4.0.30319.42000
     System.Deployment.dll   : 4.6.1055.0 built by: NETFXREL2
     clr.dll    : 4.6.1076.0 built by: NETFXREL3STAGE
     dfdll.dll    : 4.6.1055.0 built by: NETFXREL2
     dfshim.dll    : 4.0.41209.0 (Main.041209-0000)

    SOURCES
     Deployment url   : http://localhost/ScannerBrowserAppHost/ScannerBrowserApp.xbap

    ERROR SUMMARY
     Below is a summary of the errors, details of these errors are listed later in the log.
     * An exception occurred while downloading the manifest. Following failure messages were detected:
      + Downloading http://localhost/ScannerBrowserAppHost/ScannerBrowserApp.xbap did not succeed.
      + The remote server returned an error: (401) Unauthorized.

    COMPONENT STORE TRANSACTION FAILURE SUMMARY
     No transaction error was detected.

    WARNINGS
     There were no warnings during this operation.

    OPERATION PROGRESS STATUS
     No phase information is available.

    ERROR DETAILS
     Following errors were detected during this operation.
     * [10/18/2016 9:16:57 AM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
      - Downloading http://localhost/ScannerBrowserAppHost/ScannerBrowserApp.xbap did not succeed.
      - Source: System.Deployment
      - Stack trace:
       at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
       at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
       at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
       at System.Deployment.Application.DownloadManager.DownloadManifestAsRawFile(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
       at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirect(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
       at System.Deployment.Application.DownloadManager.DownloadDeploymentManifest(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options)
       at System.Deployment.Application.DeploymentManager.BindCore(Boolean blocking, TempFile& tempDeploy, TempDirectory& tempAppDir, FileStream& refTransaction, String& productName)
       at System.Deployment.Application.DeploymentManager.BindAsyncWorker()
      --- Inner Exception ---
      System.Net.WebException
      - The remote server returned an error: (401) Unauthorized.
      - Source: System
      - Stack trace:
       at System.Net.HttpWebRequest.GetResponse()
       at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)

    COMPONENT STORE TRANSACTION DETAILS
     No transaction information is available.

    I searched in Google but I did not find solution. Any kind of help or hints are appreciated.

    Tuesday, October 18, 2016 8:48 PM

All replies

  • I have XBAP application and this application has integrated into ASP.Net application. It was hosted into IIS. It work perfect when Anonymous Authentication is enabled. But application throws error when it is disabled. The error is as follows.

    HTTP Error 401.2 - Unauthorized

    You are not authorized to view this page due to invalid authentication headers.

    I searched Google but did not find any solution yet.

    Can anybody give me hints?

    Tuesday, October 18, 2016 8:56 PM
  • BMorshed,

    Can you provide the Win32 error code from IIS so that we can better identify your issue.  Also, check the event log for the server hosting IIS and provide any correlating error, warning information.  This will help use identify the full breath of your issue. 

    Lastly, please think about using ProcMon.exe (SysInternals Suite), on the wp3.exe process at the point the IIS request is sent.  Then examine it for any issues like ACCESS DENIED, FILE NOT FOUND and the like.

    I included some helpful posts that may help you identify your issue.

    REF:

    SysInternals Suite Download
    https://technet.microsoft.com/en-us/sysinternals/bb842062.aspx

    Monitor Activity on a Web Server (IIS 7)
    https://technet.microsoft.com/en-us/library/cc730608%28v=ws.10%29.aspx?f=255&MSPPError=-2147217396


    - Rashad Rivera www.omegusprime.com

    Tuesday, October 18, 2016 11:14 PM

  • Hi BMorshed,

    >>It works fine if I enable Anonymous Authentication. But I am getting the following error if I disable Anonymous Authentication of IIS web server.

    As far as I know, if you disable Anonymous Authentication, you should open at least one authentication certification. Otherwise, you will get 401 error.

    You can also list your IIS error log and start a new thread in IIS forum.

    IIS forum:


    Best Regards,

    Yohann Lu

    Thursday, October 20, 2016 9:24 AM