If you can, please add a bit more description of what you
want. Especially talk about the kind of URL rewriting you
are doing, how Anthem behaves now, and how you want Anthem
to behave.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What is doing the rewriting? An ISAPI module or an ASP.NET
module?
If you set a breakpoint in your page, does the Request
object show the rewritten URL or the original URL?
If you put a normal ASP.NET control such as a LinkButton
on the page that causes a PostBack, does it PostBack to http://localhost/OpenModel/Discussions/forum/ShowForm.aspx?
If not, why not? Perhaps we can use the same technique in
Anthem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It is an ASP.NET module (HttpModule). I have a LinkButton on
my page with url http://localhost/OpenModel/Discussions/forum/1.aspx. When I
click this button (make request to server), my UrlRewriter
(HttModule) converts this url to real using regular
expressions: http://localhost/OpenModel/Discussions/ShowForum.aspx?id=1.
So the Request object shows the original url. But Anthem
uses right part of this url - ShowForum.aspx?id=1 and left
part of rewritten url showing in browser - http://localhost/OpenModel/Discussions/forum/.
It renders into my form the following:
<script type="text/javascript">
//<![CDATA[
var Anthem_DefaultURL =
"ShowForum.aspx?id=1&Anthem_CallBack=true";
var Anthem_FormID = "aspnetForm";
//]]>
</script>
If Anthem_DefaultURL will be "1.aspx?&Anthem_CallBack=true"
- it could be very helpful.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This will be very hard for me or anyone other than you to
implement. I don't have your URL rewriter, so I can't
duplicate what you are seeing. Every time I think about
it, I come up with about 10 details I would want to know.
You may need to solve this one yourself.
If you need help, at a minimum I would need your URL
rewriter module and your regular expression.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If I comment in function GetPageURL(HttpContext context) in
Manager.cs the following block of code:
if (Anthem.Manager.BaseHref.Length == 0)
{
url = filePath;
int lastSlash = url.LastIndexOf('/');
if (lastSlash != -1)
{
url = url.Substring(lastSlash + 1);
}
}
everything works fine.
Why parses function GetPageURL the url in this way?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I honestly do not remember. If this code was added after
this SourceForge project was started then you may be able
to find the comments associated with the check-in by
searching the developer list archives.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=1245761
I'm going to move this to Feature Requests.
If you can, please add a bit more description of what you
want. Especially talk about the kind of URL rewriting you
are doing, how Anthem behaves now, and how you want Anthem
to behave.
Logged In: YES
user_id=1597519
Ok, my rewritten url is
http://localhost/OpenModel/Discussions/forum/1.aspx
and real url is
http://localhost/OpenModel/Discussions/ShowForum.aspx?id=1
Anthem tries to send requests to such url:
http://localhost/OpenModel/Discussions/forum/ShowForum.aspx
But such request is invalid.
I think if Anthem will use rewritten url - it will resolve
my problem.
Logged In: YES
user_id=1245761
What is doing the rewriting? An ISAPI module or an ASP.NET
module?
If you set a breakpoint in your page, does the Request
object show the rewritten URL or the original URL?
If you put a normal ASP.NET control such as a LinkButton
on the page that causes a PostBack, does it PostBack to
http://localhost/OpenModel/Discussions/forum/ShowForm.aspx?
If not, why not? Perhaps we can use the same technique in
Anthem.
Logged In: YES
user_id=1597519
It is an ASP.NET module (HttpModule). I have a LinkButton on
my page with url
http://localhost/OpenModel/Discussions/forum/1.aspx. When I
click this button (make request to server), my UrlRewriter
(HttModule) converts this url to real using regular
expressions:
http://localhost/OpenModel/Discussions/ShowForum.aspx?id=1.
So the Request object shows the original url. But Anthem
uses right part of this url - ShowForum.aspx?id=1 and left
part of rewritten url showing in browser -
http://localhost/OpenModel/Discussions/forum/.
It renders into my form the following:
<script type="text/javascript">
//<![CDATA[
var Anthem_DefaultURL =
"ShowForum.aspx?id=1&Anthem_CallBack=true";
var Anthem_FormID = "aspnetForm";
//]]>
</script>
If Anthem_DefaultURL will be "1.aspx?&Anthem_CallBack=true"
- it could be very helpful.
Logged In: YES
user_id=1245761
This will be very hard for me or anyone other than you to
implement. I don't have your URL rewriter, so I can't
duplicate what you are seeing. Every time I think about
it, I come up with about 10 details I would want to know.
You may need to solve this one yourself.
If you need help, at a minimum I would need your URL
rewriter module and your regular expression.
Logged In: YES
user_id=1597519
If I comment in function GetPageURL(HttpContext context) in
Manager.cs the following block of code:
if (Anthem.Manager.BaseHref.Length == 0)
{
url = filePath;
int lastSlash = url.LastIndexOf('/');
if (lastSlash != -1)
{
url = url.Substring(lastSlash + 1);
}
}
everything works fine.
Why parses function GetPageURL the url in this way?
Logged In: YES
user_id=1245761
I honestly do not remember. If this code was added after
this SourceForge project was started then you may be able
to find the comments associated with the check-in by
searching the developer list archives.
Logged In: YES
user_id=1597519
Ok, thanks for your help.
I will set Anthem.Manager.BaseHref to any string value to
skip the url parsing in GetPageURL function!