We have an asp:Silverlight tag on one of our aspx pages and has been working happily for years:
<asp:Silverlight ID="Xaml1" runat="server" MinimumVersion="2.0" Source="~/ClientBin/FHH.UploadManager.xap" Width="97%" Height="320" />
The user selects multiple files, which are listed in the Silverlight API, then the user left-clicks on a file and selects what type of file it is, then the files are uploaded and end up in different folders depending on the type.
As an enhancement it is required that we have another type and we amended the Silverlight project to include this extra type, creating a new xap file. This worked fine in test but when it was built for the live environment the Silverlight tag disappears from the screen.
I have browsed through various forums, including Stackoverflow and found the suggestion that we should use <object>, but when I tried that it gave an error message: ‘Could not download the Silverlight application’.
Any help will be appreciated.
We have resolved this problem, we were trying to point to a web service with the wrong URL, 2 URLs could be used and we were using the wrong one.
Related
I have lots of RDLC reports in an ASP.NET app, many generated dynamically (manual manipulation of .rdlc XML file).
Many have external images (EnableExternalImages=true, full https://... url of image passed to report as a parameter).
Reports and images work fine in ASP.NET app (via ReportViewer control).
I am now building a WPF app that uses the same code to generate PDF files from the .rdlc reports.
For the most part the reports work just fine in both ASP.NET and WPF. Both use LocalReport.Render("PDF") to generate a PDF file. The only exception is where external images are used - the report does not seem to be able to render external images in WPF. If I replace the external image with an embedded image it works fine. The URL is definitely correct in the WPF app (works if pasted into browser).
I have tried http and https, and "run as administrator" - same results. The actual error message is typically unhelpful and just seems to be a generic "something wrong" message ("The subreport 'Subreport1' could not be found at the specified location Custom1. Please verify that the subreport has Page 1").
Any ideas?
Doh! As usual the problem was my own stupid mistake, made worse by unhelpful error messages.
LocalReport.Render("PDF", ..., out warnings) has a version that includes an output parameter for Warnings which in this case gave me a precise reason for the malfunction: EnableExternalImages was NOT set as I thought (test all your ASSumptions!) (why don't they show this message in the report instead of the useless generic message, would have saved me a lot of time!).
EnableExternalImages turned out to be set in aspx markup, and not in the RDLC generator code, thus it worked in ASP.NET but not in WPF. I now set it in the code and it works in both apps as expected.
I have read many posts about external images not working in PDF - they definitely work just fine in PDF (and Word), at least with Microsfot.ReportViewer2015.Runtime v12.0.2.2402. What often does not work however is displaying the images in IE in the online (in-browser) preview of the report - half the time they show and half the time they do not show, but they always show in the PDF.
Good Morning,
I am new to sharepoint but I am pretty salty as far as silverlight goes. I know on a standard silverlight application hosted inside an ASP.NET app you can simply append .xap? here to make sure the xap files does not cache each time. In SharePoint I found only one article that even came close to exphttp://techblog.m-dd.com/index.php/2013/01/25/resolve-sharepoint-silverlight-webpart-caching-problem/. When I trying to Edit the WebPart and Under Application, provide path to .xap I click Configure. I then appent something like this to the end of the xap file: .xap?ver=1.1.1.0002 and recieve the following error in sharepoint: Cannot save all of the property settings for the Web Part. One or more errors have occured.
Any help would be greatly appricated.
Thanks
In my experience I've had a lot more luck by using a Content Editor Web Part and then embedding the tag which then links to the .xap file from there. Essentially you can edit the HTML source of the page by adding such a web part.
In the Content Editor Web Part, select "Edit Source" and paste something similar to this:
<object width="300" height="300"
data="data:application/x-silverlight-2,"
type="application/x-silverlight-2" >
<param name="source" value="/Library/YourSilverlight.xap?v=1"/>
</object>
See embedding Silverlight here: http://tz.nu/1o9pkSk
See more about adding the Content Editor Web Part here: http://tz.nu/1tSCOnJ
Using this approach, you can simply modify the page and edit the CEWP (Content Editor Web Part) and append the querystring behind the .xap to something unique (in my case, perhaps increment it to YourSilverlight.xap?v=2).
As an alternative to all of the above;
I've oftentimes developed my own base web part which hosts Silverlight .xap files, then I'll deploy and add that Web Part instead. I've often built-in the functionality for updated versions into the code so you never have to do that manually, but that's another story.
I am using C1 3 and am having problems with the preview pane.
The C1 site uses master pages for templates, and works correctly when published. However, it is not displaying correctly in the preview pane. It visually appears to be ignoring CSS settings.
This site was copied from an original install, on another sever, that works correctly.
Any tips and or ideas would be greatly appreciated.
*UPDATE**
In the content view, which is not working, it is using this url
http://www.abc.com/Composite/content/Frontend/Images/logo.gif
All other sites, including the published version of the site above use this url
http://cms.abc.dev/Frontend/Images/logo.gif
I am assuming the same is happening for all images and style sheet references.
However, I cannot find where this is happening. In the master page items are referenced as follows:
href="~/Frontend/Styles/layout.css"
ImageUrl="~/Frontend/Images/logo.gif"
Thats weird... have you somehow accidently configured the /Composite/Content folder as an application? Thats almost the only explanation why asp.net would expand ~ to /Composite/content/ instead of just /.
The preview-tab is handled through a wrapper-page that lives inside /Composite/content, unlike normal viewing of published pages which is handles by the root itself.
I think i found the problem...
I created a new app pool, used it, and now it works.
I guess the app pool somehow got corrupted...
I've just started getting this Javascript error running VS2010 with SL4
Error: Unhandled Error in Silverlight Application
Code: 2104
Category: InitializeError
Message: Could not download the Silverlight application. Check web server settings
Everything was working fine, changed 1 line of code to use a RegularExpression in the web project (using the Silverlight Business Application template) then when rebuilding I get this error.
Google says this is IIS and mimetype related. I'm using Cassini not IIS with VS2010.
Rebooted, cleared xap from IE cache. Error on both IE and FF.
What could be wrong?
I just got this error myself. Looking at source control and my project I noticed that the original test pages that were created when I setup the project got replaced by two new test pages (one .aspx and one .html).
I removed the newly created pages and went back to the old test pages and things started working.
If your situation isn't the same as mine, then just check your silverlightControlHost div in your test page and make sure you are pointing to the correct .xap file and runtime.
if youre not running in IIS then just check your silverlightControlHost div in your test page and make sure you are pointing to the correct .xap file and runtime.
If you were in MVC you could do something similar...
<param name="source" value="#Url.Content("~/ClientBin/NameOfYourSlAppGoesHere.xap")" />
Follow the Step :
On Hosting project, Properties > Silverlight Applications > Add..
This solved my Problem.
Simple error.
I had the same error with my provider. When I looked at the MIME type everything seemed to be OK:
.xap => application/x-silverlight-app
which seems to be the default value on IIS 6. Then I looked at the webpage VS 2010 created and noticed that it has a MIME type of
application/x-silverlight-2
I changed the MIME type on IIS according to the webpage's type and - my silverlight application gets loaded without any error!
This error often occurs because the MIME type is not set, as you have found for yourself. It can also be a mask for the HTTP error. You can see the message by pulling up the XAP file directly from your browser (http://yourwebsite/ClientBin/filename.xap). The file will either attempt to download, or it will show you an HTTP Error.
I also had the same issue on VS 2010. And the reason was that the .xap file was not getting copied to ClientBin directory of the hosting web site project.
Reason was the association from the hosting web site project to the silverlight project was missing for some reason. (should be due to some restructuring of the projects that I've done recently in my case)
I had to re-add the association from the hosting web site project to the silverlight project.
Steps:
On Hosting project, Properties > Silverlight Applications > Add..
I faced a similar issue and it was solved with the help of this blog post: http://vanderbiest.org/blog/2009/10/27/2104-silverlight-initialization-error/
Just ensuring that IIS_IUSRS has read and read & execute permission on the XAP file might fix this issue.
.xap file was not getting copied to ClientBin directory
The problem in my case was that http://mysite/ClientBin/MyApp.xap was returning a 404. The build process was copying the XAP file into /ClientBin/DEBUG/ - I expect this is because someone told it to copy the XAP file to a config specific folder. To fix it I did the following...
Go to the properties of your website.
Go to the Silverlight Apps page.
If your Silverlight app is already referenced there, remove it.
Now click Add.
Select your existing SL app.
Make sure "Copy to a config specific folder" is NOT checked!
for my case it occured In IE and in chrom the project work.
it resolved by
disable protected mode in IE.(Internet Option -->Security)
For my case (with visual studio 2012), one of the projects in the solution wasn't loaded...
right click->reload project.
fixed.
I have a news letter which i did in silverlight, is there a way to send it in email. like as you include html tags, is there a way to include silverlight xap package in it.
Probably better to reference a webpage containing your silverlight content.
Technically, you could put the path to the .xap hosted on a website into an HTML email body, but nearly all mail clients will not display this - most even prevent images from loading by default.
Most email systems will prevent you from embedding active content like SilverLight, as it presents a security risk. Your only option probably is to put your SilverLight app on the web, and just email a link to it.
Don't if you want your newsletter to be read by anyone. See this article for a good list of do's and don'ts when sending emails.
Don't listen to those guys, they're probably FlashHeads... ;)
Besides that they give up too easily. More power to ya!
I assume this newsletter is for an audence that specifically desires your content: i.e a club or similar organization that doesn't have a windows based webserver.
What you do is attach the file in such a way that they drag a zip containing the files that would normally be served from a website to the hard drive - right click - extract all then they run it by clicking on an HTML file with .htm extension that hosts the silverlight plugin instead of an aspx file.
One note that probably won't matter to you is that without a server backing this up the content can't really send you back any info but it CAN get dynamic info that comes from say RSS feeds or WCF services hosted on the web.