Tuesday, March 29, 2016

Update Reference Path in all project in solution

Run the command in Package Management Console
Run following command to set a hard coded path.

foreach ($proj in get-project -all) {$proj.Properties.Item("ReferencePath").Value="E:\Devlopment\PaperSave5.3\Development\3rdPartyLibs\"}


We can go use relative path as below.

$path = [System.IO.Path];
$proj.Properties.Item("ReferencePath").Value="$($path::GetDirectoryName($proj.filename))\..\libs"


Thursday, March 24, 2016

Infinite Loop After Login using Owin in Azure Web Site/App

Make sure to browser your app using https.

If you browse the url from portal it is with http and for whatever reason, it goes to infinite loop.
if you use https, then it works fine. still mystry why azure portal shows http and it doesnt work.

Issue with IIS Express in VS

Issue:
You cannot browse the site from VS if using https and iisexpress.

Few Tips

use command netsh http show sslcert > sslcert.txt 
and find the port of your app.
see the hash of the certificate. now to go mmc -- certificate snap --> local machine and personal.
find the localhost - iis development certificate and see the hash of it.
make sure that hash of the certificate is same in the sslcert.txt.
if not then you need to delete the the http entry and add it back.
here is how
netsh http delete sslcert ipport=0.0.0.0:44303
Use Your port above.
netsh http add sslcert ipport=0.0.0.0:44303 appid={214124cd-d05b-4309-9af9-9caa44b2b74a} certhash=38b305a5d21cba8bcb45fa03069ad4b6940097f9


Use hash of your certificate.
and app id is a new guid.

It should work after this.



Wednesday, March 2, 2016

Create Assymetric key on Remote database

Issue here is that if you are creating it from physical assembly then you need to copy it manually on the db server.

Solution is to use assembly bits. but that would create issues while creating assembly in master db with external access. and you dont want to set trustworty to off for mater .not even for a while.
fix is that we give the permission set as safe to the assembly that we are creating in master. as assembly in master is oinly going to use to create assymetric key, you should be ok.


http://stackoverflow.com/questions/9059912/asymmetric-key-creation-over-network
http://www.sqlservercentral.com/articles/SQLCLR/74377/

Tuesday, March 1, 2016

Azure CDN

Create Azure CDN
-- Create Profile
--Create endpoint that points to the target which can be either Storage/WebApp/CustomOrigin etc.

https://azure.microsoft.com/en-us/documentation/articles/cdn-create-new-endpoint/

https://azure.microsoft.com/en-us/documentation/articles/cdn-how-to-use-cdn/

Question: How the content of the CDN get refreshed and reflect on the client ?