updating Silverlight application # website - asp.net

I have the following scenario: a Silverlight application (constructed to be OOB) embedded at an ASP.NET website where, if the user already installed it, a label saying that is displayed; otherwise, an install button appears. Eventually I can update the .xap file available in the website.
Now the problem: if the user executes the application through his Desktop/Start Menu, i'm able to update the application and suggest the user to restart it. But, if I update the .xap file and upload it again to the website, apparently no "Silverlight update" occurs, it is displayed as a new application (if the user install it again, an application icon is displayed at his desktop).
Is there something I'm missing or there's nothing to do about this?
Thanks!

Signing the Silverlight application solves the problem.

When you run in a browser, updates are picked up right away (subject to HTTP caching rules). With OOB apps you need to use the App.Current.CheckAndDownloadUpdateAsync() method in your app to have it update.
http://msdn.microsoft.com/en-us/library/system.windows.application.checkanddownloadupdateasync(v=vs.95).aspx
The only drawback is that there is no way to just check for an update and give the users an option to download it conditionally; calling this always updates it if there is an update. You can however hook into the event and find info about the update should you wish. See this resource for more information: http://forums.silverlight.net/forums/p/180931/408554.aspx

Related

Enable assembly binding logging (fusion) on an Azure App Service (Web App/Websites)?

Just wondering if anyone can tell me the process for turning on binding logging for a YSOD that is happening on Azure App Service?
As far as I know there isn't any direct access that would permit registry editing or running fuslogvw (?); can the log file be retrieved to run the viewer on it locally? Do we have to code something in an AssemblyResolve event?
Under application settings, you can add WEBSITE_FUSIONLOGGING_ENABLED and set the value to 1. There will be a blog post on this momentarily, so be on the lookout. Once enabled, you can navigate to offending page and the YSOD will display the FUSLOGVW log results. This setting only works ASP.NET Framework, so if your application is ASPNETCORE, this won't work. If this setting doesn't work, it may not have been rolled out to your region yet.

.Net Core Identity not logging in

After extracting my database layers into different projects, each time I run my app, enter my credentials and press login, it will redirect me to Index.cshtml but I still get the "Login" and "Register" actions rendered at the top bar. After scaffolding and debugging Login.cshtml, I can see that the login is successful:
However, after redirecting to LoginPartial.cshtml, I can see that I am, in fact, not logged in:
Here is my project structure:
I am registering identity like so:
So I am guessing that the identity context that I see in Login.cshtml is somehow different from the one in LoginPartial.cshtml, but I am not sure. Has anybody any idea what might be going on here?
Ok I know now what was going on. I have not yet committed the changes where I extracted everything into it's own project and I compared the current solution with the one I had before the changes. I noticed that before I did the changes, the WebSite project was configured to use SSL. Somehow, that got disabled and the login failed for this reason. I don't know why there were no error messages, but in my case, I needed to check the "Use SSL" setting in the project settings of my WebSite project.
Now I am logged in and everything works as expected.

Firebase deploy - Not loading new page

I am deploying a PWA to firebase using the tutorial from the polymer project website. I have no issues deploying to firebase, but if I deploy a second time the new page does not load. It will load the old page until I clear the cookies. I see understand that the way a PWA site works is like an application where it stores parts in memory for faster load times. Is there a setting I need to change to make it load most recently deployed webpage? I appreciate all the help, thanks in advance!
You might be seeing an effect of your service worker. Try deleting the currently registered service worker from your browser so that the new one can take over.
In Chrome 51/52, open DevTools while on your site, and go to the Resources tab, and then Service Workers on the left panel. Click Delete to remove the service worker. You could also check the box for Update on reload, which allows you to update the service worker simply by refreshing the page.

Visual Web Developer 2010 Express hangs when adding web reference

When attempting to add a web reference to my MVC 4 project I do the following:
-Right click on project name and select "Add Service Reference..."
-Click on "Advanced..." button
-Click on "Add Web Reference..." button
-Enter the Web Services API WSDL address in the URL field
At this point it will search and then find the web service and ask me to authenticate the request, after agreeing to continue I am prompted with a login dialog, after entering the correct username and password it will often lock up. Sometimes it will re-display the login dialog and/or pop up some security confirmation boxes that read "Do you want to view only the webpage content that was delivered securely?" (Haven't been able to select Yes or No yet due to application hang around this time).
At this point I have to close the IDE and start the process over. I've tried 5+ times and have updated my system and rebooted.
Any ideas what could be causing this?
Thanks.
Turns out it just took a very very long time. When clicking on pop ups it would stop responding, I found if I waited long enough it would eventually let me make a selection, then the next box would hang. Whole process took well over 20min but eventually went through.
Not sure if this question should be deleted since technically there was no error, I'll leave it up to the mods.
Thanks.

Authentication dialog when running with Visual Studio web server

When using Visual Studio's built in web server, every time I make a page request the standard login box pops up and asks for credentials. It doesn't work if I actually put in my credentials, so I just have to hit cancel 5 times so it will go away.
When I run the application through IIS (locally or on test server) it works just fine (no login box comes up).
Anyone know how to fix this or have any idea what might be causing it?
I assume you mean JavaScript alert box-looking login dialog, right? This dialog pops up when you make a request to a portion of website where anonymous access is disabled from IIS. It is different from ASP.NET authentication.
Do you have some portion of web site protected? Or are you making any HTTP request to external sites, like images and etc?
If your page looks ok after hitting cancel multiple times, it must be one of those HTTP request to protected file like images, css, js or whatever.
I'd look in Fiddler or Firebug to see if any request is failed when you hit cancel in that login dialog.
I'd also try clearing cache/authenticated session on the page that runs on IIS to see if it actually shows you that login dialog.
I had this same issue. However, my solution was different and the issue seemed different as well.
I had been working on a ASP.NET 2.0 web application, using VS 2008. Everything was working fine with the built-in IIS server. I hadn't opened this project for about a week and then when I chose "View in browser" in VS, I was prompted for my windows login creds. This project never did this before, so I was a bit baffled. I checked all the web.config settings and everything seemed fine. My project settings seemed correct as well. I decided to test the project by opening this same project in VS on a separate dev box on my network using a network path. I again chose "View in browser" and it worked fine. No logon prompt.
This told me that the issue wasn't with the actual web project itself, rather my dev environment. I checked all my browser settings as suggested above, and they were correct. I then compared my project settings while I had the same project (same physical files) opened in both dev boxes. I noticed a difference...
Under the Start Option in the Property Pages, the Web Server was set to use the Default Web server in both cases. However, on the box that was asking for my creds, the NTLM Authentication checkbox was selected. I unselected this and it resolved the issue.
I'm not sure how this was possible since I was opening the same project files, and would assume the project settings would be exactly the same. And the fact it was working fine a week ago really perplexed me. I chalked it up to an issue with VS 2008 on the box with the issue. I hope this helps anyone else that may be running into this issue.
This was because localhost was not in my trusted sites so it wouldn't do automatic NTLM authentication... I'm not sure why it was that way, but it was... adding localhost to the list fixed it.
In your project, there should be a vwd.webinfo file.
The following lines control authentication when debugging (in IISExpress). Set as follows to avoid all dialogs.
<VisualWebDeveloper>
<iisExpressSettings anonymousAuthentication="enabled" windowsAuthentication="disabled" useClassicPipelineMode="false"/>
</VisualWebDeveloper>
If windowsAuthentication="enabled" you may still get a dialog, even if anonymousAuthentication="enabled" :-)

Resources