Thursday, August 9, 2012

Sign a dll using Visual Studio command prompt

1. Open command prompt from Visual Studio (any version)
2. Enter the following command in console:  
  sn -k keyPair.snk
3. Obtain MSIL from your dll (ex: MyApp.dll) using below command:
  ildasm myTest.dll /out:myTest.il 
4. Re-Assemble the above il code using your strong-name key (genrated in 2nd step) using below command:
  ilasm myTest.il /res:myTest.res /dll /key:keyPair.snk /out:myTestSN.dll 
Your signed assemly should be ready now.

For verification you can use following command:
sn -vf myTestSN.dll

Access to XMLHttpRequest at 'from origin has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https. .net core angular

Issue: The angular application was getting error from API that the origin has been blocked by CORS policy. Solution: Make sure that the...