visual studio - Can't start asp.net debug in http -


i have issue driving me mad. have project set , enabled ssl (by changing ssl enabled flag true in application properties)

enter image description here

then changed project url in web properties ssl url (shown in image above)

enter image description here

and finally, added rewrite rule web.config:

<rewrite>     <rules>         <rule name="http https redirect" stopprocessing="true">             <match url="(.*)" />             <conditions>                 <add input="{https}" pattern="off" ignorecase="true" />             </conditions>             <action type="redirect" redirecttype="permanent" url="https://{http_host}{request_uri}" />         </rule>     </rules> </rewrite> 

this fine. able debug application while on new https url. problem have test on http, reversed steps. first commented out rewrite rule, changed project url normal http url , clicked "create virtual directory". , changed "ssl enabled" false.

this problem lies. when press f5, browser uses normal url (the correct http one) redirects https url. can't change because when redirects. driving me mad because there no rule (that can find) redirecting it. uncommented rewrite rule , changed this:

<rewrite>     <rules>         <rule name="http https redirect" stopprocessing="true">             <match url="(.*)" />             <conditions>                 <add input="{https}" pattern="off" ignorecase="true" />             </conditions>             <action type="redirect" redirecttype="permanent" url="http://{http_host}{request_uri}" />         </rule>     </rules> </rewrite> 

to use http url, not. can please me?!?

in end, pretty straight forward. commented out rewrite rule , in project properties, set override application root url http url while keeping project url https version.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -