L
Les Caudle
I've gotten url mapping to work perfectly while running in VS 2005 Cassini debug
mode.
I simply added this to web.config
<urlMappings enabled="true">
<add
url="~/school"
mappedUrl="~/Schools.aspx" />
</urlMappings>
and all calls to domain.com/school will map to domain.com/Schools.aspx
However, when I run this in IIS on an XP development box, or on IIS on a Windows
2003 Server box, I get page cannot be found.
I even tried creating a Global.aspx and adding
protected void Application_BeginRequest(object sender, EventArgs e) {
string strCurrentPath = Request.Path;
strCurrentPath = strCurrentPath.ToLower();
if (strCurrentPath.EndsWith(@"/school")) {
string strCustomPath = @"/Schools.aspx";
Context.RewritePath(strCustomPath);
}
}
which worked perfectly in Cassini - but not in IIS on XP or 2003.
I'm perplexed. How can I get this to work?
mode.
I simply added this to web.config
<urlMappings enabled="true">
<add
url="~/school"
mappedUrl="~/Schools.aspx" />
</urlMappings>
and all calls to domain.com/school will map to domain.com/Schools.aspx
However, when I run this in IIS on an XP development box, or on IIS on a Windows
2003 Server box, I get page cannot be found.
I even tried creating a Global.aspx and adding
protected void Application_BeginRequest(object sender, EventArgs e) {
string strCurrentPath = Request.Path;
strCurrentPath = strCurrentPath.ToLower();
if (strCurrentPath.EndsWith(@"/school")) {
string strCustomPath = @"/Schools.aspx";
Context.RewritePath(strCustomPath);
}
}
which worked perfectly in Cassini - but not in IIS on XP or 2003.
I'm perplexed. How can I get this to work?