To configure the Commerce Server 2007 Starter Site to work with an SSL offloader, follow these steps:
- In the Web.config file for the Starter Site, locate the element that resembles the following.
- Add or modify the requireSSL property, and then set the value to false.
- Add or modify the useSecureUrls property, and then set the value to true.
- In the Web.config file for the Starter Site, locate the following element.
<configuration>
<authentication>
<forms ..>
- Change the value of the loginUrl property to contain the absolute URL path of the logon page. For example, set the loginUrl property to a value that resembles the following:
https://example.com/StarterSite/User/Login.aspx
- In the Web.sitemap file, change all the URLs that begin with ~/Profile/ so that they start with the absolute URL path of the profile section. For example, change the URLs to resemble the following:
https://example.com/StarterSite/Profile/Default.aspx
- In the User\Login.aspx.cs file, add the following code to the end of the LoginForm_LoggedIn method.
string returnUrl = Request.QueryString["ReturnUrl"];
if (String.IsNullOrEmpty(returnUrl))
{
returnUrl = "~/";
}
Response.Redirect(returnUrl);