0 Comments

Perhaps it’s because I was still in holiday-mode, but I kept getting a 403 error. Even when I added a `helloworld.html` in the `.well-known` dir. Which was driving me crazy. I even thought it was .net Core 2.x related because all full framework sites were renewing just fine, both MVC and Webform applications.

The answer for my situation was in this comment:

Do you have both http/https binding? http binding is required for it to work.

I did, but I remembered something about forcing to SSL for this website.

I searched my code, but all I could find was commented out:

image

image

So how did I manage to force visitors to the SSL version? I could not remember it. There was also no URL rewriting in the web.config. It was a checkbox in IIS which I forgot that I ever changed that setting! (sorry for the Dutch screenshot of IIS 8.5)

 image

It would be nice if the new version of Let’s Encrypt Win Simple would temporary disable it and afterwards restored it.

Here is the link to the latest version 1.9.6.2


Good luck and best wishes for 2018!

Pin on pinterest Plus on Googleplus Post on LinkedIn

I am currently working on a side-project with the code-first approach. I really like how the framework does migrations and you can use the .sql files in the migration folder etc.

But I am still wrapping my head around the model/poco classes I want to use and the data structure is still changing in this stage of development. I have moved from 1-n relations to n-n etc.

I sometimes stumbled on a situation where there were foreign key constraints which made it (almost) impossible to process a migration. I also did not found how to revert one or cancel one if you have a pending one and cannot update the database.

Because I was still starting with the project I could not bother to loose all the data and start over with a clean/empty database. I have read several blogs about how to do this, but I wanted to blog my situation. Perhaps it’s useful for someone, perhaps it’s just an online note to myself.

Here is how I did it:

  1. Delete the ‘__MigrationHistory’ table
  2. Delete all files in the ‘Migrations’ folder of your project except the ‘Configuration.cs’
  3. Delete all other tables (one by one) in the DB
  4. In the package manager console, select the correct project and ‘Add-Migration <name>’
  5. Update-Database (this will recreate all tables and use the initial data from the configuration file, if you had any)

A lot of blogposts are based on keeping your data. In that case, you should skip step 3 (obvious) and comment out the ‘Up’ method when you have added your migration and have the generated file open.

This is a slightly modified version of this blogpost which uses the brand new SQL Operations Studio 0.23.6


Good luck!

Pin on pinterest Plus on Googleplus Post on LinkedIn
0 Comments

If your iMac starts with a screen similar to this:

image

don’t worry! There is a solution. Apple admit that they had bad hardware in a certain line of 2011 models. Apple offered to replace the videocard for free. But that offer has expired. I was not even aware it existed.

Never mind, the Apple store says that replacing the videocard will be between 600 and 700 euro.

That’s an expensive solution, so here is a cheaper one:

Bake your video card in the oven

I found this YouTube video about opening the iMac and put the card in the oven.

https://youtu.be/9vPM41ZmLoshttps://images-na.ssl-images-amazon.com/images/I/41wB-fA7TbL._SY355_.jpg

Here are the ingredients for the recipe:

  • Torx T10 (almost all screws are t10)
  • Torx T9 (2 screws holding the video card to the cooling system)
  • Cooling paste
  • regular Phillips screwdriver
  • 2 suction cups
  • a bit of aluminum foil (to make 4 aluminum balls to stabilize the card in the oven on the plate)
  • conventional oven (with bottom and top radiation and a plate)

I also used some alcohol, tissues and q-tips/ cotton bud to remove the old cooling paste

Start by removing the ram modules from the bottom of the iMac.

Follow the steps in the video to remove the glass with the suction cups and remove 4 screws on each side of the panel to tilt the panel and disconnect all 4 connectors. Remove the panel and disassemble the main board/ logic board. The required screws cannot be found in the video. But you can find then in this video:

https://youtu.be/6B4iCYSWlWM?t=4m55s

