|
Home > Archive > Commerce Server General > July 2005 > URLBuilder and Cookies (problem)
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
URLBuilder and Cookies (problem)
|
|
| Tomas Vera 2005-02-22, 5:50 pm |
| Hello All,
A couple of days ago, I posted about having some issues with
CommerceContext.Current.AuthenticationInfo.SupportsSessionCookies
property always returning false.
I found a workaround for the time being, but I've tracked the problem
down to the URLBuilder (...) call in the
UrlBuilder.Current.Redirect(...) call in the EnsureAccess(..) function
in the SiteUtlity.CS file that comes with the FP1 Solution Sites.
Here's what's happening:
I've unpacked the site to per instructions to
<WWWROOT>\MyProject\
When I start at any page in the project, Commerce is setting the
TestPersistentCookie in a file named:
user@localhost.txt.
This happens whether I enter a URL of
http://localhost/MyProject/default.aspx or
http://servername/MyProject/dfault.aspx .
Then when ensureAccess is called URLBuilder returns a URL in the form
of
http://servername/MyProject/default.aspx. But then Commerce is
checking for a cookie in user@MyProject.txt and does not find it,
because the TestPersistentCookie was places in user@localhost.txt .
This leads to SupportsSessionCookies always returning false.
So...Some questions:
1. How do I get Commerce to set the persistent cookie in
user@MyProject.txt or how do I get commerce to check for the cookie in
user@localhost.txt .
2. Why does UrlBuilder always change my urls from
http://localhost/MyProject/... to http://servername/MyProject/...
3. Is it critical tha I use URL Builder for the redirects? (I'm
currently using some of my own code int he EnsureAccess function).
Any insights are welcome.
-tomas
| |
| chekai 2005-07-21, 5:52 pm |
| > Tomas Verawrote:
> 2. Why does UrlBuilder always change my urls from
> http://localhost/MyProject/... to http://servername/MyProject/...
>
> 3. Is it critical tha I use URL Builder for the redirects? (I'm
> currently using some of my own code int he EnsureAccess function).
>
> Any insights are welcome.
>
> -tomas
I'm also facing similar issue here. Thought I share it here and hope
someone else have resolution for it.
I have a MSCMS website using MSIB 21. The virual directory is at
http://servername/msib21/
I am making use of UrlBuilder.Current.BuildUrl( "/Login/Login.aspx",
true ); to contruct the url for my login page. However, the
UrlBuilder returns the following:
http://servername/AnotherApplicatio...ogin/Login.aspx
Also wondering why UrlBuilder is returning the wrong URL....
|
|
|
|
|