silverlight application deployment over IIS - silverlight

I have created an silverlight application (i have not selected my application to be hosted from another web application).
Now I created a simple hello world page.
I created virtual directory of my silverlight project in IIS for application hosting.
4. When I browse MainPage.xaml in loaclhost, it is not running.
>>I think I shoul run the .xap file to host my application but I dont know haw???
OR
Is it necessary to host a silverlight application from a .aspx page??

If you haven't created a web host project along with your silverlight application then when you debug the Silverlight application it creates a TestPage.html file in the bin\debug directory under you project directory.
This page hosts the XAP and is what the IDE specifies as the page to open by the browser instance it creates when you start debugging.
Hence to host this in your IIS 5.1 server you can create a virtual directory pointing at the bin\debug folder in your project. Navigating to TestPage.html in that virtual directory (for example http://localhost/myvirtualdir/testpage.html) will load your application.

You should have a Default.aspx page which hosts the Silverlight application. Set this to your Default page to see if that works.

Related

UWP App WPF .Net Core has no access right to dependencies

We're making a new application using WPF .Net Core. To use the auto update function we decided to pack it with the MSIX Packaging Tool as a UWP App in VS2019. I was able to host the appinstaller File on an IIS and to Install the App over a link to that file over the web. Auto updating is also working fine.
Now to the problem:
When I run the installed App it's icon is not showing in the task bar but it is shown in the Task-Manager using a lot of cpu. In the Process Monitor it shows that the App tries to access its dependencies (like PresentationFramework.dll) but is not successful as the result is always "File locked with only readers". The DLL itself is present in the WindowsApps/xxx/ Path. Also I can not start the EXE manually as my user do not have the rights. What am I missing here?
Edit: Also I realized now that my app is only starting as a background process in the task manager and not as an app. When I go to the app directory under WindowsApps/xxx/MyApp I can not start the EXE directly because of no rights as mentioned before. But when I copy the whole folder I can start the EXE, the GUI appears and the app is an app again in the task manager.
We found an answer. As the GUI is a WPF .Net Core Project and we make the setup with a Windows Application Packaging Project to generate a UWP App from it the technology used seems to be the so called Desktop Bridge.
In the process monitor it seems that it tries to access the files under the correct path but somehow it does it not in the right way as long as the application path is not set correctly in the WPF Projects App.xaml.cs.
To fix this use the solution from Andrew Leader

ClickOnce and app.config not deploying

I have a new WinForms application that I'm trying to deploy with the ClickOnce method. However, the app.config file that is needed for the application is not included with the installation.
The application is installed properly from the server, and launches the exe, but as soon as I try to login by hitting my WCF Server, I get.
"Could not find the file 'C:\Documents and Settings\Adminstrator\Local Settings\Apps\2.0\7KAA3h20\app.config"
I can manually copy the file from my development machine to this folder and the application works fine.
Any ideas?
The application settings are included in the ClickOnce application as yourappname.exe.config. Are you accessing the app.config through a different mechanism that the global app settings?
Config file is included by default. Are you removing it for some reason?
You can choose files to be deployed on properties page (application files) if you are using Visual Studio.
If file is not in the list, you can add it to project and set build action to "Content" and it will show up in this list.

Sharepoint with silverlight app

I am new to Sharepoint. I wrote a simple RIA MCF silverlight app which runs all the queries right on my server. Now I tried make it available on a Sharepoint testing site. I loaded the xap file but Sharepoint throws me tons of load operation exceptions when it tries to load the app, apparently having problems with the EDM in the app. What do I need to do here? Is the xap the only thing I need to load on the shared documents folder?
Thanks.
Justin,
There are few steps you need to follow to load the Silverlight XAP in sharepoint.
You need to create RIA service as an independently hostable web application (.svc)
Follow the guidelines available here
Once you have the solution ready. Host service on IIS and make sure that it is functioning correctly.
Configure the .svc in the web.config of the hosting web application and access the same in your silverlight application as below
new LoggingContext(new Uri(ConfigurationManager.AppSettings["LoggingServiceUrl"]);
Load the xap on sharepoint site and in the configuration section provide links to .svc services.

how to set silverlight out of browser application in windows startup

Hi
I have one silverlight application which I have set for Out of browser application so that user can installed on their machine.
Now my question is "Is there any way or configuration or programmatically possible that when my silverlight application get installed it will put it self in the windows startup so that when user logged in it will automatically starts like messenger applications (yahoo, msn etc)?"
Thanks
You could create a batch file that would do 2 things :
Install your app in OOB using SLLauncher.exe (silverlight executable fo OOB applications), It now have a /install option in its parameters you could use that method to install it.
Copy the shortcut to the"Startup" folder of the current user :
%UserProfile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

Open Silverlight OOB on url, if installed

Is there anyway to make the OOB version of my Silverlight app open(if installed) when i go to
http://mydomain.com/silverlightapp <--- where the Xap is loaded.
Just like a irc client opens when i go to irc://servername
but instead of prefix can my app open the OOB version if
App.Current.InstallState == InstallState.Installed
when it's loaded in the browser?.
As of Silverlight 4 there is no way of launching oob application from the url. Irc and other applications can register custom url protocol handler to launch themselves from url. If you can create native application and install it on user's computer you could use it as a launcher for your oob application.

Resources