No "Start" menu shortcut using ClickOnce - wpf

I am publishing a .NET 3.5 SP1 WPF application through ClickOnce. By default, when the user clicks on the published link the application gets installed and a menu and shortcut are added to the client's Start/All Programs menu.
How can I prevent the shortcut/menu from being created? (Users need to run the application solely by clicking on the hyperlink to the ".application" file on a web page.)

For this behaviour, set it as online only. Project properties -> Publish -> "The application is available online only" (radio button).
It will still do the same local caching of files etc; it is mainly the start-menu that changes (I don't have a full list of the differences).

This can also be changed in the .application file by setting <deployment install="false"

Related

icon in task bar will not change when winform is published

I have a winform app running on .net 4. When a certain condition happens, the icon running in the task bar changes from ping_logo to ping_logo_red. (the icon i'm talking about is the one that shows up when you run an application. You click on it and it will restore the windows to the screen or minimize it) The way that the icon is changing is as follows.
I added the ico files as Resources. In the code I change the resource being used
Me.Icon = My.Resources.ping_logo_red
Here is the thing. This works when I run the exe from my machine from the solution bin/release folder. When I publish this and install it from the published location, the icon does not change.
In the publish tab under the project both ping_logo.ico and ping_logo_red.ico are included in the publish status.
what have I not done that is keeping the icon from working in the published app. I've tried to uninstall the app and install it fresh but that doesn't seem to make a difference.
thanks
shannon
If you are using ClickOnce to publish your application then you need to set the icon property in the properties window of your project.
Right click your project -> Properties
Go to application tab
Select your icon file towards the bottom.
Another idea is changing the CopyToOutput property of your .ico file to "Copy Always" or "Copy If Newer".

Deploying Silverlight Application on IIS7

We have a silverlight application written in Visual Studio (VS) 2010 and we want to deploy it on a Windows Server 2008 R2 box (IIS7). To deploy it in VS I did a right click on the MyProject.Web project, selected "Publish...", from the "Publish method" I selected "File System". I copied the folder over to "C:\inetpub\wwwroot" on the server. In IIS Manager I did a right click on the folder, selected "Convert to Application", a window popped up, where you can select the application pool. I selected the default (.NET 4), I clicked on "Test Settings..." it failed (that was a bad sign), clicked ok.
When I try to access the website from a browser a message box pops up saying do you want to open or save "MySilverlightApp"?
Basically, it wants to download the xap file like it would download a text file or a doc file, it doesn't "run" it.
I have checked the forums and most cases the issue is that the MIME file types are not set up, but I have checked that it's all looks good, and it should as well because on IIS7 it's all set up by default so I am puzzled a bit here.
Thanks for your help.
I have just realized that you tried something about mime types so I need to edit my answer. I want to share a link to provide you a guide. It may be helpful to see if you miss a point.
http://www.iis.net/learn/web-hosting/web-server-for-shared-hosting/configuring-iis-for-silverlight-applications
The route cause of the issue was that the XAP file (inside the ClientBin folder) was the default document.
When I set the aspx file (in the application root folder) as the default document, it started to work fine.

visual studio extensibilty - How can I check if Silverlight debugging is enabled in an ASP.NET Web Site?

How can I programatically check whether a Web Site has Silverlight debugging enabled (ie, whether the "Silverlight" checkbox under "Property Pages->Start Options" is checked)?
I know that for a Web Application (WAP), I can check this via EnvDTE ( by checking project.Properties.Item("WebApplication.SilverlightDebugging").Value), but for a Web Site, I can't find an equivalent property.
For a Web Site project, there are properties named EnableASPXDebugging, EnableUnmanagedDebugging, and EnableSQLServerDebugging, but strangely there is no EnableSilverlightDebugging property. This might be a bug in Visual Studio.
Properties for Web Site projects are saved to the following file:
C:\Users\username\AppData\Local\Microsoft\WebsiteCache\Websites.xml
As a last resort, you can parse the file and read the value of the enablesilverlightdebugging attribute for your particular <Website>. Unfortunately, it seems that this file does not get updated until the project is closed, so the file may be out of sync with the actual setting.

How to make .exe file programmatically set to run as admin always in vista?

I have written a winform application in C#. When I run the program for some functionality it required admin permission. After Installation If I set the .exe file to run as admin manually (by clicking right mouse button on .exe file) then my program run perfectly.
Now I need user not to set the run as admin property after installation by clicking right mouse button. I need to set this programaticaly somewhere in the code that user no need to bother about this. This specific problem is only arise for Windows Vista. Can anyone help me out?
You need to add a manifest to the app that specifies it require admin privileges. Read more on MSDN.
Update: You can add a manifest to your project by right-clicking on the project and selecting Add / New Item / Application Manifest File. This will add a new file called app.manifest to your project and will reference it from the project properties, in the Manifest dropdown on the Application tab. The default manifest template even has a nice comments on how exactly to change the required UAC execution level.
You need to specify the requestedExecutionLevel in the manifest.
See here for a detailed explanation:
http://petesbloggerama.blogspot.com/2007/04/making-your-assembly-run-as.html

System.Web.Mvc could not laod when publishing silverlight to discountasp.net

I made a simple silverlight web application that just has one button filling up the whole page. It publishes fine to discountasp.net, but when I try to access my website, it says it could not load the file or assembly System.Web.Mvc. I don't even see this in my silverlight project references.
In your MVC project, expand the references folder. Then click on System.Web.MVC and in the properties dialog, set "Copy Local" to true. You may need to do this for System.Web.Routing and System.Web.Abstractions as well. Then Publish your website, select FTP and enter your DiscountAP.net FTP address and username and password. Set passive mode to true.
Sounds like one of your assemblies is referencing the MVC dll. This will be in the GAC on discountasp.net. Download and install the MVC binaries on the webserver you are using and the problem will go away.
Although I am not sure why your site is looking for them. Check the web.config for assembly references.
Hope this helps.

Resources