[英]ASP.NET WebSite SSL with Visual Studio 2015
我目前正在學校進行ASP.NET網站安全項目。
我的目標是使用HTTPS的URL來啟動我的網站,並使用SSL對其進行保護。
我一直在網上進行大量研究,以獲取有關如何正確啟用SSL的指導。
我正在使用VISUAL STUDIO 2015 ,並且我已經看到項目屬性可以自動啟用SSL,然后創建一個自簽名證書。
我實際上已經使我的網站在URL下運行-https:// localhost:443 / Example.aspx
它起作用了。然后我到處都在使用它,我意識到它需要以管理員身份運行VS 2015才能起作用。
但是我不確定我是否正確設置了SSL。
我的查詢實際上是..
對於查詢2,我實際上進行了研究,許多人指出,右鍵單擊我的項目,然后單擊“屬性頁”->“啟動選項”->“從此處配置”。
但這實際上是我得到的。
我嘗試使用“開始URL”,但它根本不起作用。。我認為IIS可能阻止了它的工作。。而且我知道某些地方我做錯了。頁面窗口,它與我從其他人看到的窗口不同。
查詢3,
這些是我用於Web.Config文件的代碼。
<system.webServer>
<!--<modules runAllManagedModulesForAllRequests="true" >
<remove name="UrlRoutingModule"/>
</modules>-->
<modules>
<remove name="UrlRoutingModule-4.0" />
<add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="" />
</modules>
</system.webServer>
在我的applicationhost.config文件中
<site name="FinancialHub" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\Users\Dom\Documents\Visual Studio 2015\WebSites\FinancialHub" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:6868:localhost" />
<binding protocol="https" bindingInformation="*:443:localhost" />
</bindings>
</site>
一路上可能會有更多疑問。.我現在能想到的就是我認為做錯了的基礎和基本原理。
一切都亂七八糟..我由衷的歉意..我盡力尋找我能但沒有用的..
非常感謝任何程序上的幫助。
在Web.Config中:
<system.webServer>
<rewrite>
<rules>
<rule name="Redirect to https" enabled="True">
<match url="(.*)"/>
<conditions>
<add input="{HTTPS}" pattern="Off"/>
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}"/>
</rule>
</rules>
</rewrite>
</system.webServer>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.