System.Web.HttpContext.Current.Request.Url.ToString() wok on local station but not working on server

hi i m using following code. it working fine on local station but not showing result output when i upload this code on to server.

Is it need any iis setting. m using 2.0
any suggestion will be appriciated.

protected void Page_Load(object sender, EventArgs e)
                string strCurrenturl1 = System.Web.HttpContext.Current.Request.Url.ToString();
                string url = HttpContext.Current.Request.Url.OriginalString;
                Label1.Text = strCurrenturl1;
               // Label2.Text = url;
            catch (Exception ex)

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

In iis you have to set the .net version in the tab.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Are you sure the event is executed ? for example set Label1.Text="Hello" ti check it.
psaini172000Author Commented:
i hav set the version already
psaini172000Author Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft IIS Web Server

From novice to tech pro — start learning today.