dkfarver

We have a simple XBAP (Hello World) that runs fine on our non-secure (http) web server, but will not run over https. We get a page not found. All seem the same even a mirror of folder structure and file names. Is there some secret to deploying XBAP to a secure server.




Re: Windows Presentation Foundation (WPF) XBAP and https

Matt Galbraith

Your scenario should definitely work... I can personally assure you that is a well-tested code path. Is there a chance the machine does not have the .xbap MIME type set up properly and is configured to not serve unknown content types

I suggest using a HTTP sniffing tool like Fiddler to look at the files being accessed and see if any error codes are being returned. If you can't make much sense of it, paste the Fiddler logs in a forum post reply.


Also, if there are certificate conflict issues (cert is for different URL than deploying app from, cert is expired), realize that deployment will fail.






Re: Windows Presentation Foundation (WPF) XBAP and https

Roelf de Kock

I also ran into problems when trying to serve a XBAP application over https. I've set up a http server to have both a http port (80) as well as a https port (443) so that any of the content on the server would be accessable via both protocols (http and https). I tried more than one XBAP application (some of them was from the examples that is distributed with the SDK) and found every time that I could run the application by using the http protocol but that with the https protocol the application would not work.

When I use an IE7 browser from a Vista machine I get a warning about "Data Execution Prevention" that stopped the WPF host. When I use an IE7 browser from an XP machine I get an error page that says something about not being able to display the page.

When I browse (the https address) to the XBAP by using Firefox I get a message from Firefox saying that I'm trying to open a XAML browser application an then it offers to open it with the WPF Host application. This tells me that there is nothing wrong with the MIME type.




Re: Windows Presentation Foundation (WPF) XBAP and https

Matt Galbraith

Hi Roelf,

Can you give some more specifics about which versions of WPF you are running on these machines If you're running Orcas Beta1/Beta2 and cookies are involved, you may have hit an irritating bug that is fixed in RTM builds.

As for FireFox, there was limited support for this in Orcas Beta2 but no earlier released builds. It detecting the file type doesn't mean your server is necessarily serving up the correct MIME types. This information can be easily derived from the registry on any machine with WPF installed.

Also, if you can point me to the URL of an .xbap on your HTTPS server, I can help take a look at whether the issue is with your server or client machines. I'd also like to see the error page(s) content from any IE7 dialog.

Thanks!
Matt






Re: Windows Presentation Foundation (WPF) XBAP and https

Matt Galbraith

After asking around, I was reminded that the DEP (Data Execution Prevention) was a bug in the browser-application error page... so something is causing deployment errors from this server. Given that the HTTP server works for you, it's very likely a server or machine configuration issue with HTTPS.

Stuff to try:

- Examine HTTPS app activation with an HTTP sniffing tool such as Fiddler --> Look for errors getting other files in the deployment besides the .xbap (.exe, .exe.manifest, possibly .dlls...). Send me a URL and I'll try it too!

- Reset IE settings to default ; this helps in case you accidentally disabled something that is blocking apps from running. (not likely the issue if you see this on multiple machines though)

Matt






Re: Windows Presentation Foundation (WPF) XBAP and https

Roelf de Kock

Hi Matt

Unfortunately I could not succeed in getting you access to a http server on our network. All I managed to get was some dirty looks from our network admin. Thank you for offering to investigate my problem.

