Marius Vasile

Marius Vasile

  • 585
  • 1.9k
  • 149.3k

Return . Redirect path error on IIS

Aug 22 2024 4:57 PM

My IIS server link is like h t t p s://iis/myApp

I have a redirect in Index. a s p x which is in the root folder

protected void Test_RedirectSSM(object sender, EventArgs e)
{
    Response.Redirect("~/UserPages/TestareSSM. a s p x");
}

but on btn click the path become

h t t p s://iis/UserPages/Testare SSM. a s p x, ignoring the root folder myApp

I tried with full path on Response.Redirect

protected void Test_RedirectSSM(object sender, EventArgs e)
{
    Response.Redirect("h t t p s:/iis/myApp/UserPages/ TestareSSM . a s p x");
}

but it still ignores myApp. Please help me fix this


Answers (2)