I'm aware that ASP.Net Request.Url cannot give me deep linking url generated by SWFAddress.
http://www.mysite.com/Default.aspx#/6/
ASP.Net Request.Url only returns
http://www.mysite.com/Default.aspx
I found one question but it is quite old - SWFAddress Deeplinks and C# library?
Is there any library/technique to access deep linking url from Server Side?
Thanks!
Updated: Here is what I get when I access /Default.aspx#/6/
? Request.Url
{http://localhost:56476/Default.aspx}
AbsolutePath: "/Default.aspx"
AbsoluteUri: "http://localhost:56476/Default.aspx"
Authority: "localhost:56476"
DnsSafeHost: "localhost"
Fragment: ""
Host: "localhost"
HostNameType: Dns
IsAbsoluteUri: true
IsDefaultPort: false
IsFile: false
IsLoopback: true
IsUnc: false
LocalPath: "/Default.aspx"
OriginalString: "http://localhost:56476/Default.aspx"
PathAndQuery: "/Default.aspx"
Port: 56476
Query: ""
Scheme: "http"
Segments: {string[2]}
UserEscaped: false
UserInfo: ""
Update: I'm sorry that I did not make my question clear. If user browsers the following url (mostly likely saved in favorite), I would like to retrieve the full url from server side. You can go to that url; it is a real app.
http://publ.com/Kgd3A5y#/13/zoomed
My Current Solution: I subscribe an event (let say page load) at client side. I parse the url at client side, and return to server using ajax. Disadvantage is it creates two page loads.
Part of URL with # is anchor. Anchors are only visible on the client side. You need to deal with anchors on client side with for example JavaScript and You can transform Your request to proper URL readable on server side.
This is not Asp.Net or C# specific. It is standard behavior for any server technology.
Just to quote standard RFC1808:
Note that the fragment identifier (and the "#" that precedes it) is not considered part of the URL.
Update:
If You want to send some data from Your swf to server You can write web service on the server side and then swf can communicate with this web service, so You can send whatever data You like.
Client side JavaScript would be fine to send URL to web service as well.
Edit:
Mate You got plenty of requests already:
81 requests ❘ 1.37MB transferred ❘ 24.10s (onload: 2.41s, DOMContentLoaded: 2.17s)
, so sending few bytes with asynchronous request would not make any difference I think.
Besides I do not think there is much You can do. Anchor is entirely client side thing, it's NOT part of the URL, and to deal with it You need to process on the client side and to process on the client side You need to load Your client script from server, end of story.
There is socket communitacion avaliable in Flash, but it's overdo and You mentioned that You have no access to swf code.
Really I can see no reason to change what You have and no good alternative as well.