The link starts the video at 4 minutes and 55 seconds. Which explains the screws you need to remove for the main board. afterwards you need to remove all connectors on the front. Tilt the board and remove the connectors on the back.

Follow that video to the end and then continue with the previous one to remove the cooling from the videocard.

clean the videocard and put it on 4 aluminum balls on a plate and put it in a pre-heated oven for 8 minutes on 200 degrees Celsius.

image

put new thermal/cooling paste on the chips and re-assemble everything. Do not forget the ram modules.

Here are some pictures from my baking experience:

IMG-20171108-WA0001IMG-20171108-WA0002WP_20171108_09_32_11_ProWP_20171108_09_32_19_ProWP_20171108_09_42_30_ProWP_20171108_09_51_20_ProWP_20171108_09_51_25_ProWP_20171108_10_23_18_ProWP_20171108_10_33_18_RichWP_20171108_10_37_19_RichWP_20171108_10_48_19_RichWP_20171108_11_39_23_RichWP_20171108_11_41_24_Rich

Good luck!

Pin on pinterest Plus on Googleplus Post on LinkedIn

I was trying to create new packages for a Store application and got this error. I was updating my Nest Thermostat application and adding the new Navigation View component. Which is a great new XAML component.

The docs for the navigationview xaml control are great. But during the creation of the new store package I got this dummymodulereference error… Here is my attempt to fix it:

image

  1. cleared all nuget caches
  2. removed the .vs hidden folder in my solution folder
  3. removed in each project folder the bin and obj folder
  4. removed the project.lock
  5. Had to open my solution file in notepad++ to see that I had a project in my solution in an other (parent) dir. So had to remove bin and obj and project.lock there too.
  6. right click on solution in the solution explorer and restore nuget packages
  7. build –> rebuild solution

But unfortunately..  I Googled with Bing and found people having similar issues: https://developercommunity.visualstudio.com/content/problem/133644/internal-compiler-error-5.html

and https://developercommunity.visualstudio.com/content/problem/137629/error-on-build-for-store.html


I even removed the symbol cache (tools –> options –> debugging –> symbols –> empty symbol cache)

Also skipped the nuget restore, because creating store packages will auto restore nuget packages.


I found out that the issue was in a global nuget package:

image

So I added a reference in my store app project to the same nuget but a newer version. Not 1.7.1 but 2.0.0

That did not help, so I added the microsoft.net.native.compiler package to all my referenced projects.

Also no fix. Last resort: tweet to @VisualStudio because it is already listed in the vs feedback.




Please let me know if you have a solution.

Pin on pinterest Plus on Googleplus Post on LinkedIn

The 15.4 update of Visual Studio has a lot of new things. Also the Fall creator update enables you to use .net Standard 2.0 in UWP apps. Adding UWP apps in the store is easy and native. But you can also pack other types and submit them as store apps.

WAP

Windows Application Packaging Project. it’s a new project template in vs15.4 You can load up the solution containing your application and add a new project of this type.

Select the target and minimum version of the Windows SDK (this is recognizable from uwp apps)

Right click applications in the solution explorer and add a reference to your main application project

Add Project Reference

Then you can use the create app packages like you would do for an UWP app

You can read more about it on the microsoft docs site

https://docs.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-packaging-dot-net

Pro tip: visit the Microsoft Docs website more often. They are really improving lately. Like a lot!

There is just one thing I would like to point out: your developer account needs extra permissions to submit such type of application.

You will need to submit your info on this page:

https://developer.microsoft.com/en-us/windows/projects/campaigns/desktop-bridge

and they will get back to you in 6 business days.

I have submitted two apps, one for the general store and one as a business app which is only available for my colleagues in a private store. Both are still waiting for approval. Hope to hear soon from the team.

So the pro-tip of today is: make sure your dev ms account has privileges to submit a desktop bridge app to the store!


Good luck!

Pin on pinterest Plus on Googleplus Post on LinkedIn