I installed Fiddler and had a look at the http traffic. When I ran my test XBAP over http I found that there are 4 requests (I cleared the appl. cache first with "mage -cc".) One is for the .xbap, another one for the .xbap, one for the .manifest and finaly the .exe is downloaded. The first few lines of each response is listed below:
http request 1:
GET /xbap/simple/SimpleXBAP.xbap HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/xaml+xml, application/vnd.ms-xpsdocument, application/x-ms-xbap, application/x-ms-application, */*
Accept-Language: en-za
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; FDM; .NET CLR 3.0.04506.30)
Host: goorgomgaai:8080
Proxy-Connection: Keep-Alive

http response 1:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
ETag: W/"5137-1193297545398"
Last-Modified: Thu, 25 Oct 2007 07:32:25 GMT
Content-Type: application/x-ms-xbap
Content-Length: 5137
Date: Thu, 25 Oct 2007 20:53:04 GMT

< xml version="1.0" encoding="utf-8" >
<asmv1:assembly xsiTongue TiedchemaLocation="urnTongue Tiedchemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlnsBig Smilesig="http://www.w3.org/2000/09/xmldsig#" xmlns="urnTongue Tiedchemas-microsoft-com:asm.v2" xmlns:asmv1="urnTongue Tiedchemas-microsoft-com:asm.v1" xmlns:asmv2="urnTongue Tiedchemas-microsoft-com:asm.v2"
...

http request 2:
GET /xbap/simple/SimpleXBAP.xbap HTTP/1.1
Host: zebra:8080
Accept-Encoding: gzip
Proxy-Connection: Keep-Alive

http response 2:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
ETag: W/"5137-1193297545398"
Last-Modified: Thu, 25 Oct 2007 07:32:25 GMT
Content-Type: application/x-ms-xbap
Content-Length: 5137
Date: Thu, 25 Oct 2007 20:35:03 GMT

< xml version="1.0" encoding="utf-8" >
<asmv1:assembly xsiTongue TiedchemaLocation="urnTongue Tiedchemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlnsBig Smilesig="http://www.w3.org/2000/09/xmldsig#" xmlns="urnTongue Tiedchemas-microsoft-com:asm.v2"
...

http request 3:
GET /xbap/simple/SimpleXBAP.exe.manifest HTTP/1.1
...
http response3:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
ETag: W/"8229-1193297545273"
Last-Modified: Thu, 25 Oct 2007 07:32:25 GMT
Content-Type: application/manifest
Content-Length: 8229
Date: Thu, 25 Oct 2007 20:35:05 GMT

< xml version="1.0" encoding="utf-8" >
<asmv1:assembly manifestVersion="1.0" xsiTongue TiedchemaLocation="urnTongue Tiedchemas-microsoft-com:asm.v1 assembly.adaptive.xsd" xmlnsBig Smilesig="http://www.w3.org/2000/09/xmldsig#" xmlns="urnTongue Tiedchemas-microsoft-com:asm.v2" xmlns:asmv1="urnTongue Tiedchemas-microsoft-com:asm.v1" xmlns:asmv2="urnTongue Tiedchemas-microsoft-com:asm.v2"
...

http request 4:
GET /xbap/simple/SimpleXBAP.exe HTTP/1.1
...
http response4:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
ETag: W/"20480-1193297544680"
Last-Modified: Thu, 25 Oct 2007 07:32:24 GMT
Content-Type: application/octet-stream
Content-Length: 20480
Date: Thu, 25 Oct 2007 20:35:05 GMT

When I repeat the experiment with the https protocol (still the same server) I only see this one request and nothing more:
https request 1:
GET /xbap/simple/SimpleXBAP.xbap HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/xaml+xml, application/vnd.ms-xpsdocument, application/x-ms-xbap, application/x-ms-application, */*
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; FDM; .NET CLR 3.0.04506.30)
Host: goorgomgaai:8443
Connection: Keep-Alive
Accept-Language: en-za

https resonse 1:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
ETag: W/"5137-1193297545398"
Last-Modified: Thu, 25 Oct 2007 07:32:25 GMT
Content-Type: application/x-ms-xbap
Content-Length: 5137
Date: Thu, 25 Oct 2007 20:49:57 GMT

< xml version="1.0" encoding="utf-8" >
<asmv1:assembly xsiTongue TiedchemaLocation="urnTongue Tiedchemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlnsBig Smilesig="http://www.w3.org/2000/09/xmldsig#" xmlns="urnTongue Tiedchemas-microsoft-com:asm.v2" xmlns:asmv1="urnTongue Tiedchemas-microsoft-com:asm.v1" xmlns:asmv2="urnTongue Tiedchemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity name="SimpleXBAP.application" version="1.0.0.0" publicKeyToken="683db346bd035ab8"
...

I used the .net 3.0 runtimes that is distributed with Vista. Also, to minimize all the varialbles I used a very simple XBAP that display a label only. I've also reset IE's settings to default as you suggested.




Re: Windows Presentation Foundation (WPF) XBAP and https

Matt Galbraith

Hi Roelf,

From the logs it sure looks like there's nothing wrong with your HTTPS server... the mysterious hard stop is very strange. Can you try to open the .exe.manifest file using notepad (i.e. open notepad.exe, File/Open/ https://yourserver/xbap/simple/SimpleXbap.exe.manifest) If this hits an error, it might explain things.

I forwarded this thread on to Chango, a leading expert on weird browser-app issues. Hopefully he can make some sense of this.

-Matt






Re: Windows Presentation Foundation (WPF) XBAP and https

Roelf de Kock

I remember that I did an experiment with Firefox at some stage where I downloaded the .xbap, .manifest and .exe over https just to see if the server had any problem in serving these files. There wasn't any problem with the downloads though. I'll try notepad tomorrow just to confirm that there is no problem opening these files from the server.




Re: Windows Presentation Foundation (WPF) XBAP and https

Roelf de Kock

Something else that I can mention maybe is that I tried 2 http servers, IIS7 and Tomcat 6. I got the same result regardless of the server that I used.