WebFaction
Community site: login faq

Hi, I have a working djnago setup running on my local machine and I'm trying to get it to run an XBAP program. The XBAP program works OK loading from a static website but not when I try and supply the code via a view.

So, my html file xdt.html reads:

<html> <head> <title>XBAP test</title> </head> <body>

HTMLx#1

<iframe src="{{app}}" width="800" height="600" scrolling="yes"></iframe>

HTMLx#2

</body> </html>

and my view file reads

from django.template.loader import get_template from django.template import Context from django.http import HttpResponse

def current_XABP(request): t = get_template('xdt.html') s='C:/Python26/Lib/site-packages/django/myproject/WpfBrowserApplication1.xbap' html=t.render(Context({'app':s})) return HttpResponse(html)

What I end up with onscreen is an empty frame. The .exe and .manfest files are in the same directory as the .xbap file

Any ideas?

Thanks, stegzzz

asked 20 Dec '10, 15:26

stegzzz
17613
accept rate: 66%

We primary work with linux, as that is what our servers run. XBAB is a windows only program and as such we would have limited info on it. What happens when you execute the view code from within 'python2.6 manage.py shell' ?

(20 Dec '10, 16:11) johns

Yes, XABP is a windows program but I understood that it runs locally in the browser. So when the view runs it returns the xbap file which then loads the exe and as long as you've got .net on your browser machine it should work. Or have I got this wrong?

(21 Dec '10, 04:29) stegzzz

As Johns pointed out, it looks like xbap is intended to run on Windows. Our servers run Linux. The following will not work on our servers:

def current_XABP(request): 
  t = get_template('xdt.html')
  s='C:/Python26/Lib/site-packages/django/myproject/WpfBrowserApplication1.xbap'  
  html=t.render(Context({'app':s})) 
  return HttpResponse(html)

Your s variable will not work because is no C drive on our servers.

permanent link

answered 20 Dec '10, 16:14

aaronh ♦♦
1.3k3
accept rate: 34%

Sorry, I posted the code that I was using on my machine running the development server. Of course this won't work on the main server.

(21 Dec '10, 04:29) stegzzz
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×908
×1

question asked: 20 Dec '10, 15:26

question was seen: 2,701 times

last updated: 21 Dec '10, 04:29

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM