Michael D.
Michael D.

Reputation: 1319

ASP.Net MVC RedirectToSsl Issue

I am working on eCommerce app Using Asp.net 3.5 MVC. On my Cart View I have checkout button that redirect to Checkout action on the same controller:

<%= Html.ActionLink("CheckOut", "CheckOut") %>

My controller looks like this:

    [RequireSsl(Redirect=true)]
    public ActionResult CheckOut()
    {
        return View();
    }

But when I click on checkout the URL seems to be correct: (see update) https://localhost/Cart/CheckOut but I get following error:

Data Transfer Interrupted

The connection to localhost was interrupted while the page was loading.
The browser connected successfully, but the connection was interrupted while transferring information.  Please try again.

Any idea what I am doing wrong?

UPD: Actually after redirection the port number is gone. (I am using ASP.Net development server). But even typing in address box correct url produce the same error

Upvotes: 1

Views: 621

Answers (1)

xeb
xeb

Reputation: 198

Is the site setup in IIS? If not, that could be the issue. I do not believe the Visual Studio Debugger supports SSL.

Upvotes: 1

Related Questions